I'm attempting to develop a small website project using VWD 2010 Express with a SQL Server CE 4.0 database. To check out ability to publish the website, I've created a simple one page project with a one table database. The page contains a Gridview and
DataSource; it was easy to build and works on my development system without error.
Publishing it is another story! I have been working on publishing it at my host provider for about a month. I have an open thread on the SQL Server Compact forum, but despite the suggestions I have received I cannot successfully publish it. There have
been many variations; this is the current status of the project.
After building the project the bin folder contains the following files.
myProj.dll
myProj.pdb
myProj.xml
To the project's bin folder I have added the System.Data.SqlServerCe.dll file and two folders, amd64 and x86. Each one of these folders contain the following files.
sqlceca40.dll
sqlcecompact40.dll
sqlceer40EN.dll
sqlceme40.dll
sqlceqp40.dll
sqlcese40.dll
Both the amd64 and x86 folder also contain a folder, Microsoft.VC90.CRT. Both the VC90.CRT folders contain the following files.
Microsoft.VC90.CRT.manifest
msvcr90.dll
README_ENU.txt
After publishing the project I check the files and structure of the bin folder on the host server. It is identical to bin folder on my development system, except that the VC90.CRT folders on the host server do not contain the Microsoft.VC90.CRT.manifest
files.
The web.config is shown below.
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="csToys" connectionString="Data Source=|DataDirectory|\Toys.sdf"
providerName="System.Data.SqlServerCe.4.0" />
</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<customErrors mode="Off" />
</system.web>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0"/>
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0"
description=".NET Framework Data Provider for Microsoft SQL Server Compact"
type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
</configuration>
With the project configured as shown above I get the following error whenever I attempt to open the project on host server. Any suggestions would be greatly appreciated.
Server Error in '/' Application.
--------------------------------------------------------------------------------
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x800736b1): The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) +49
System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName) +76
System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath) +27
System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath) +281
System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall) +76
System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() +225
System.Data.SqlServerCe.SqlCeConnection..ctor() +38
System.Data.SqlServerCe.SqlCeProviderFactory.CreateConnection() +19
System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +21
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +117
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
GrandpaB
Member
389 Points
367 Posts
Server Error: Cannot Publish a Project with a Database
Jul 28, 2011 02:43 PM|LINK
Hello,
I'm attempting to develop a small website project using VWD 2010 Express with a SQL Server CE 4.0 database. To check out ability to publish the website, I've created a simple one page project with a one table database. The page contains a Gridview and DataSource; it was easy to build and works on my development system without error.
Publishing it is another story! I have been working on publishing it at my host provider for about a month. I have an open thread on the SQL Server Compact forum, but despite the suggestions I have received I cannot successfully publish it. There have been many variations; this is the current status of the project.
After building the project the bin folder contains the following files.
To the project's bin folder I have added the System.Data.SqlServerCe.dll file and two folders, amd64 and x86. Each one of these folders contain the following files.
Both the amd64 and x86 folder also contain a folder, Microsoft.VC90.CRT. Both the VC90.CRT folders contain the following files.
After publishing the project I check the files and structure of the bin folder on the host server. It is identical to bin folder on my development system, except that the VC90.CRT folders on the host server do not contain the Microsoft.VC90.CRT.manifest files.
The web.config is shown below.
<?xml version="1.0"?> <configuration> <connectionStrings> <add name="csToys" connectionString="Data Source=|DataDirectory|\Toys.sdf" providerName="System.Data.SqlServerCe.4.0" /> </connectionStrings> <system.web> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> <customErrors mode="Off" /> </system.web> <system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.4.0"/> <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </DbProviderFactories> </system.data> </configuration>With the project configured as shown above I get the following error whenever I attempt to open the project on host server. Any suggestions would be greatly appreciated.