Saturday, November 5, 2011

How to create a asp.net virtual application with SQL CE 4.0 in GoDaddy shared hosting account

 

I tried to create a simple asp.net WCF site using SQL CE 4.0 on my GoDaddy shared hosting account today.  I need to do the following in order to deploy the application successfully.  I’m using Visual Studio 2010 Ultimate.

1. In my WCF application, right click and choose “Add Deployable Dependencies” context menu, select “SQL Server Compact” and choose OK.  This will copy all the assemblies that I need to the bin directory

image

 

2. I use the Visual Studio build in publish feature to do the publish, something like following:

image

3. I chose IIS with Fx 4.0 in GoDaddy account.  I deployed my WCF application to a sub directory, which I need to convert to “Virtual Application” by using GoDaddy’s IiS Manager, like following:

image

4. I also need to give the App_Data directory writable permission for application in FTP File Manager

image

Finally, my application works.  I didn’t realize this is so hard.  I wish GoDaddy supports web deploy technology, which Visual Studio will be able to deploy much easier.

Have fun.