user1383393
user1383393

Reputation: 11

Server error in '/' Application (ASP.net)

i am developing a website in ASP .Net with Visual Studio 2010. I don't have yet attached any database, it is plain html with a lot of CSS and a little bit of Visual Basic. I rented web server space from a company. With FileZilla i uploaded the Published Content and placed them in wwwroot directory. When i visit the website from my browser i get the error below:


Server Error in '/' Application.

Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

 <!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

I googled it and found some answers but none fitted my case. I should mention that i am using windows 7 and IIS7, and that locally the site works fine. I thought that i might have made mistake in the code so i tried to upload the template website that visual studio has for default. But the same error still comes up. I tried to upload a plain html site and it worked. I tried to make a plain "hello world" aspx and asp file and it worked. Does anyone have experienced the same problem, and if so how can solve it?

Thank you

Upvotes: 1

Views: 4643

Answers (3)

K. progr
K. progr

Reputation: 1

Remove section <system.codedom> ...... </system.codedom> from Web.config file

Upvotes: 0

Israel Margulies
Israel Margulies

Reputation: 8962

This error can be caused by a virtual directory not being configured as an application in IIS.

Upvotes: 0

Amit Yadav
Amit Yadav

Reputation: 11

Put <customErrors mode="Off"/> in web.config, then it will show the detail error. It is difficult to say anything at this point.

Upvotes: 1

Related Questions