将程序转移到新域和新服务器时出现此错误,并且仅适用于少数用户:
"Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.FileDialog.set_Title(String value)
at mainForm.InitializeComponent() in C:\MyProjects\DTSExecuter.root\DTSExecuter\DWMaintenance\mainForm.vb:line 88
at mainForm..ctor() in C:\MyProjects\DTSExecuter.root\DTSExecuter\DWMaintenance\mainForm.vb:line 16
at mainForm.Main() in C:\MyProjects\DTSExecuter.root\DTSExecuter\DWMaintenance\mainForm.vb:line 4
我的机器和其他用户一样可以正常运行应用程序,但有少数用户收到“应用程序产生了无法处理的异常”。错误框,调试时返回上述错误。这是一个遗留应用程序,我们可能无法访问其源代码,它只是更改了内部连接管理器中的连接字符串。除了在新域上运行之外,这是对应用程序的唯一更改。