1

My connection string on local host is

<connectionStrings>
    <add name="DbModels" 
         connectionString="metadata=res://*/Models.DbModels.csdl|res://*/Models.DbModels.ssdl|res://*/Models.DbModels.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=C:\Users\mcc\Documents\consultations.mdf;integrated security=True;connect timeout=30;MultipleActiveResultSets=True;App=EntityFramework&quot;" 
         providerName="System.Data.EntityClient" />
</connectionStrings>

and it's working just fine.

But when I deployed my website to somee.com and tried to update the connection string in the web.config, I failed to get it to work

somee connection string is this:

workstation id=Consultations.mssql.somee.com;packet size=4096;user id=Samer_61122_SQLLogin_1;pwd=///;data source=Consultations.mssql.somee.com;persist security info=False;initial catalog=Consultations

I need to know how should be the proper connection string to work

1
  • Ask the somee.com support ?!? Commented Jun 8, 2020 at 11:04

1 Answer 1

1

Create your database in somee.com, site will generate a connection string like this:

workstation id=xxxx.mssql.somee.com;packet size=4096;user id=yyyy_SQLLogin_1;pwd=zzzz;data source=xxxx.mssql.somee.com;persist security info=False;initial catalog=xxxx

Try like this for EF:

metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=xxxx.mssql.somee.com;initial catalog=xxxx;persist security info=True;user id=yyyy_SQLLogin_1;password=zzzz;MultipleActiveResultSets=True;App=EntityFramework"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.