Parallels Plesk Panel connecting to database server connection string
I am using Entity Framework to access the data from my database. It's an
MVC application and works fine locally. When I deploy the application on
hosting (Parallels Plesk Panel, MS hosting) I get problems with accessing
the SQL server instance. There are options in the cPanel which hold
connection strings. LocalSqlServer:
data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=true
xContainer:metadata=res:///Models.x.csdl|res:///Models.x.ssdl|res://*/Models.x.msl;provider=System.Data.SqlClient;provider
connection string=
When I upload the site xContainer is generated alone. I found the sql
server's instance name and applied it to the data source. In my web.config
file I am using the the xContainer. The code after this paragraph is what
it seems logic to me to add after the connection string= in the
xContainer.
I have tried this with various properties. Data source, initial catalog,
and the other info are filled into the conn string (here I am showing only
/).
Data Source=x;Initial Catalog=/;Persist Security Info=True;User
ID=/;Password=/;MultipleActiveResultSets=True providerName=
The error I receive is that the sql server instance cannot be found. If I
add the last piece of code to the container it tells that I don't have a
providerName, After adding a providerName the string is deleted to the
starting xContainer string:
metadata=res:///Models.x.csdl|res:///Models.x.ssdl|res://*/Models.x.msl;provider=System.Data.SqlClient;provider
connection string=
No comments:
Post a Comment