You should change the connection string (if needed) in the web.config file and publish it via FTP client or you could inculde it in the project and change the connection string on the server.
For the database, it depends on your hosting provider if the extarnal connections are enabled then you could use the SQL Management Studio. IF not, then you should use the hosting provider control panel.
Regards
WindowsHostingASP.NET - My favourite site for ASP.NET hosting information.
HowtoASP.NET - Free ASP.NET tutorials with examples and source code.
Member
7 Points
49 Posts
publish site using the with web config and database
Feb 25, 2014 01:01 PM|earlcools|LINK
I tried to publish my ASP.Net site in VS2012. The pages that do not require login and the database works fine.
However, I dont how to publish the web config file and the database.
Any help please
Star
11650 Points
3462 Posts
Re: publish site using the with web config and database
Feb 25, 2014 01:24 PM|HostingASPNet|LINK
Hello,
You should change the connection string (if needed) in the web.config file and publish it via FTP client or you could inculde it in the project and change the connection string on the server.
For the database, it depends on your hosting provider if the extarnal connections are enabled then you could use the SQL Management Studio. IF not, then you should use the hosting provider control panel.
Regards
HowtoASP.NET - Free ASP.NET tutorials with examples and source code.
Member
7 Points
49 Posts
Re: publish site using the with web config and database
Feb 25, 2014 03:30 PM|earlcools|LINK
sorry need a little more help
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-myDatabase-20140109095318;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-myDatabase-20140109095318.mdf"
providerName="System.Data.SqlClient" />
<add name="myDBConnectionString" connectionString="Data Source=.;Initial Catalog=myDB;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
what do I change?
Participant
1100 Points
400 Posts
Re: publish site using the with web config and database
Feb 27, 2014 02:12 AM|dyyo|LINK
hi there,
you need to alter your connection string
Please see http://faq.asphosthelpdesk.com/article.php?id=53
Dyyo - Microsoft Recommended ASP.NET Hosting