Error Message From The Provider Bad Data
Contents |
here for a quick overview of the site Help Center aspnet_regiis bad data Detailed answers to any questions you might have Meta Discuss
Failed To Decrypt Using Provider Custom Provider
the workings and policies of this site About Us Learn more about Stack Overflow
Failed To Decrypt Using Provider 'rsaprotectedconfigurationprovider'
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Export The Rsa Key Container
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Failed to decrypt using provider 'RsaProtectedConfigurationProvider' up vote 5 down vote favorite 2 In my application, that connecting failed to decrypt using provider error message from the provider the parameter is incorrect to MS Sql database, I am using Microsoft.Data.ConnectionUI And my application work in my computer. If i run this application in another computer, when i open connection dialog, i see that error: That is my code for this: try { connectionString = ShowDialogConnection(); SqlConnection connect = new SqlConnection(connectionString); connect.Open(); backgroundWorker1.RunWorkerAsync(); } catch (Exception exc) { MessageBox.Show(exc.ToString()); } string ShowDialogConnection() { string conn = ""; DataConnectionDialog dlg = new DataConnectionDialog(); DataSource.AddStandardDataSources(dlg); dlg.SelectedDataSource = DataSource.SqlDataSource; dlg.SelectedDataProvider = DataProvider.SqlDataProvider; if (ConfigurationManager.ConnectionStrings["ConStr"] != null) { dlg.ConnectionString = ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString; } if (DataConnectionDialog.Show(dlg) == DialogResult.OK) { if (dlg.ConnectionString != null && dlg.ConnectionString != "") { conn = dlg.ConnectionString; Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConnectionStringsSection csSection = config.ConnectionStrings; csSection.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider"); csSection.SectionInformation.ForceSave = true; ConnectionStringSettings csSettings = new ConnectionStringSettings("ConStr", dlg.ConnectionString, "System.Data.SqlClient"); if (csSection.ConnectionStrings["ConStr"] != null) csSection.ConnectionStrings.Remove("ConStr"); csSection.ConnectionStrings.Add(csSettings); config.Save(ConfigurationSaveMode.Modified); } } return conn; } What I need to do with this? c# .net sql-
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of failed to decrypt using provider 'dataprotectionconfigurationprovider' this site About Us Learn more about Stack Overflow the company Business Learn the rsa key container was not found more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question configprotecteddata x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Web.Config http://stackoverflow.com/questions/16187369/failed-to-decrypt-using-provider-rsaprotectedconfigurationprovider encryption using RsaProtectedConfigurationProvider - “Bad Data” error up vote 14 down vote favorite 2 I am attempting to encrypt connection string values in the Web.Config file for an ASP.NET 2.0 web application, following the procedure described on MSDN. Using the RsaProtectedConfigurationProvider, I created and exported a machine-level key on my development machine (using the -pri flag), and imported the key and granted access http://stackoverflow.com/questions/781658/web-config-encryption-using-rsaprotectedconfigurationprovider-bad-data-error on the web server. Prior to testing automatic decryption by ASP.NET, I wanted to try manually decrypting the Web.Config. I am able to manually encrypt and decrypt the Web.Config on the same machine using the -pef and -pdf parameters respectively, but manually decrypting on the web server fails with a Bad Data error message. The oddest thing is that the keyContainerName attribute in my Web.Config file seems to be ignored. If I try replacing the correct value with gibberish (no longer corresponding to any key container I have created) the encryption and decryption still work on my development machine. Any ideas? asp.net encryption rsa share|improve this question edited May 31 '13 at 16:11 Lijo 7,59140146265 asked Apr 23 '09 at 13:24 user17777 161238 I'm getting the same thing... sigh –Kane Jul 14 '09 at 2:56 1 Do you have anything in the machine.config that is overriding the values in your web.config? I was under the impression that the RSA key values get stored in the machine.config. –Harv Jan 20 '10 at 20:10 Add Remove and Clear tags in configProtectedData as pointed in the an
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help https://www.experts-exchange.com/questions/27682497/RsaProtectedConfigurationProvider'-Error-message-from-the-provider-Bad-Data.html Ask a Question Ask for Help Receive Real-Time Help Create https://social.msdn.microsoft.com/Forums/vstudio/en-US/28200df0-ac66-47a4-af01-9277cf6ae3ef/failed-to-decrypt-using-provider-rsaprotectedconfigurationprovider-error-message-from-the?forum=netfxbcl a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > RsaProtectedConfigurationProvider'. Error failed to message from the provider: Bad Data Want to Advertise Here? Solved RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data Posted on 2012-04-18 ASP.NET Microsoft IIS Web Server 1 Verified Solution 4 Comments 2,822 Views Last Modified: 2012-05-07 A few years ago I built a simple application with login form failed to decrypt using asp.net 2.0 I recall running this encryption/description script on the server as noted in this URL: http://blogs.msdn.com/b/mosharaf/archive/2005/11/17/protectedconfiguration.aspx ASPNet_regiis.exe It placed a sizeable amount of auto generated coding in the application config file as shown in the blog post above. I have had to move the application to another server and am receiving this error listed below. I don’t know what to do. Should I reintall the ASPNet_regiis.exe? Should I remove the auto coding that is allready there or will the process write over it.? Will this impact other applications on the server? Or is it directory specific? Parser Error Message: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data. Source Error: Line 40: Line 41:
message from the provider: Bad Data .NET Framework > .NET Framework Class Libraries Question 0 Sign in to vote Hello, I have been given a web.config file from a 3rd party that had the connectionstring section encrypted. The 3rd party instucted us to decrypt the file using: C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -pdf "connectionStri ngs" C:\Decrypt then we made some changes to the connection string and encrypted the file again using: C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -pef "connectionStri ngs" C:\Decrypt this has worked, however when trying decrypt the same file which we copied to a 2nd web server we get the following message when trying to decrypt the file: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. I did a google search and most answers were to export the RSA key container to the 2nd web server, but trying to do that on the 1st webserver gives this error: The RSA key was not found please advise thanks Monday, June 17, 2013 2:30 PM Reply | Quote Answers 0 Sign in to vote Hi Airwalker, Welcome to the MSDN Forum. I am afraid you can not copy the encrypted file to another computer. For more responses, you can try iis forum:http://forums.iis.net/ Best regards, Mike Feng MSDN Community Support | Feedback to us Develop and promote your apps in Windows Store Please remember to mark the replies as answers if they help and unmark them if they provide no help. Edited by Mike FengModerator Tuesday, June 18, 2013 7:54 AM Marked as answer by Mike FengModerator Monday, June 24, 2013 2:25 PM Tuesday, June 18, 2013 7:53 AM Reply | Quote Moderator Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? Privacy statement Dev Centers Windows Office More... Related Sites Visual Studio Visual Studio Integrate VSIP Program Microsoft .NET Microsoft Azure Connect Forums Blog Facebook LinkedIn Stack Overflow Twitter Visual Studio Events YouTube Developer Resources Code samples Documentation Downloads Products & ext