website and database on same server

G

Guest

Hi,

I have an asp.net 2.0 website and a sql database on the same server. In the
web config file I have set up a connection to the database using this
connection string....

connectionString="Data Source=myServer;Initial Catalog=MyDatabase;Persist
Security Info=True;User ID=LoginUser;Password=LoginPassword"
providerName="System.Data.SqlClient" />

Should the server be referenced using "localhost" or something? Would that
be more efficient? If I use the server name does that incur a network
overhead as asp.net uses the network to find the server without knowing it
doesnt actually have to because the database is on the same server as the
website.

I suppose the question is what it the best way to set up a connection string
to reference a database on the same server as asp.net.

thanks
 
G

Guest

Thanks, would there be any performance benefit of using (local),"." or the IP
address over using the server name?

I thought by maybe using (local) or "." that that would improve performance
because asp.net would know the database is on the same server rather than
using the network to find the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top