How do I Access database from my ASP.NET application ?
Windows Web Hosting allows you to access the database from your ASP.NET application. Please refer the below details to know how to connect the ASP.NET application with your Database.
Share This Now: [addtoany]
Watch Reseller Hosting Video Tutorial
- Procedure
- <add name=”sqlConStr” connectionString=”Data Source=serverIP; Initial Catalog=databasename;User ID=databaseusername;Password=password;” providerName=”System.Data.SqlClient”></add>
- Data Source : You can supply the IP of your Hosting server (or) You can use localhost.
- Initial Catalog : Your Database Name
- User ID : Your Database Username
- Password : Your Database Password
- Screen Shots
- Troubleshooting FAQs
- Downloads
- Related Articles
Procedure
Connection String to access the MSSQL Database :
Windows Reseller Hosting comes with Plesk Control Panel. You can use the below connection string in your web.config file to access the database from your Application.
<add name=”sqlConStr” connectionString=”Data Source=serverIP; Initial Catalog=databasename;User ID=databaseusername;Password=password;” providerName=”System.Data.SqlClient”></add>
Data Source : You can supply the IP of your Hosting server (or) You can use localhost.
Initial Catalog : Your Database Name
User ID : Your Database Username
Password : Your Database Password