SQL CE azure connection

2019-02-27 11:18发布

问题:

I am using azure to publish an asp.net application, when I publish locally it works fine, but on Azure all things related with database isnt showing up and getting "The page cannot be displayed because an internal server error has occurred."

Wondering if it could be somthing wrong with my connection string.

http://webly.azurewebsites.net/

App_Data folder with webly_data.sdf Bin: webly.dll ... Simple.Data.SqlCe40.dll

<connectionStrings>
    <add name="webly" connectionString="Data Source=|DataDirectory|\webly_data.sdf" providerName="System.Data.SqlServerCe.4.0" />
</connectionStrings>

I am using sdf, and dont know how azure leads with that...

------ PROBLEM SOLVED -------

I did the following:

  1. Configure the website (at Azure Management)
  2. Put the connection string there as Custom

Dont know exactly why this is required, maybe it was ignoring my connection strings in my web.config.... Thanks to who answered here.

回答1:

I did the following:

  1. Configure the website (at Azure Management)
  2. Put the connection string there as Custom

Dont know exactly why this is required, maybe it was ignoring my connection strings in my web.config....