Azure SQL Server CE Initialization string format does not meet specification starting with index 0

I developed a C # .Net web application that includes Simple Membership and points to the SQL Server CE database located in the App_Data directory. When I launch the site locally, this is normal, and I can register and enter the application in order. The problem is when I publish it on Azure. When I try to log in, I get the following error:

The format of the initialization string does not match the specification starting at index 0

So, I worked a little, but I can not find a specific solution to this problem. Fragments of my web.config contain the following:

<appSettings> <add key="webpages:Version" value="2.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="PreserveLoginUrl" value="true" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="enableSimpleMembership" value="true" /> </appSettings> <DbProviderFactories> <clear /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> <remove invariant="System.Data.SqlServerCe.4.0" /> <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> <connectionStrings> <add name="MySQLOrderTrackerConnectionString" connectionString="XXXX;Database=OrderTracker;uid=XXXX;pwd=XXXX" providerName="MySql.Data.MySqlClient" /> <add name="MembershipConnectionString" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=|DataDirectory|\Membership.sdf;password=XXXX" /> <add name="DefaultConnection" connectionString="DefaultConnection_ConnectionString" providerName="System.Data.SqlClient" /> </connectionStrings> 

What is also not clear is that when publishing to Azure, the DefaultConnection connection string appears. Where is it from? But the main problem here is how to solve the initialization problem. Any ideas?

+4
source share
1 answer

You probably decided to do this if you did not:

It looks like you have a problem with a real connection string. Can you pass (excluding password, hostnames) the actual Azure connection string?

if not, use them as recommendations:

0
source

Source: https://habr.com/ru/post/1482779/


All Articles