Wednesday, November 18, 2009

Installing Sitefinity on Shared Hosting with Medium Trust

My recent project required use of CMS, after researching i zeroed down on Sitefinity. I have been a fan of Telerik components so i decided to go with Sitefinity as they have all the features i needed and their support is fantastic.
For Sitefinity to work with its full functionality you need to host it with Full trust, but i decided to host it on a shared hosting for saving on cost and reliability of my host. I hosted with HostingGuru.com.

Here are the steps to deploy Sitefinity to your shared hosting with medium trust.
In medium trust you cannot use HealthMonitoring and Workflow. Depending on your host provider there could be issues related to RadUpload - uploading of files, uploading of zip, RadProgressArea should be also disabled.
Before setting the trust level to medium, make sure you modify the application web.config file as
described below:

1. Disable page and module workflow *:

allowPageHistory="false"
allowPageWorkflow="false" name="Sitefinity"
type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" />



securityProviderName="" allowLocalization="False"
allowVersioning="True" allowWorkflow="false



securityProviderName="" allowLocalization="true"
allowWorkflow="false"



applicationName="/Blogs" allowVersioning="True"
allowLocalization="False" localizationProviderName=""
allowWorkflow="false"


2. Disable health monitoring:



3. Make sure the following lines are commented out:



4.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 Web site. Creating at least one content item in each module before uploading the upgraded
database to the production server and setting the trust level to medium will initialize all modules in the
database. The Sitefinity Search service does not work in medium trust environment.

RadMemoryOptimization requires ReflectionPermission in order to operate correctly. This means that
in normal circumstances you will have to run your application with Full Trust permissions set, unless
you create a custom security policy, which allows ReflectionPermission. If you are unable to set Full
Trust or custom security policy, the solution is to put the Prometheus controls assembly in GAC.

The Upload Control functionality is not available in medium trust environment. You need to upload the
controls manually through the application web.config file.The upload of .ZIP files in the Images & Documents module is currently not possible in medium trust environment.

5. Now copy all your files to your host

6. Give App_Data read and write permissions for ASP.Net/Network Service.

7. You can ask your host to attach the database to Sql Server, and you can then change the connection string . web.config file.

8. Log on to the Administration control and Select Administration Tab -> Services
Select Search and select "Start Indexing" on the right pane. This will index your website and now you can use the search engine.

Hope this helps, here is the sample website i have deployed http://www.planetfireworks.com/





Friday, November 13, 2009

Moving from one hosting provider to a new one

Moving from one hosting provider can be a headache for novice users, who are not aware of how to update name servers.
Follow these steps and you will save yourself some frustration:
1) Find a hosting provider after doing some good research, don't jump on the cheap bandwagon. Do some research, view feedbacks from other users. The most important thing for any hosting provider is their customer service, so make sure your hosting provider has a online chat, phone number to get in touch during emergency.
2) Once zeroed down on your new hosting provider, sign up for an account.
3) You will receive the new name servers such as ns1.yourhostingcompany.com and ns2.yourhostingcompany.com along with the IP's.
4) Before you update the name servers with your domain registrar, make sure you download your emails and webfiles from your current hosting account.
5) Login to the control panel of your domain registrar, this is where you have registered your domain name. Don't confuse this with your hosting account.
6) Go to the namserver section in your control panel and replace the old entries with the new name servers.
7) Save the settings, usually it takes few hours to update the DNS servers around the world, but max can be12 -48 hours for the DNS around the world to refresh.
8) Check your website every few hours, once you can see your new server, you can stop your account with your old hosting provider.


Any questions just post it!