escape character & doesn't work for impersonation tag in web.config, asp.net 3.5
I hope someone has a good answer to this stupid question I have. I'm trying to use impersonation in my asp.ne开发者_JAVA技巧t 3.5 application within the web.config file to connect to my sql server 2008 database so I use:
When I run my app, I get this:
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password.
Source Error:
impersonate="true" userName="testUser" password="test(ampersand sign, sorry this forum actually does render it properly)amp;test" />
So basically it posts the password with the actual escape for ampersand rather than the actual ampersand. This leads me to believe it's processing it as a literal but validating it as xml, unfortunately I can't just use "test&test" in the web.config file because visual studio just won't compile it since it's marked as an error.
Anyone?
Didn't you miss "&" before amp;
精彩评论