无法加载文件或程序集'System.Data.SqlServerCe,版本= 4.0.0.0 [英] Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0

查看:423
本文介绍了无法加载文件或程序集'System.Data.SqlServerCe,版本= 4.0.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的C#代码中使用Visual Studio 2012 Ultimate和"SQL Server Compact 4.0本地数据库"创建了一个ASP.NET网站(不是Web应用程序).

I have created a ASP.NET web Site (not Web application), using Visual Studio 2012 Ultimate and "SQL Server Compact 4.0 Local Database" in my C# Code.

我能够成功编译&使用操作系统Windows Server 2008 R2 Standard将网站发布到另一个IIS Web服务器.我什至可以在开发它的机器上成功测试该网站.

I am able to successfully compile & publish the website to another IIS Web Server, with Operating System Windows Server 2008 R2 Standard. I can even test, successfully, this website on the machine I developed it in.

我正在将网站从Visual Studio中发布到运行IIS的网络Web服务器.要发布,我正在使用Build->发布网站".在发布配置文件中,我正在使用Web部署方法.即使我在网站上成功使用了"SQL Server Compact 4.0本地数据库",设置"(在发布配置文件"中)也没有检测到项目中的任何数据库.可能不是问题.

I am publishing the website, from within Visual Studio, to a Network web server running IIS. To Publish I am using Build-> "Publish Web Site". In the Publish Profile, I am using Web Deploy Method. Even though I am using, successfully, "SQL Server Compact 4.0 Local Database" in my website, the "settings" (in Publish Profile) does not detect any Databases in the project. Which may not be a problem.

当我尝试在IIS Web服务器计算机上打开网站时,出现以下错误.

When I try to bring up the web site on the IIS Web Server machine I get the following error..

无法加载文件或程序集'System.Data.SqlServerCe,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91'或其依赖项之一.

Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies .

由于我的项目是一个网站,而不是网站应用程序,所以我在解决方案资源管理器中没有引用节点.我认为System.Data.SqlServerCe.dll(在我的项目中为GAC类型)没有发布到Web服务器,这导致了此错误.我可以手动复制此.dll吗?如果是,在哪里放置ISS Web服务器?我看不到任何bin文件夹.

As my project is a Web Site, not Web Site Application, I do not have a references node in the Solution Explorer. I think the System.Data.SqlServerCe.dll, which is type GAC in my project, is not getting published to the webserver, which is causing this Error. Can I copy this .dll over manually ? If yes, where to put on the ISS Web Server ? I do not see any bin folder.

任何帮助您解决此错误的信息都将得到感谢.

Any help to resolve this error will be appreciated.

谢谢

推荐答案

您必须在要部署应用程序的IIS Web服务器上安装sql server compact 4.0.

you have to install sql server compact 4.0 on IIS webserver where you are going to deploy application.

下载以下exe并将其安装在IIS Web服务器上.

download following exe and install it on IIS webserver.

http://www.microsoft.com/zh-in/download/details.aspx?id = 17876

肯定可以.

这篇关于无法加载文件或程序集'System.Data.SqlServerCe,版本= 4.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆