"deko" <ww************ *************** ****@nospam.com > wrote in message
news:E3******** **********@news svr29.news.prod igy.com...
Yes , you start your development by connecting your application to the
SQL
server
on your local network.
Can you point me to any information about how to do this?
When you want ASP.NET to use ADO.NET to interface with SQL Server, you will
typically use the System.Data.Sql Client namespace, and the "standard" way of
telling ADO.NET where the SQL Server is and how to connect to it is by means
of a connection string. A popular method of storing this information in
ASP.NET is in the Web.config file e.g.
<configuratio n>
<appSettings>
<add key="SQLConnect ionString" value="Data Source=devmachi ne;Initial
Catalog=devdata base;User ID=devuser;Pass word=devpasswor d" />
</appSettings>
</configuration>
This connection string is then availalble to ASP.NET via the code:
System.Configur ation.Configura tionSettings.Ap pSettings["SQLConnectionS tring"])
The above string assumes that you have SQL Server installed on a machine
called devmachine with a database called devdatabase and a user called
devuser with a password of devpassword. Obviously, you will change these
various elements to reflect your own development environment.
Then, when you're ready to deploy your ASP.NET project to your remote
server, you will simply change the values in the connection string so that
ADO.NET will point at your live SQL Server instead of your development one.
Also, of you're concerned that the connection string is plain text, encrypt
it e.g.
<configuratio n>
<appSettings>
<add key="SQLConnect ionString"
value="/jrER8bDAM8VfdvP uMkGw033IhEYg2c 9voBQcmL3f6VKoj 3VZ4co9uZU8sHun QwCN3oL2uGCbDbC/9Rrix5yHdfzYXXG isa2"
/>
</appSettings>
</configuration>