Notes On Publishing Your CO5027 Website If You Haven't Worked From Scratch With A Live SQL Database
Notes On Publishing Your CO5027 Website If You Haven't Worked From Scratch With A Live SQL Database
If any of the above don’t apply you will need to verify your web site is correct with your tutor.
Stages
1. Create a live SQL database ready to receive your existing databases.
2. Activate your CO5027 folder on the web server.
3. Copy your databases over to the live SQL server database.
4. Modify your websites web.config file to work with the live SQL database and test it from
your desktop.
5. Copy the website into the CO5027 folder in your webspace and test it from there.
j) Right click your database and choose New Query. An SQL Query window will open. Keep SQL
Management Studio open for the rest of this stage.
k) Using Windows Explorer, find the SQL file from step e) and open it with Notepad.
l) Select all the SQL statements and copy them to the clipboard (Ctrl-A and Ctrl-C).
m) Switch to SQL Management Studio and paste the SQL into the SQL Query window.
n) Click the Execute button. The SQL query should run and show one or more messages saying
something like ‘1 record affected’.
o) Clear the SQL Query window and repeat steps k) to n) for the SQL file from step g)
p) Your databases have now been published to your live SQL database and you can close SQL
Management Studio – you don’t need to save the Query.
d) Now add the following lines immediately after the <system.web> tag:
<membership defaultProvider="RemoteSqlProvider">
<providers>
<clear/>
<add name="RemoteSqlProvider"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Encrypted"
maxInvalidPasswordAttempts="3"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
type="System.Web.Security.SqlMembershipProvider,
System.Web,Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
e) Save your web config file and run your website. It should work properly. You should be able
to see your data on your pages and you should be able to login.
You may delete the App_Data folder on your web space as the local databases aren’t needed on the
live site.
Warning: Don’t delete the CO5027 folder on W: - your web space will stop working even if you
recreate it.