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

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

 

Screen Shots

Refer Screen Shots

Troubleshooting FAQs

Mysql Database Troubleshooting FAQs

Mysql database option is not showing to create a database for my domain ?

Solution :

Please note that if you are not allocating MYSQL database for the service plan of the domain,then you will not able to see database icon.

To overcome this,you need to allocate the MYSQL database and database quota for your service plan of your domain and sync the domain with the plan.

To change the resource of your service plan.

[1] Login to your plesk control panel.
[2] Click on service plan.
[3] Click on service plan name of that domain.
[4] Allocate MYSQL database and database quota.
[5] Click on ok.

To sync the plan with your domain.

[1] Login to your plesk control panel.
[2] Click on the subscription name
[3] Click on sync.

Downloads

Related Downloads

Related Articles