ampersand escape character doesn't work on impersonation password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zomfgz
    New Member
    • Jun 2010
    • 1

    ampersand escape character doesn't work on impersonation password

    I hope someone has a good answer for this stupid question.

    I'm trying to connect to my sql server 2008 database and I'm using impersonation within my asp.net 3.5 application

    <identity impersonate="tr ue" userName="testU serName" password="test& test" />

    Naturally the compiler won't compile until I use the escape character:

    <identity impersonate="tr ue" userName="testU serName" password="test& amp;test" />

    So it compiles, unfortunately when I run my app, it get this:

    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:
    <identity impersonate="tr ue" userName="testU serName" password="test&amp;test" />

    Why isn't it converting my escape character into a proper &?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    It isn't converting my escape character into a proper "&" because this is in your web.config file. There is no interpretation in this file.

    Why won't the compiler accept "test&test" ?
    What error message are you seeing?

    Comment

    Working...