Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Thursday, February 04, 2010

When using a shared hosting provider, and only have access to 1 MSSQL database, it is possible to have 2 different web applications hanging off the same database.

The users seem to be different, however the roles are across all applications.

In VS2008, press the hammer and world icon:  as long as the web.config is pointing to the live database, you can change the live data.

image

And if you’ve a different project eg

image

You can do the same thing and connect to the same live database.

image

Here are roles from 2 different webapps.  Coach and runner;  then administrators, power users, and users.

App_Data Database

This was useful when sending the code to others, so they don’t have to manually make a new database.

<add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=True;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;User Instance=True"  providerName="System.Data.SqlClient" />

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview