Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania
Viewing all articles
Browse latest Browse all 65225

Asp.net MVC Hosting - SQL Server

$
0
0

So I'm moving my Asp.net mvc web app over to Asphostportal shared hosting. This is the first time I've deployed an MVC app. I have been using SQL Server 2008 Express for the development database. Asphostportal provides SQL Server 2008 or MySQL hosted databases.

A couple questions:

1.Can I use the mdf files from my Express database with the new Non-Express prodcution DB?

2.I'm having issues with my connection string. I changed the original web config connection string from this

<add name="Database1ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True"
   providerName="System.Data.SqlClient" />

to this:

<add name="Database1ConnectionString" connectionString="Data Source=.;Integrated Security=SSPI;Initial Catalog=ProdsDB"
   providerName="System.Data.SqlClient" />

Now I'm getting this error: Cannot open database "ProdsDB" requested by the login. The login failed

I have setup the database called "ProdsDB" through the Asphostportal control panel and added one user. Do I need to add the credentials somewhere in the connection string?

 

 


Viewing all articles
Browse latest Browse all 65225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>