应用程序试图执行安全策略不允许的操作,若要授予该应用程序所需的权限,请与系统管理员联系,或使用microsoft.net framework配置工具。
应用程序试图执行安全策略不允许的操作,若要授予该应用程序所需的权限,请与系统管理员联系,或使用microsoft.net framework配置工具。
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.Security.SecurityException: 请求“System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限已失败。
在 System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
在 System.Security.CodeAccessPermission.Demand()
在 System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
在 System.Net.HttpRequestCreator.Create(Uri Uri)
在 System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
在 System.Net.WebRequest.Create(Uri requestUri)
在 System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
在 System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
在 demo.webSvr.authorServices.getAuthors()
在 demo.UserControl1.button1_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
失败的操作是:
Demand
失败的第一个权限的类型是:
System.Net.WebPermission
失败的程序集的区域是:
Internet
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3634 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3634 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
demo
程序集版本: 1.0.0.0
Win32 版本: 不可用
基本代码: http://10.9.34.82/activeX/demo.dll
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3637 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3639 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.mshtml
程序集版本: 7.0.3300.0
Win32 版本: 7.0.3300.0
基本代码: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
System.Web.Services
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3082 (QFE.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.resources.dll
----------------------------------------
kwxwi-bt
程序集版本: 1.0.0.0
Win32 版本: 2.0.50727.3634 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
================================================================================
================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
提问:我是做了一个winform控件库的程序,然后在这个程序中调用webservices,webservices中连接数据库返回一条记录,且webservices发布在本机,点击winform中的btn的时候把返回的这条记录的内容赋值到label上。测试的时候发现,本机上显示在ie中的winform是个红叉号!然后用局域网的同事的机器,运行可以,但是点击btn的时候,提示这个东西。