Sitefinity ASP.NET CMS - Content Management System

KB Article

Discount ASP.NET Hosting Provider - ID#853
Rating:
Last Modified: 2/1/2008
KB Home > General >

Article information

Article relates to

 Sitefinity  3.x

Created by

 Joseph Anderson


Introduction

This article will give you instructions for deploying your Sitefinity Web site shared hosting plan. Although there are many other hosting providers that support Sitefinity, we used Discount ASP.NET because their deployment process is very simple to use and Sitefinity friendly. This article will briefly discuss creating a Web site, but it is not meant to give technical instructions on creating one from scratch.

License Keys

If you are using the Community Edition, please skip to section “Signing up for Discount ASP.NET.”

For the Standard Edition, you need to generate a license key and place it in the project’s Sitefinity folder. To do so, please follow these instructions:
1.    Sign in to your Client.net account.
2.    In the left pane, click Licenses.
3.    Follow the on-screen instructions.
4.    After you complete step 3, a license file will be e-mailed to you.
5.    Save the LicenseFile.xml file in the \Sitefinity3.x\WebSites\[YourWebsite]\Sitefinity folder.
6.    Restart the application to ensure no more trial messages appear.
Creating the Site

Note that the Sitefinity module providers cannot get their database objects created in medium trust environment and you may get errors. To prevent this, you need to enforce database upgrade in full trust environment, in your local website. Creating at least one content item in each module before uploading the upgraded database to the hosting server will initialize all modules in the database.

We would recommend setting up your database’s admin first and creating a home page with some filler text, just so you can ensure that your site is working properly when you visit it. Ideally, you should create a theme and master pages on your local machine. Then, create the content (pictures, text, etc.) on the page live. For more information on this subject, follow the instructions in the User Manual, which can be found in the Sitefinity installation folder.

Signing up for Discount ASP.NET

You will first order a basic package and then an SQL 2005 database. Here are the instructions for signing up:
1.    Go to this URL: https://www.discountasp.net/signup/package.aspx
2.    If you have a domain, complete the info on the left hand side. If you do not have one, you must buy a domain for $15 per year.
3.    On the next screen, complete the billing info.
4.    Once you sign-up, you need to order an SQL 2005 database.
       Go to Account Management > Order Addons:

5.    Order an SQL 2005 database. Note that it will be activated in a few hours’ time.
6.    Once this process is complete, you should attach the .mdf file from your local installation to their
       SQL Server.
Preparing and Copying the Files

While you are waiting for Discount ASP.NET to activate your database, you could delete the skin files in the RadControls folder in your root directory. Although this is optional, deleting these skin files would save some disk space on the server and your site would be uploaded faster. If you have created a user control using one of our UI controls, make sure that the skin you are using is in the appropriate folder.
For more detailed instructions about which files are needed on the server, please see this KB article.

When you have finished preparing your files, copy the Web site to their server. Do not upload the web.config file yet because you need to make some changes as stated further in this article.
To copy your files, use an FTP client such as FileZilla.

Attaching your Database

After you have copied the files and your database has been activated by Discount ASP.NET, you need to copy the contents of your Sitefinity SQL 2005 Express Database to the Discount ASP’s blank SQL 2005 Standard Database that you purchased. This process is known as attachment, even though you are not actually connecting a database to their server. Here are the instructions for attaching your database to their server:
1.    Sign in to your account.
2.    Go to SQL Tool Suite:

3.    Type \App_data\sitefinity.mdf into the Database attachment box and click the Attach MDF File
     
  button:
4.    You will see a success message on the screen.
Web.Config

You need to make a few changes to the application web.config file to deploy Sitefinity on the Discount ASP.NET server.

First, you need to change the connection string in your web.config file because the location of your database will change for your local machine to their server. Here are the steps for changing your connection string:
1.    Sign in to your account at Discount ASP.NET
2.    Go to MS SQL 2005 Databases:

3.    Copy and paste the connection string into your web.config, using the example above as a
        guideline. Here is a screenshot from our sample account:

4.    On the Discount ASP control panel, click Login Manager.
5.    On the Login Manager page, click change password:

6.    Change the password to admin. This should correspond to the password portion of the connection
        string.
7.    This is what your connection string looks like on your local machine:
<connectionStrings>
        <add name="Sitefinity" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Sitefinity.mdf" providerName="System.Data.SqlClient"/>
</connectionStrings>

This is what it should look like on the server:
<connectionStrings>
        <add name="Sitefinity" connectionString=" Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_421853_sitef;User ID=SQL2005_421853_sitef_user;Password=admin;" />
</connectionStrings>
Basically, everything after connectionString changes to what Discount ASP gives to you.

Second, you need to turn off healthMonitoring
                    <healthMonitoring enabled="false" heartbeatInterval="0">

Third, you need to turn off page and module workflow
                 
                    allowPageWorkflow="false" 
                    allowWorkflow="False"

Make sure the following lines are commented out: 
                     <!--add name="SitefinityXml" securityProviderName="" type="Telerik.Lists.Data.XmlProvider,
                     Telerik.Lists.Data" dataFile="~/App_Data/Lists.xml" visible="true"  /-->  

This next part is optional. You can change the errors mode, so instead of your users seeing a “Error in Applicaton” message, they can see a “Web page down for maintenance” message. In the application web.config, change this portion:
<customErrors mode="Off"
To this:
<customErrors mode="RemoteOnly" defaultRedirect="~/customerrorpage.html"/>
In your Web site, create an .html page with the customererrorpage.html title. Place any text there as necessary.
Finally, upload the application web.config file to your server.

Editing your website

If you go to your Web site at http://www.mysite.com/, you can see it the way your end users would see it. If you go to http://www.mysite.com/sitefinity/admin/ , you are redirected to the login page.


Article Comments

Gabe Sumner, 4/2/2008
DiscountASP.NET also has a "Scheduled Task" tool that can be used to automate a request to your web site every 15 minutes. If your web site is not accessed for 20 minutes it will be unloaded from memory and recycled. When this happens, the next web request will result in it being re-compiled and re-loaded into memory. This will take several seconds and result in a slow page load. To prevent your web site from being unloaded from memory, use a "Schedule Task".


Please Sign In to rate this article or to add it to your favorites.