encrypted connectionStrings web.config customErrors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rmgalante@yahoo.com

    #1

    encrypted connectionStrings web.config customErrors

    I encrypted my connectionStrin gs section with the following command.

    aspnet_regiis -pef "connectionStri ngs" "C:\Inetpub\www root
    \MyVirtualDirec tory"

    It worked and I can see that the connectionStrin gs section in the
    web.config file has been encrypted. However, when I run the
    application it fails to load and displays a generic error message page
    with no details. This page tells me that I need to change my
    customErrors section in order to see the error details.

    The customErrors section in my web.config file looks like the
    following:

    <customErrors mode="RemoteOnl y"
    defaultRedirect ="GenericErrorP age.htm">
    <error statusCode="403 " redirect="NoAcc ess.htm"/>
    <error statusCode="404 " redirect="FileN otFound.htm"/>
    </customErrors>

    The RemoteOnly mode should allow me to see the error locally. I am
    running IE 7 locally, but I don't see the stack trace. I changed the
    mode to On, and that didn't work either.

    So, I am unable to debug this problem because I cannot see any error
    details on my server.

  • Alvin Bruney [MVP]

    #2
    Re: encrypted connectionStrin gs web.config customErrors

    Have you tried logging in local to the server and running the application
    with "on" as the setting? That should work for you. You may also want to
    invest in an enterprise logging soluction like the enterprise library.

    --
    Regards,
    Alvin Bruney
    ------------------------------------------------------
    Shameless author plug
    Excel Services for .NET is coming...
    OWC Black book on Amazon and

    Professional VSTO 2005 - Wrox/Wiley


    <rmgalante@yaho o.comwrote in message
    news:1177240361 .202601.14160@l 77g2000hsb.goog legroups.com...
    >I encrypted my connectionStrin gs section with the following command.
    >
    aspnet_regiis -pef "connectionStri ngs" "C:\Inetpub\www root
    \MyVirtualDirec tory"
    >
    It worked and I can see that the connectionStrin gs section in the
    web.config file has been encrypted. However, when I run the
    application it fails to load and displays a generic error message page
    with no details. This page tells me that I need to change my
    customErrors section in order to see the error details.
    >
    The customErrors section in my web.config file looks like the
    following:
    >
    <customErrors mode="RemoteOnl y"
    defaultRedirect ="GenericErrorP age.htm">
    <error statusCode="403 " redirect="NoAcc ess.htm"/>
    <error statusCode="404 " redirect="FileN otFound.htm"/>
    </customErrors>
    >
    The RemoteOnly mode should allow me to see the error locally. I am
    running IE 7 locally, but I don't see the stack trace. I changed the
    mode to On, and that didn't work either.
    >
    So, I am unable to debug this problem because I cannot see any error
    details on my server.
    >

    Comment

    • rmgalante@yahoo.com

      #3
      Re: encrypted connectionStrin gs web.config customErrors

      On Apr 22, 4:08 pm, "Alvin Bruney [MVP]" <some guy without an email
      addresswrote:
      Have you tried logging in local to the server and running the application
      with "on" as the setting? That should work for you. You may also want to
      invest in an enterprise logging soluction like the enterprise library.
      >
      --
      Regards,
      Alvin Bruney
      ------------------------------------------------------
      Shameless author plug
      Excel Services for .NET is coming...
      OWC Black book on Amazon andwww.lulu.com/owc
      Professional VSTO 2005 - Wrox/Wiley
      >
      <rmgala...@yaho o.comwrote in message
      >
      news:1177240361 .202601.14160@l 77g2000hsb.goog legroups.com...
      >
      >
      >
      I encrypted myconnectionStr ingssection with the following command.
      >
      aspnet_regiis -pef "connectionStri ngs" "C:\Inetpub\www root
      \MyVirtualDirec tory"
      >
      It worked and I can see that theconnectionSt ringssection in the
      web.config file has been encrypted. However, when I run the
      application it fails to load and displays a generic error message page
      with no details. This page tells me that I need to change my
      customErrorssec tion in order to see the error details.
      >
      ThecustomErrors section in my web.config file looks like the
      following:
      >
      <customErrorsmo de="RemoteOnly "
      defaultRedirect ="GenericErrorP age.htm">
      <error statusCode="403 " redirect="NoAcc ess.htm"/>
      <error statusCode="404 " redirect="FileN otFound.htm"/>
      </customErrors>
      >
      The RemoteOnly mode should allow me to see the error locally. I am
      running IE 7 locally, but I don't see the stack trace. I changed the
      mode to On, and that didn't work either.
      >
      So, I am unable to debug this problem because I cannot see any error
      details on my server.- Hide quoted text -
      >
      - Show quoted text -
      Thanks for your response. Here is what I do.

      I log on locally as an administrator. I launch IE 7. I load the
      application's web.config file. I set customErrors as follows.

      <customErrors mode="On" />

      I rebuild the application and run it. I do not get a stack trace. So I
      tried the following.

      <customErrors mode="RemoteOnl y" />

      I rebuild the application and run it. I do not get a stack trace. So I
      tried the following.

      <customErrors mode="Off" />

      Now, I get the stack trace.

      This looks like a bug to me.

      Comment

      Working...