Reputation: 597
I've been working on a web project in MVC3 for several months. I've been using Visual Studio's built-in web server (Cassini) for development, but have found I need to use IIS Express to support HTTPS.
After installing IIS Express 8, I right-clicked the project in VS and selected "Use IIS Express...", and allowed it to create a site for IIS. Now when I attempt to test my site, I get the following error:
Specified argument was out of the range of valid values.
Parameter name: site
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: site]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +298
[HttpException (0x80004005): Specified argument was out of the range of valid values.
Parameter name: site]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9850940
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
The stack trace does not reference any of my code, and my code does not contain any variables named site
. I have a property named Site
in a few places, but no site
.
Furthermore, the exception doesn't even trip the debugger. Instead of breaking execution in VS, the error appears in the browser as a standard yellow ASP.NET error page (although I suppose this may be expected behavior when using IIS instead of Cassini).
I'm not using any HTTPS code in my project yet, and the error occurs whether I've enabled HTTPS in the project properties or not. I should also mention that our production server runs IIS 7 proper, and I've never encountered this problem there.
So, any idea what's going wrong? I can provide source code, but currently I have no idea where the error is even originating.
Upvotes: 3
Views: 3519
Reputation: 4378
I had a similar problem on a new laptop (Windows 8). Pulled my GitRepo, tried to run my (working app) in IIS Express and got the same error.
Turns out I didn't have "Internet Information Services Hostable Web Core" or "Internet Information Services" installed in Windows Features. I'm not sure if you need IIS for IIS Express, as adding that didn't fix the issue, but as soon as I installed IIS Hostable Web Core, everything was fine.
I can only presume (and it's likely from the name) that Hostable Web Core is a pre-req. for IIS Express.
Upvotes: 2
Reputation: 31
I had the same problem.
turned out that iis 8 doesnt work with windows 7. so i had to enable iis 7 using the following method:
Upvotes: 3
Reputation: 446
I don't know where the problem, but I have to work, after I installed the full IIS version (not express) and disable service at startup.
Upvotes: 0