Click here to Skip to main content
15,884,032 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: loading user info after login from object Pin
Christian Graus12-Mar-09 12:20
protectorChristian Graus12-Mar-09 12:20 
GeneralRe: loading user info after login from object Pin
liamderice13-Mar-09 3:42
liamderice13-Mar-09 3:42 
Questionin excel how to use mailmerge Pin
sivapran12-Mar-09 9:24
sivapran12-Mar-09 9:24 
QuestionRefresh of a seperate gridview in an ASP.NET page. Pin
shawty_ds12-Mar-09 6:53
shawty_ds12-Mar-09 6:53 
AnswerRe: Refresh of a seperate gridview in an ASP.NET page. Pin
Christian Graus12-Mar-09 9:35
protectorChristian Graus12-Mar-09 9:35 
GeneralRe: Refresh of a seperate gridview in an ASP.NET page. Pin
shawty_ds12-Mar-09 12:57
shawty_ds12-Mar-09 12:57 
GeneralRe: Refresh of a seperate gridview in an ASP.NET page. Pin
shawty_ds12-Mar-09 13:06
shawty_ds12-Mar-09 13:06 
Questionbyte[] to string Pin
M.Ambigai12-Mar-09 6:43
M.Ambigai12-Mar-09 6:43 
sir,
Just to encrypt a string, i used this code.
code:
public string encryptText(string plaintext,string passpharse,string saltValue,string hashAlgorithm,int passwordIterations,string initvector,int keysize)
{
byte[] InitVectorBytes = Encoding.ASCII.GetBytes(initvector);
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
byte[] plaintextbytes = Encoding.ASCII.GetBytes(plaintext);
PasswordDeriveBytes password = new PasswordDeriveBytes(passpharse, saltValueBytes, hashAlgorithm, passwordIterations);
byte[] keyBytes = password.GetBytes(keysize / 8);
RijndaelManaged symmetricKey = new RijndaelManaged();
symmetricKey.Mode = CipherMode.CBC;
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(keyBytes, InitVectorBytes);
MemoryStream memorystream = new MemoryStream();
CryptoStream cryptostream = new CryptoStream(memorystream, encryptor, CryptoStreamMode.Write);
cryptostream.Write(plaintextbytes, 0, plaintextbytes.Length);
cryptostream.FlushFinalBlock();
byte[] ciphertextbytes = memorystream.ToArray();
memorystream.Close();
cryptostream.Close();
string ciphertext = Convert.FromBase64String(ciphertextbytes);

return ciphertext;
}
I've got the following errors:

Error 1 The best overloaded method match for 'System.Convert.FromBase64String(string)' has some invalid arguments.54,29
Error 2 Argument '1': cannot convert from 'byte[]' to 'string'.54,54

Please help me to resolve it.
AnswerRe: byte[] to string Pin
shawty_ds12-Mar-09 6:57
shawty_ds12-Mar-09 6:57 
GeneralRe: byte[] to string Pin
M.Ambigai12-Mar-09 7:53
M.Ambigai12-Mar-09 7:53 
GeneralRe: byte[] to string Pin
shawty_ds12-Mar-09 8:53
shawty_ds12-Mar-09 8:53 
GeneralRe: byte[] to string Pin
M.Ambigai12-Mar-09 15:54
M.Ambigai12-Mar-09 15:54 
GeneralRe: byte[] to string Pin
shawty_ds13-Mar-09 5:35
shawty_ds13-Mar-09 5:35 
AnswerRe: byte[] to string Pin
Yusuf12-Mar-09 8:53
Yusuf12-Mar-09 8:53 
QuestionCould not able to open asp.net website application Pin
nuthan anand12-Mar-09 6:14
nuthan anand12-Mar-09 6:14 
AnswerRe: Could not able to open asp.net website application Pin
Abhijit Jana12-Mar-09 6:21
professionalAbhijit Jana12-Mar-09 6:21 
AnswerRe: Could not able to open asp.net website application Pin
johnsontroye12-Mar-09 13:47
johnsontroye12-Mar-09 13:47 
Questionadapter update using stored procedure Pin
member2712-Mar-09 5:19
member2712-Mar-09 5:19 
AnswerRe: adapter update using stored procedure Pin
fred_12-Mar-09 7:54
fred_12-Mar-09 7:54 
QuestionWebsite not working with Oracle 10g and IIS 7 Pin
Khaldris12-Mar-09 4:45
Khaldris12-Mar-09 4:45 
AnswerRe: Website not working with Oracle 10g and IIS 7 Pin
Abhijit Jana12-Mar-09 5:04
professionalAbhijit Jana12-Mar-09 5:04 
GeneralRe: Website not working with Oracle 10g and IIS 7 Pin
Khaldris12-Mar-09 5:41
Khaldris12-Mar-09 5:41 
GeneralRe: Website not working with Oracle 10g and IIS 7 Pin
Abhijit Jana12-Mar-09 6:07
professionalAbhijit Jana12-Mar-09 6:07 
QuestionCalendarExtender in ASP.NET!!! Pin
Sr...Frank12-Mar-09 4:36
Sr...Frank12-Mar-09 4:36 
AnswerRe: CalendarExtender in ASP.NET!!! Pin
fred_12-Mar-09 7:57
fred_12-Mar-09 7:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.