Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 29, 2012 12:30 AM by Decker Dong - MSFT
Nov 28, 2012 09:30 AM|LINK
I created my EDM and generated a database in my SQL Server 2008 Express edition, which is installed locally. It run fine locally but after hosting it i got the following error
The underlying provider failed on Open.&Err=Exception of type 'System.Web.HttpUnhandledException' was thrown.
My connection string are
add name="MobileShawarmaEntities" connectionString="metadata=res://*/Data_Access.MobileShawarma.csdl|res://*/Data_Access.MobileShawarma.ssdl|res://*/Data_Access.MobileShawarma.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MobileShawarma.mdf;Integrated
Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
Please do any one have answer to me?
Nov 28, 2012 12:40 PM|LINK
As you are using the AttachDbFilename with your connection string, if your hosting environment does not have SQL Express installed, you cannot use this feature. Verify that you have SQL Express (any version) installed on your host. Otherwise, you will
need to add the database to an actual SQL Server instance on your host.
If your host has SQL Express installed, then you may need to verify the Data Source and determine if Integrated Security is allowed within the hosting environment.
Nov 29, 2012 12:30 AM|LINK
It run fine locally but after hosting it i got the following error
There must be something wrong with your connection string——I think you can just try to modify that by trying to connect to the Server Explorer first in "View"=>"Server Explorer" and create the connection to the remote SQL Server and copy the connection string
from the panel.