ASP.net DB Question

Capodecina
Permabanned
Joined
31 Dec 2003
Posts
5,172
Location
Barrow-In-Furness
Hey guys.

When kaking an ASP.NET website do you create the database inside your website through Visual Studio, or do you set it up seperately and manage it through something like SQL Management Studio?
 
That's what I have done previously but just wanted to check.

Thanks :)

Another question. I've never had to upload an SQL database and website that i've developed to web hosting. Any tips on the easiest way to do this?

I'm with tsohost if it's any help. It was a nightmare last time and I had to have a member of the staff do it for me.
 
Hmmmm, hard to offer tips as such because the host we use (Rackspace) have an all in one package.

My SQL Management Studio has a connection to our Rackspace server, so, any databases I develop are done directly to the server.

When it comes to uploading my app, I just create a new site in IIS, copy my files over, set up a virtual directory to handle the .Net calls and it's done.
 
Now i've heard this mentioned before about different directories and the .NET stuff but i've got very little understanding. Is there anything I can read?

It's only important if you have more than 1 ASP.NET site on your hosting isn't it?

Regarding the DB, that makes sense. Create the DB online, remotely connect to it and configure it through Management Studio. However, what about testing this locally?

What I mean is, I'd imagine you'll create a website locally, and the DB to test everything? Or do you use your hosted database from the go?
 
To be honest I wish I could offer some reading material, but done it for so many years I honestly can't think what the most sensible step would be.

But to answer your question, we have about 500 .Net web apps running at any one time, each have their own indepent directory for IIS to point to, and each have a Virtual Directory to run the .Net stuff on there.

Most require a BIN directory to put the DLL inside for any code-behind calls, although we do have a handful of sites where this isn't necessary as they are only .aspx files and/or all the necessary code is on the page itself (in other words, no code-behind, so no compiled DLL required).

As for testing the database locally, there has been a few occasions (but not many) where the database has been developed locally and the web-app pointed to, say, my machine where the database is held. Once we've gone live with the app, it's a case of just uploading the database to our remote Server, and changing the Connection String in the web.config file from 127.0.0.1 to the server IP Address (and the username and password of course) and it's been a seamless transition.

Yes the web app itself is created locally, when it enters testing stage, it's uploaded to a dedicated machine here in the office (a simple XP machine with IIS running) for staff to test while we carry on with the next project. Doing it this way frees our development PC's from getting a hammering and keeps it out of a live environment.
 
Back
Top Bottom