Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm adding a custom property to my web.config file, its the encrypted password for the SQL server. It looks like this:

 

<add key="SQLPassword" value="ywfzQ%<&(,;" />

 

Unfortunetly ASP.NET doesn't like the < in the middle of the string. Is there anyway that I can further encode this?? to prevent the error?

 

thanks

 

Sam

Posted
Um, if it's proably because of the character as I'm sure you guessed, trying using the litteral, crap, my explanation sucks, like in C# if you wanted to display "\\myserver\myshare" you'd actually have to send the string variable "\\\\myserver\\myshare" because the back-slash is a message to the compiler for an escape sequence I think it's called, but with another back-slash behind it, it tells the compiler that you litterally want to use the back-slash as part of the string. It's proabably the same thing here, try putting a backslash in front of it if your doing it in C#, or look through the ASP.NET documentation and figure out what you need to pass to get the literal.
  • Moderators
Posted

Sam, I don't know if escapes would work in this case or not.

You can while encrypting the password (I assume that you're using a Key), keep looping through your're encrypter with new key values until you find one that does not contain any < chars. Just a crude idea.

Visit...Bassic Software
Posted
Sam, I don't know if escapes would work in this case or not.

You can while encrypting the password (I assume that you're using a Key), keep looping through your're encrypter with new key values until you find one that does not contain any < chars. Just a crude idea.

 

The problem is that I need to keep using the current encrpytion method this company uses if possible. Do you know what the esacape key for < is?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...