My total goal would be to upload a simple ASP.Internet site produced in C# and taking advantage of a SQLEXPRESS DB to some host company via FTP.

I realize will be able to get all my ASPX, .CS, master pages and image files quickly and easily. Problem I'm getting and reason I'm here's because I cant simply pop my MDF file into my hosting provider's (Verio Hosting) site.

On the internet I went across a publish by Scott Gu. In the publish he authored about transforming a MDF right into a .SQL file which you'll execute from an internet site. See below....

In case your hoster doesn't have functional HTML web admin tool for permitting you to definitely easily manage your SQL database, you'll be able to also just write an easy ASP.Internet page that you simply FTP (together with your .SQL file) for your web-site after which hit to browse the .SQL file around the server in as text, after which pass it as being a string to ADO.Internet to complete. This can give you an identical result because the query analyzer above - and fully make your database for you personally.

I produced the .SQL file and i'm able to popping this .SQL file into my website. My question to everyone is how do you create that easy ASP.Internet page will be able to then hit to see, after which do anything else that Scott pointed out within the passage above????

EDIT: I discovered that will be able to just re-create my DB by remotely signing in to my hosting companies SQL server via SQL Mgt Studio. I dont do for 2 reasons 1.) It feels cheap understanding that there's a significantly cooler method of doing this, and a pair of.) I dont understand how to re-produce the ASPNETDB.MDF which i use for my user database that ASP.Internet produced for me personally.

You just need to possess the ASP page read within the .SQL file, the industry number of SQL queries to become performed. Loop although the items in the file, running each query consequently. The queries can create the db schema, place the information, etc.

My question to everyone is how do you create that easy ASP.Internet page which i may then hit to see, after which do anything else that Scott pointed out within the passage above????

Which area of the process not understand?

It is simply a normal *.aspx web form you need to do all the operate in the code behind.

BTW, when delivering instructions to SQL Server via ADO.Internet, bear in mind that ADO.Internet does not understand "GO" claims in case your script consists of them, you'll either need to parse them out and submit batches accordingly, or arrange to invoke an order-line tool like sqlcmd out of your page, in case your host company enables it.