Last post Sep 23, 2013 05:18 AM by Dave04
Sep 20, 2013 05:16 AM|Dave04|LINK
I have created a simple web site which uses the security elements of the ASP.NET web site (i.e. Users, memberships, etc.) to create users, hash passwords, etc.
I am now creating a winforms application to enable users to be created from a desktop application that connects to the same Sql database.
The application I will be 'plugging' into already has an appConfig file which I am able to add the following code to:
<add name="MembershipDbSqlCeProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="UsersDbSqlCeConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordFormat="Hashed"/>
I can get this to work fine in a standard WinForms application but the application I am developing to 'plug-in' to has an encrypted connectionstring and doesnt seem to have a connectionstring name (which is required as a parameter for the membershipprovider).
Has anyone ever came across and overcame this issue? I basically need to use the appConfig already in the WinForms application, I can add to it however I cannot change the way in which the data is passed to and from the database so cannot change the connection string. The connection strings property in the appConfig looks something like below.
I have removed some of the values from above.
Any help would be much appreciated as I am new to this field.
Sep 22, 2013 09:54 PM|Lisa Zhang - MSFT|LINK
According to your description, your problem is about encrypting connectionstring in windows forms application. This forum is about web forms application.
So in order to support you in a better way, please try to post your question in the windows forms forums.
Some useful resources about encrypting connectionstring please try to refer to the following links:
# Encrypting windows application connection strings
# Not clear about encrypting connection string in app.config
# Encrypt ConnectionString in a *WINFORMS* App
# Connection string security in .net desktop application
Sep 23, 2013 05:18 AM|Dave04|LINK
Thanks Lisa - I had already posted in the WinForms forum and it was suggested to try the ASP.NET forums as that community may be able to assist better as I was using the ASP.NET security model.