web.config setup - need help

Topics: ASP.NET 2.0
Oct 11, 2008 at 4:03 AM
I am a total n00b when it comes to .net. This is my first foray into this type of code. I copied exactly

<BlogEngine>
<blogProvider defaultProvider="MSSQLBlogProvider">
<providers>
<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>
</providers>
</blogProvider>
</BlogEngine>
and pasted that into the web.config file over what was there before and I am certain my connection string is correct, let I get the following error when trying to go to the login page:

Server Error in '/MSSQL' 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 <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> 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 <customErrors> 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>


Can anyone provide some insight into what I should do to remedy this so I can start working on my new blog? any help is appreciated and please dumb it down for me? thanks!

JS
Oct 11, 2008 at 9:03 AM
The first thing you need to do is exactly what the error is suggesting you do. Find the section in your web.config where it says " <customErrors mode="... and change it to "Off". You will then get a detailed explanation of the error in your browser. Post the details after you do this.
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Feb 27, 2010 at 4:38 PM
Taylex wrote:
The first thing you need to do is exactly what the error is suggesting you do. Find the section in your web.config where it says " <customErrors mode="... and change it to "Off". You will then get a detailed explanation of the error in your browser. Post the details after you do this.
<!-- Web.Config Configuration File -->

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

 just change

<customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
<error statusCode="404" redirect="~/error404.aspx"/>
</customErrors>
 
and leave it like this
<customErrors mode="Off" defaultRedirect="~/error404.aspx">
<error statusCode="404" redirect="~/error404.aspx"/>
</customErrors>
regards