encrypted connectionStrings web.config customErrors

R

rmgalante

I encrypted my connectionStrings section with the following command.

aspnet_regiis -pef "connectionStrings" "C:\Inetpub\wwwroot
\MyVirtualDirectory"

It worked and I can see that the connectionStrings 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="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.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.
 
A

Alvin Bruney [MVP]

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
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 
R

rmgalante

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












- 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="RemoteOnly" />

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top