ASP.NET development workstation - suggestions?

D

deko

I'm developing my first ASP.NET web application (that will use SQL Server
for a database). I'm looking for some tips on setting up my development
workstation (WinXP Pro). I've already installed VS.NET 2003 Enterprise
edition, but what about a database? The web server my app will be FTPed to
when complete is WS03/IIS6/SQL Server. So how do I develop locally? Do I
need a WS03 box with SQL Server to develop on? I have a test web server on
my local network that has SQL Server installed - should I connect to that
database for development purposes? How? Any suggestions appreciated.
 
R

Raghavendra T V

Hi Deko,

Yes , you start your development by connecting your application to the SQL
server
on your local network.

Once you are ready you can move the application to Remote server which has
WS03/IIS6/SQL Server

But remember never hardcode any values like DB name , Server name , IP's
etc..in your code..try to parameterize them
[ by moving them into a config file (web.config) ] which will later help you
in changing the details after you move your application to different
machine.


Hope this helps you.

Thanks
Raghavendra
 
D

deko

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?
But remember never hardcode any values like DB name , Server name , IP's
etc..in your code..try to parameterize them
[ by moving them into a config file (web.config) ] which will later help you
in changing the details after you move your application to different
machine.

Thanks for the tip.
 
M

Mark Rae

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.SqlClient 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.

<configuration>
<appSettings>
<add key="SQLConnectionString" value="Data Source=devmachine;Initial
Catalog=devdatabase;User ID=devuser;Password=devpassword" />
</appSettings>
</configuration>

This connection string is then availalble to ASP.NET via the code:
System.Configuration.ConfigurationSettings.AppSettings["SQLConnectionString"])

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.

<configuration>
<appSettings>
<add key="SQLConnectionString"
value="/jrER8bDAM8VfdvPuMkGw033IhEYg2c9voBQcmL3f6VKoj3VZ4co9uZU8sHunQwCN3oL2uGCbDbC/9Rrix5yHdfzYXXGisa2"
/>
</appSettings>
</configuration>
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top