Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

connestring in asp.net

i just get web space on host
i want to know which connestring i use to get data base in asp.net
0
chandresh43
Asked:
chandresh43
  • 5
  • 4
1 Solution
 
nmarunCommented:
That depends on what database you want to use. Have a look at: http://www.connectionstrings.com.
0
 
chandresh43Author Commented:

but witch string i use for host site database
0
 
nmarunCommented:
What database application are you using? Is it SQL Server, Oracle, MS Access, MySQL.. etc?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
chandresh43Author Commented:
sql server 2008
host ip is
https://74.86.34.98:8443/
database is shiv

 
0
 
nmarunCommented:
Then your connection string should look something like:

Data Source=74.86.34.98,8443;Network Library=DBMSSOCN;Initial Catalog=shiv;User ID=myUsername;Password=myPassword;

Change the User ID and Password values.
0
 
chandresh43Author Commented:
it give me error
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
0
 
nmarunCommented:
Try this:

<add key="DBConnection" value="Data Source=74.86.34.98,8443;Network Library=DBMSSOCN;Initial Catalog=shiv;User ID=myUsername;Password=myPassword;Connect Timeout=200;"/>

This sets the timeout to 200 seconds.
0
 
chandresh43Author Commented:
where i use this in web.config
or else
0
 
nmarunCommented:
Yes, you add this to the web.config file. See the article below:
http://www.odetocode.com/Articles/345.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now