parveenmehta
asked on
Using convert function in VB.NET
Experts i am writting VB.NET code and i am trying to encryt the connection string.Following is the logic i am using but i am getting this error when i use the convert function.
Can you please quiclky help me on this.I am sure it will be a piece of cake for you.
Public Class Encryption
Protected Friend Shared Function encryption(ByVal connectionString As String) As String
Return Convert.ToBase64String(Sys tem.Text.A SCIIEncodi ng.ASCII.G etBytes(co nnectionSt ring))
End Function
End Class
Error::: Overload resolution failed because no accessible 'Convert' accepts this number of arguments.
Thanks
Can you please quiclky help me on this.I am sure it will be a piece of cake for you.
Public Class Encryption
Protected Friend Shared Function encryption(ByVal connectionString As String) As String
Return Convert.ToBase64String(Sys
End Function
End Class
Error::: Overload resolution failed because no accessible 'Convert' accepts this number of arguments.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I actually rewrote the code in C# and that solved the problem.But now i am stuck into another issue.
I am doing this conversion here
byte[] b=Convert.FromBase64String (System.Co nfiguratio n.Configur ationSetti ngs.AppSet tings["dbC onString"] .ToString( ));
Getting this error
Invalid length for a Base-64 char array
Any idea or any solutions ?
Thanks
I am doing this conversion here
byte[] b=Convert.FromBase64String
Getting this error
Invalid length for a Base-64 char array
Any idea or any solutions ?
Thanks
You may want to post this in the VB.net section (https://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/) you can try asking a moderator to move it there, as your more likely to get useful responses there.