Server Error: Cannot Publish a Project with a Databasehttp://forums.asp.net/t/1704931.aspx/1?Server+Error+Cannot+Publish+a+Project+with+a+DatabaseFri, 29 Jul 2011 20:18:57 -040017049314529003http://forums.asp.net/p/1704931/4529003.aspx/1?Server+Error+Cannot+Publish+a+Project+with+a+DatabaseServer Error: Cannot Publish a Project with a Database <p>Hello,</p> <p>I'm attempting to develop a small website project&nbsp;using VWD 2010 Express with a SQL Server CE 4.0 database.&nbsp; To check out ability to publish the website, I've created a simple one page project with a one table database.&nbsp; The page contains a Gridview and DataSource; it was easy to build and works on my development system without error.&nbsp;</p> <p>Publishing it is another story!&nbsp; I have been working on publishing it at my host provider for about a month.&nbsp; I have an open&nbsp;thread on the SQL Server Compact forum, but despite the suggestions I have received I cannot successfully publish it.&nbsp; There have been many variations;&nbsp;this is the current status of the project.</p> <p>After building the project the bin folder contains the following files.</p> <ul> <li>myProj.dll </li><li>myProj.pdb </li><li>myProj.xml </li></ul> <p>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.</p> <ul> <li>sqlceca40.dll </li><li>sqlcecompact40.dll </li><li>sqlceer40EN.dll </li><li>sqlceme40.dll </li><li>sqlceqp40.dll </li><li>sqlcese40.dll </li></ul> <p>Both the amd64 and x86 folder also contain a folder, Microsoft.VC90.CRT. Both the VC90.CRT folders contain the following files.</p> <ul> <li>Microsoft.VC90.CRT.manifest </li><li>msvcr90.dll </li><li>README_ENU.txt </li></ul> <p>After publishing the project I check the files and structure of the bin folder on the host server.&nbsp; 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.</p> <p>The web.config is shown below.</p> <pre class="prettyprint">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;configuration&gt; &lt;connectionStrings&gt; &lt;add name=&quot;csToys&quot; connectionString=&quot;Data Source=|DataDirectory|\Toys.sdf&quot; providerName=&quot;System.Data.SqlServerCe.4.0&quot; /&gt; &lt;/connectionStrings&gt; &lt;system.web&gt; &lt;compilation debug=&quot;true&quot; strict=&quot;false&quot; explicit=&quot;true&quot; targetFramework=&quot;4.0&quot; /&gt; &lt;customErrors mode=&quot;Off&quot; /&gt; &lt;/system.web&gt; &lt;system.data&gt; &lt;DbProviderFactories&gt; &lt;remove invariant=&quot;System.Data.SqlServerCe.4.0&quot;/&gt; &lt;add name=&quot;Microsoft SQL Server Compact Data Provider 4.0&quot; invariant=&quot;System.Data.SqlServerCe.4.0&quot; description=&quot;.NET Framework Data Provider for Microsoft SQL Server Compact&quot; type=&quot;System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&quot;/&gt; &lt;/DbProviderFactories&gt; &lt;/system.data&gt; &lt;/configuration&gt;</pre> <p>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.</p> <pre class="prettyprint">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 </pre> 2011-07-28T14:43:07-04:004531277http://forums.asp.net/p/1704931/4531277.aspx/1?Re+Server+Error+Cannot+Publish+a+Project+with+a+DatabaseRe: Server Error: Cannot Publish a Project with a Database <p>Hello again,</p> <p>I originally began developing the website using VWD 2010 Express with a SQL Server CE database.&nbsp; The design was well along when I signed up with GoDaddy on June 20.&nbsp; There has been a 5 week effort to get that working.&nbsp; GoDaddy's response was limited to &quot;you have a scripting error.&quot;&nbsp; &nbsp;I published simple &quot;Hello World&quot; sites both with and without a database.&nbsp; If a database was included I got an error when the page was served from GoDaddy.&nbsp; In the past 2 days I&nbsp;developed&nbsp;simple WebMatrix websites with and without databases.&nbsp; The non-database sites would work if I entered mySite.com/default.cshtml; the database sites would crash!&nbsp; Without WebMatrix support GoDaddy does not recognize the .cshtml or .vbhtml extensions.</p> <p>Bottom line - GoDaddy does not support SQL Server CE 4.0 or WebMatrix!&nbsp; I hope my experiences save someone else from the frustration that I experienced.</p> 2011-07-29T20:18:57-04:00