mercredi 4 mai 2016

DB connection on the rel server?

    <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-annaBevzenkoPortfolioMVC-20160425034146.mdf;Initial Catalog=aspnet-annaBevzenkoPortfolioMVC-20160425034146;Integrated Security=True" providerName="System.Data.SqlClient" />

- that is the connection which I use on my local machine. But when I deploy my app to the real server, there are problems with DB. For truth, I know nothing about DB-setup. As I understand, I should create a new MySql database using my hosting provider API and then change the coonection string in web.config? I've tried that way, but it doesn't work. I just dont understand what am I doing wrong?

P.S. The connection string which was generated by my hosting provider when I created a new MySql DB: <add name="DefaultConnection" connectionString="Server=MYSQL5017.Smarterasp.net;Database=db_9fcf5d_default;Uid=9fcf5d_default;Pwd=<my_password>;" providerName="System.Data.SqlClient" />.

Aucun commentaire:

Enregistrer un commentaire