My app is working on my local system with the vs2008 development server. It's an asp.net app and I added the line:
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
So it works fine on my system. But I can't get it to work on shared hosting. I have uploaded all the sqlce 3.5 dlls to the bin directory. I am stuck at the error:
Access to the database file is not allowed. [ File name = ]
There actually is a file name in the connection string, and I set the permissions wide open on App_Data and the file to test this.
(I know sqlce 3.5 is not recommended for asp.net, but it is not the main site database but is used for a setup database utility to be installed for a windows app.)
Jason Short - 08 Jan 2008 23:13 GMT
> So it works fine on my system. But I can't get it to work on shared
> hosting. I have uploaded all the sqlce 3.5 dlls to the bin directory. I am
> stuck at the error:
> (I know sqlce 3.5 is not recommended for asp.net, but it is not the main
> site database but is used for a setup database utility to be installed for
> a windows app.)
You can't set that on a shared host. The shared hosting provider would have
to do it for you, and they won't. It is against the TOS for SQL CE.
"not recommended" is putting it lightly. By default it will not run. If
you have to specifically override the default behavior, and even then MS
says to do it at your own risk. A shared hosting provider is not going to
let you do that.
Use another file based database engine for .net.