From: Jason Huang on
Hi,

My Web.config file in my C# .Net web application has the
< identity impersonate="true" userName="myaccount" password="mypassword" >
However, in some cases the web.config and our environment didn't match
correctly,
and in client's browser there's error page showing that line
< identity impersonate="true" userName="myaccount" password="mypassword" >

How do I config the Web.config so the error message won't show the Username
and Password stuff?
Thanks for help.


Jason


From: Alberto Poblacion on
"Jason Huang" <JasonHuang8888(a)hotmail.com> wrote in message
news:uFWjMh23KHA.4336(a)TK2MSFTNGP04.phx.gbl...
> My Web.config file in my C# .Net web application has the
> < identity impersonate="true" userName="myaccount" password="mypassword" >
> However, in some cases the web.config and our environment didn't match
> correctly,
> and in client's browser there's error page showing that line
> < identity impersonate="true" userName="myaccount" password="mypassword" >
>
> How do I config the Web.config so the error message won't show the
> Username and Password stuff?

In web.config, add <customErrors mode="On"/>. This causes the error
page to show a "generic" message, rather than showing the source code. You
can also use <customErrors mode="RemoteOnly"/>, which causes the complete
error to be shown only at the console of the server, but not when using a
browser from another computer.

From: Mr. Arnold on
Jason Huang wrote:
> Hi,
>
> My Web.config file in my C# .Net web application has the
> < identity impersonate="true" userName="myaccount" password="mypassword" >
> However, in some cases the web.config and our environment didn't match
> correctly,
> and in client's browser there's error page showing that line
> < identity impersonate="true" userName="myaccount" password="mypassword" >
>
> How do I config the Web.config so the error message won't show the Username
> and Password stuff?

You can always encrypt the username and password. Also, you might want
to use a strong password, which consist of using control key like Shift
key, alpha, numeric and special character key combinations. The
'mypassword' is a little weak.

<http://support.microsoft.com/kb/329290>