.net 不在同一个解决方案中的 Dll 文件引用

木房尘埃 2010-11-01 08:22:46
在一个网站中引用了另外一个小网站中的所以Dll 在本地代码测试没有问题

在服务器上访问的Using 项目名称

但是无法访问到项目下的类型

错误提示如下:



Server Error in '/eProcess' Application.
--------------------------------------------------------------------------------

Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 312: protected void btnLogin_Click(object sender, EventArgs e)
Line 313: {//MediaSystem 中的密码验证
Line 314: Apply.DoLogin login = new Apply.DoLogin();
Line 315: string straccount = this.txtAccount.Text.Trim();
Line 316:


Source File: c:\Program Files\Dltech\LiveFlowNet V5.3\WebSite\LiveFlowWeb\LoginNoAD.aspx.cs Line: 314

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


...全文
137 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
木房尘埃 2010-11-02
  • 打赏
  • 举报
回复
O(∩_∩)O哈哈~ 谢谢问题解决了 估计是服务器上的环境部一样造成的 ,放了一个Dll 进去就可以了 。。
zhubo006 2010-11-02
  • 打赏
  • 举报
回复
罗纳尔迪尼奥 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 liuwei2500 的回复:]

这个是服务器上面缺少程序集System.Data.SqlServerCe造成的,例如你在你的程序里面使用了调用了office的方法,在你的电脑上面装有office【会自动安装office的程序集到.net的程序集下面】那么就没问题,而你的服务器上面没有office的话,就会出现这样的错误。
[/Quote]
学习····
sage425 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 liuwei2500 的回复:]

这个是服务器上面缺少程序集System.Data.SqlServerCe造成的,例如你在你的程序里面使用了调用了office的方法,在你的电脑上面装有office【会自动安装office的程序集到.net的程序集下面】那么就没问题,而你的服务器上面没有office的话,就会出现这样的错误。
[/Quote]

嗯,是的 回答的很好,少了程序集。你不上就差不多了
liuwei2500 2010-11-01
  • 打赏
  • 举报
回复
这个是服务器上面缺少程序集System.Data.SqlServerCe造成的,例如你在你的程序里面使用了调用了office的方法,在你的电脑上面装有office【会自动安装office的程序集到.net的程序集下面】那么就没问题,而你的服务器上面没有office的话,就会出现这样的错误。

62,271

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧