15,881,413 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Bhanu Pratap Verma (Top 30 by date)
Bhanu Pratap Verma
10-Jul-18 3:56am
View
Can you guide me to how to correct code above?
Bhanu Pratap Verma
10-Dec-14 5:52am
View
Please tell me What will the code for this purpose and how to use for the same. I am not new in web service I have have already worked over 3 years in WCF and Web service.
Bhanu Pratap Verma
10-Dec-14 5:45am
View
Hi Ryandev, Can you please explain how to communicate services from web page to web code which are in different server.
Bhanu Pratap Verma
10-Dec-14 5:44am
View
Deleted
Hi Ryandev, Can you please explain how to communicate services from web page to web code which are in different server.
Bhanu Pratap Verma
10-Dec-14 0:40am
View
I need to host all aspx(html) page on the one server and the Bin folder which contain all DLL's in other server. Please help me out for the same we have already spend one day over this. Waiting for your prompt reply.
Bhanu Pratap Verma
9-Dec-14 7:23am
View
DB server- Where database can only running, Sql sever installed here.
Web Server- Which can be handle only http request coming from client.
App Server- Where we keep the business logic.
Now the situation is that- We don't have proper 3 tier architecture so I am thinking the DLL's which makes after published the asp.net website to keep in the app server and all aspx page keep in web server. May be I am wrong, Please suggest the write way.
If I am thinking write please provide the solution how to do it?
Bhanu Pratap Verma
10-Nov-14 2:21am
View
Hi ,
I am getting error "RSA Key container was not found" when I run the command
"aspnet_regiis -pa "Container Name" "NT AUTHORITY\IUSR" as a administrator.
Please help , Its very urgent and highly appreciated.
Bhanu Pratap Verma
7-Nov-14 6:17am
View
Dear All,
I am using the key container for encrypt and decrypt for the password.
I am using the csp class and RSACryptoServiceProvider class to manage the container and key.
My application is running perfectly when I am running in my visual studio 2010.
When I hosted the application on IIS 7.0 server locally then system not able to find the container from the system to get the key .
Error show like "The system cannot find the file specified.".
I am saving the name of the container in database after create the container.
Please help, Its highly appreciated.
<pre> public void GenKey_SaveInContainer(string ContainerName)
{
try
{
// Create the CspParameters object and set the key container
// name used to store the RSA key pair.
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;
// Create a new instance of RSACryptoServiceProvider that accesses
// the key container MyKeyContainerName.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
// Display the key information to the console.
//Console.WriteLine("Key added to container: \n {0}", rsa.ToXmlString(true));
string aa = rsa.ToXmlString(true);
}
catch (Exception Ex)
{
SaveExceptionInDatabase(Ex);
}
}
public string GetKeyFromContainer(string ContainerName)
{
string str = "";
try
{
// Create the CspParameters object and set the key container
// name used to store the RSA key pair.
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;
// Create a new instance of RSACryptoServiceProvider that accesses
// the key container MyKeyContainerName.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
//AesCryptoServiceProvider AES = new AesCryptoServiceProvider(cp);
return rsa.ToXmlString(true);
// Display the key information to the console.
//Console.WriteLine("Key retrieved from container : \n {0}", rsa.ToXmlString(true));
}
catch (Exception Ex)
{
SaveExceptionInDatabase(Ex);
return str;
}
}
public void DeleteKeyFromContainer(string ContainerName)
{
try
{
// Create the CspParameters object and set the key container
// name used to store the RSA key pair.
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;
// Create a new instance of RSACryptoServiceProvider that accesses
// the key container.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
// Delete the key entry in the container.
rsa.PersistKeyInCsp = false;
// Call Clear to release resources and delete the key from the container.
rsa.Clear();
rsa.Dispose();
}
catch (Exception Ex)
{
SaveExceptionInDatabase(Ex);
}
}</pre>
Bhanu Pratap Verma
31-Oct-14 3:24am
View
Deleted
Hi,
Could you please tell is that any possibility to change the key in key container.
Actually I want to change the Key with same name of the container?
Bhanu Pratap Verma
25-Sep-14 2:15am
View
<pre>I have some client requirement to save the key in key container, I have already generated key and I want to store it in the key container. Is it possible to do it?
I am using AES algorithm to encrypt and decrypt data.Please follow the below code.</pre>
<pre>public string Encrypt_AES(string clearText)
{
string text = System.IO.File.ReadAllText("D:\\ITC\\Symmetric Key\\Key.txt");
string EncryptionKey = text;
byte[] clearBytes = Encoding.Unicode.GetBytes(clearText);
using (Aes encryptor = Aes.Create())
{
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
encryptor.Key = pdb.GetBytes(32);
encryptor.IV = pdb.GetBytes(16);
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateEncryptor(), CryptoStreamMode.Write))
{
cs.Write(clearBytes, 0, clearBytes.Length);
cs.Close();
}
clearText = Convert.ToBase64String(ms.ToArray());
}
}
return clearText;
}
public string Decrypt_AES(string cipherText)
{
string text = System.IO.File.ReadAllText("D:\\ITC\\Symmetric Key\\Key.txt");
string EncryptionKey = text;
byte[] cipherBytes = Convert.FromBase64String(cipherText);
using (Aes encryptor = Aes.Create())
{
Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
encryptor.Key = pdb.GetBytes(32);
encryptor.IV = pdb.GetBytes(16);
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateDecryptor(), CryptoStreamMode.Write))
{
cs.Write(cipherBytes, 0, cipherBytes.Length);
cs.Close();
}
cipherText = Encoding.Unicode.GetString(ms.ToArray());
}
}
return cipherText;
}
#endregion</pre>
Bhanu Pratap Verma
18-Sep-14 8:38am
View
Rohan,
Error code block line(most bottom line of the code) : flashVer = flashVer.split(".")[0];
Bhanu Pratap Verma
19-Aug-14 3:28am
View
Dear Rohan, Thank you for your quick reply, I am already Implemented password hashing in my project but its client requirement
to use the password encrypt/decrypt with symmetric key cryptography.
Please help me out,, Project deadline coming soon.
Bhanu Pratap Verma
13-Aug-14 7:31am
View
Deleted
Dear all
Could you please help me out to understand the below code, whether its creating only container or its creating both key and key container?
If only creating container then how to store key in key container ?
public static void GenKey_SaveInContainer(string ContainerName)
{
// Create the CspParameters object and set the key container
// name used to store the RSA key pair.
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;
// Create a new instance of RSACryptoServiceProvider that accesses
// the key container MyKeyContainerName.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
// Display the key information to the console.
Console.WriteLine("Key added to container: \n {0}", rsa.ToXmlString(true));
}
Bhanu Pratap Verma
22-Jul-14 2:47am
View
Please do google before small problem you faced.
Please set target is blank for the button...
Bhanu Pratap Verma
22-Jul-14 2:01am
View
This is not a query, its already solved. It might be help to some one.
Bhanu Pratap Verma
22-Jul-14 0:10am
View
I already mentioned my problem, I want to show popup in middle of the page but it is coming always left most side.
Bhanu Pratap Verma
15-Jul-14 2:36am
View
Can any body help me out to get the solution?
Bhanu Pratap Verma
11-Jul-14 5:10am
View
Dear Pattrick Hu,
I am also trying Doconut support team to download the viewer, I sent 3 times email to doconut but they are not responding. Please help us.
Bhanu Pratap Verma
10-Jul-14 8:55am
View
Your help will be highly appreciated.
Bhanu Pratap Verma
10-Jul-14 8:50am
View
Hi my client using "Lotus Notes" for email, I need to export email to word and save in database.
Bhanu Pratap Verma
2-Jul-14 7:16am
View
Dear, I am creating web application and both user control are Independent.
Bhanu Pratap Verma
27-Jun-14 8:45am
View
Deleted
Thank you but I need to make url like below.
<pre lang="text">
"</pre>
Bhanu Pratap Verma
27-Jun-14 8:43am
View
I need to make the url like that.
Bhanu Pratap Verma
27-Jun-14 7:49am
View
Dear vinayoukuri,Thank you very much. Now I clear.
Bhanu Pratap Verma
27-Jun-14 7:43am
View
Dear You very much for your reply. I solved it.
Bhanu Pratap Verma
27-Jun-14 7:42am
View
Dear the format sent by client and they have only format like that. because they are using same format in multiple projects so we can not violent against him.
Bhanu Pratap Verma
27-Jun-14 7:34am
View
Thank Sergey Alexandrovich.
Can it be possible with out third party tool. Actually I need to do with c# code.
Bhanu Pratap Verma
20-Mar-14 8:28am
View
Hey sankarshan, now its working fine. thanks a lots.
Bhanu Pratap Verma
9-May-12 3:17am
View
Thank sir. I will keep in mind.
Bhanu Pratap Verma
27-Dec-11 0:16am
View
Hi Its also not working.
Show More