SQL Server Compact is not intended for ASP.NET development
2010-10-19 16:05
645 查看
在asp.net程序中部署sql server compact运行程序链接嵌入数据库时抛出异常,显示“SQL Server Compact is not intended for ASP.NET development. ”。
这个问题可以通过在Global.asax中设置AppDomain属性解决,代码如下:
Global
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
namespace SqlServerCeWebApp
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}
这个问题可以通过在Global.asax中设置AppDomain属性解决,代码如下:
Global
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
namespace SqlServerCeWebApp
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}
相关文章推荐
- SQL Server Compact is not intended for ASP.NET development.
- Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL serve
- web server is not running asp.net version 1.1问题解决
- SQL Server Compact 3.5 B2 & Sync Services for ADO.NET Documentation released
- SQL Server CE Database Development with the .NET Compact Framework
- 微软ASP.NET站点部署指南(2):部署SQL Server Compact数据库
- 微软ASP.NET站点部署指南(2):部署SQL Server Compact数据库
- 在 .NET Framework Data Provider for Microsoft SQL Server Compact 3.5 中发生错误
- SQL Server Connection Strings for ASP.NET Web Applications
- SQL Server Setup failed to obtain system account information for the ASPNET
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- Microsoft SQL Server Compact 4.0 is available for download
- ASP.Net DebugError解决方案[转]:Unable to start debugging on the web server.Debugging failes because integrated Windows authentication is not enabled.
- SQL Server error "Xml data type is not supported in distributed queries" and workaround for it
- This article provides a fix for the error: Login failed for user “. The user is not associated with a trusted SQL Server
- SQL Server Setup failed to obtain system account information for the ASPNET
- ASP.NET MVC 3、WebMatrix、IIS Developer Express、SQL Server Compact Edition、Razor
- Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers
- 微软ASP.NET站点部署指南(2):部署SQL Server Compact数据库
- The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.