3.5中的.net应用程序无法在网络驱动器中运行。 [英] .net application in 3.5 does not run in network drive.

查看:198
本文介绍了3.5中的.net应用程序无法在网络驱动器中运行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我已经使用.net framework 3.5编写了.net应用程序,它在本地计算机上运行正常但不能正常工作来自网络驱动器。发现以下错误



**************异常文本************ **

System.Security.SecurityException:请求类型'System.Data.OleDb.OleDbPermission,System.Data,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的权限失败。/ / $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
at System.Data.Common.DbConnectionOptions.DemandPermission()

at System.Data.OleDb.OleDbConnection.PermissionDemand()

at System.Data.OleDb .OleDbConnectionFactory.PermissionDemand(DbConnection outerConnection)

在System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,.....





i已尝试过caspol,但它无法正常工作,我有一个v2的caspol.exe,而我的应用程序是3.5,是吗兼容?







提前致谢。

解决方案

阅读以下内容(.net v3.5在框架的v2上运行):

http://social.msdn.microsoft.com/Forums/vstudio/en -US / e4a65263-24f9-45a6-a2ad-6c26aae36075 / how-to-run-net-executable-on-a-network-drive [ ^ ]

Hi,


I have prepared .net application using .net framework 3.5, it runs fine in local machine but not working from network drive. Following error found

************** Exception Text **************
System.Security.SecurityException: Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.OleDb.OleDbConnection.PermissionDemand()
at System.Data.OleDb.OleDbConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, .....


i have tried caspol , but it is not working, I have a caspol.exe of v2 while my application is in 3.5 , is it compatible ??



Thanks in advance.

解决方案

Read the following (.net v3.5 runs on the v2 of the framework):
http://social.msdn.microsoft.com/Forums/vstudio/en-US/e4a65263-24f9-45a6-a2ad-6c26aae36075/how-to-run-net-executable-on-a-network-drive[^]


这篇关于3.5中的.net应用程序无法在网络驱动器中运行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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