customerrors tag in web.config

Discussion in 'ASP .Net' started by Chumley Walrus, Jan 22, 2005.

  1. I'm having trouble seeing my page when I publish it on my live server.
    I created a project in VS.net (with MMIT integrated), created a simple
    index.aspx mobilewebform page , I can see it in my Mobile Explorer
    emulator , but get the following error when trying to look at it from
    my remote server, even when changing the CustomErrors mode to Off:



    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>



    ????
    chumley
     
    Chumley Walrus, Jan 22, 2005
    #1
    1. Advertising

  2. You may be mixing up the error messages.

    The customErrors Attributes are

    mode="[On|Off|RemoteOnly]"

    On: Always display custom errors
    Off: Always display ASP.NET error pages
    RemoteOnly: Display custom errors to remote clients
    and ASP.NET errors to localhost
    defaultRedirect="url" - Url to redirect client to when an error occurs

    There's no way you'll get custom error messages,
    if you set customErrors to "off", as in

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

    That way, you'll only get ASP.NET error messages.

    You need to set <customErrors mode ="RemoteOnly"/>
    if you only want remote clients to see your custom error
    messages.

    or

    You need to set <customErrors mode ="On"/>
    if you want your custom error messages to be
    displayed both locally and to remote clients.




    Juan T. Llibre
    ASP.NET MVP
    ===========
    "Chumley Walrus" <> wrote in message
    news:...
    > I'm having trouble seeing my page when I publish it on my live server.
    > I created a project in VS.net (with MMIT integrated), created a simple
    > index.aspx mobilewebform page , I can see it in my Mobile Explorer
    > emulator , but get the following error when trying to look at it from
    > my remote server, even when changing the CustomErrors mode to Off:
    >
    > 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>
    >
    >
    >
    > ????
    > chumley
    >
     
    Juan T. Llibre, Jan 22, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Smith

    Web.Config - customErrors

    John Smith, May 11, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    5,158
    John Smith
    May 12, 2004
  2. Dave

    CustomErrors in Web.Config

    Dave, May 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    471
    Curt_C [MVP]
    May 21, 2004
  3. Kelmen Wong

    web.config customErrors cached?

    Kelmen Wong, Jul 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    366
    Kelmen Wong
    Aug 2, 2004
  4. Ron Weldy

    Customerrors in web.config question

    Ron Weldy, Jan 18, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    9,742
    Razvan Petcu
    Jan 25, 2005
  5. shruds
    Replies:
    1
    Views:
    840
    John C. Bollinger
    Jan 27, 2006
Loading...

Share This Page