Reputation: 27011
I have built an MVC 3 application and I have a Web Server 2008 on which IIS 7.5 is installed.
In IIS, I created a new Site and under which an Application then I deployed all my physical files on that application folder:
C:\inetpub\wwwroot\DeveloperToolsPortal\Application
I have also configured my Application Pool so that it supports .NET 4. I also downloaded the MVC3 on this server from the asp.net/mvc3 website.
When I browse this application from IIS using the {0} url, I get the {1} error message:
{0}: http://localhost:85/Application/Home/Index
{1}: HTTP 500 Internal Server Error
The Site was configured to use port 85 as 80 was already taken by another Site.
I've also added the below configurations in the web.config file:
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<customErrors mode="Off"/>
Why is this getting this error? How could I fix it? Which step/s have I missed in configuring my application?
I also tried another thing. I added a simple .htm file under my application and tried openning it via IIS and it gave me the below error:
Internet Explorer cannot display the webpage
I'd guess there is something wrong with my IIS?!
Upvotes: 3
Views: 3248
Reputation: 27011
I added some more features/services to my IIS using the Server Manager and registered asp.net with it using aspnet_regiis -ir and this error is resolved.
Upvotes: 0
Reputation: 1148
Don't put it in a subdirectory of C:\inetpub\wwwroot
The problem is that by default, there's a web.config file in C:\inetpub\wwwroot, which IIS will read from, even though your site is not directly in that directory.
You can create another folder in C:\inetpub and put your site into there.
Also, you can have multiple sites running with the same port, but using different host headers.
Upvotes: 2
Reputation: 11468
Out of curiosity, where did port 85 come from? Try taking that out (the default port for HTTP is 80). Also, look in the application error log for additional info on the error. There is also a section of web.config that you can set so that detailed error messages will be displayed (which should not be set for production).
<customErrors mode="Off">
</customErrors>
Upvotes: 0