Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2008
    Posts
    71
    Thanks
    8
    Thanked 0 Times in 0 Posts

    What is the problem?

    Hi,

    I am not an ASP.NET programmer, but I am trying to learn it.

    Every time I try to run a code, I see the following message:


    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 <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>

    What is the probem? How I could fix it?

    regards

    BOB

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    this means that there is an error in the program. in the config file there is a setting to enable errors so you can see them but you are not @ the server so you cannot see them. if you have access to the server go to the config file and turn them on- or you could browse at the server and i think if you are browsing localhost then it will show you the stacktrace. the pother part is saying that you can in the config file redirect users to a more friendly error page other than the ugly one asp.net spits out.

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yup, I too agree to what alykins suggested above.Instead of displaying that asp error page you can create a web page indicating an error message that can be best understood by the user.

  • #4
    New Coder
    Join Date
    Dec 2008
    Posts
    71
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks

    I will talking with my Host provider.

    Bob

  • #5
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not a hot programmer in .NET, not yet anyway.

    So, my two cents.
    You are getting the msg because your page has no way of dealing with an error so it is actually telling you what to do if you want to see the error while on the internet.
    Of course, this will show for anyuone who runs across the error but for the time it takes to fix it it is ok.
    The fix needs to be made in the web.config file
    It would look like this...

    <system.web>
    <customErrors defaultRedirect="~/Oooops.aspx" mode="Off"/>

    If you turn the "Off" to "On" then the error page "Oooops.aspx" will catch the error and show what you want readers to see.

    Don't forget to change the web.config file when the error is corrected.

    @everone -
    I would welcome someone explaining the right way to debug a problem like this without opening the error to public view.

    Also, how to be notified of the error while using not showing the error to visitors.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •