The following forum(s) have migrated to Microsoft Q&A (Preview): Azure App Service - Web Apps, Azure App Service - Web Apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Unsecured Passwords Format Detected. The Membership Provider that contains the unsecure passwords format is: MySQLMembershipProvider. The obsoleted password format is: Clear. RRS feed

  • Question

  • I have an ASP.Net MVC site using Entity Framework which is running fine on my local PC. But when I upload it on Azure Web App and run, I get following error:

    Unsecured Passwords Format Detected. The Membership Provider that contains the unsecure passwords format is: MySQLMembershipProvider. The obsoleted password format is: Clear.

    Problem is I am not using MySQL database at all. The database I am using in this MVC application is SQL Server 2014.

    Following is the connection string on my local PC:

    <add name="MyEntities" connectionString="metadata=res://*/DAL.MyDB.csdl|res://*/DAL.MyDB.ssdl|res://*/DAL.MyDB.msl;

    provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=MyDB;

    integrated security=True;multipleactiveresultsets=True;application name=EntityFramework&quot;"

    providerName="System.Data.EntityClient" />


    And following is the connection string on Azure:

    <add name="MyEntities" connectionString="metadata=res://*/DAL.MyDB.csdl|res://*/DAL.MyDB.ssdl|res://*/DAL.MyDB.msl;

    provider=System.Data.SqlClient;provider connection string=&quot;data source=mydb.database.windows.net;

    User ID=mydb_admin;Password=M3@#0l1Mk%uDc;initial catalog=MyDB;integrated security=True;

    multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />


    As you can see the difference is only between SOURCE, USER and PASSWORD in both strings. One thing you should note is that there is no SQL Server 2014 on Azure as I am using Azure DB or SQL DB (what ever it is called). Could it be due to this?

    How can I fix this issue?

    Friday, October 5, 2018 6:17 PM

All replies

  • Ok I just changed

    Integrated Security = True

    to

    Integrated Security = False

    and it fixed the issue.

    Friday, October 5, 2018 6:25 PM
  • Hi Muhammad, we are glad you were able to resolve your issue.
    Friday, October 12, 2018 10:27 PM
    Moderator
  • In case anyone else gets this issue,

    Connection string issues seem to be the main cause of this, but in my case the connection string was fine.

    After some digging, The MySQLMembershipProvider came from machine.config, which did indeed have passwordFormat="Clear".

    To fix that, I added this to web.config:

      <system.web>
        <membership>
           <providers>
               <remove name="MySQLMembershipProvider" />
            </providers>
        </membership>
      </system.web>
    Note: I wasn't using a custom membership provider, but if there is one you will probably want to run <clear /> just before <add ... />

    Monday, June 17, 2019 1:20 PM