20100625 学习记录2:System.Security.SecurityException - Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED

System.Security.SecurityException - Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)

 本地运行正常,放到qc就报这个错

费老大牛劲才定位出具体出错的位置,最后确定是dll里getItem那里出问题

网上找了一下都说是跟读写文件有关的,我当时记得dll里面读写log的部分都删除了,又特意换了一个干净的dll,可是就是一直报这个错误 (┬_┬)

后来干脆去vb重新清理了一遍,结果居然是returnItem里面有在很久前加进去的代码.....  - =

也没仔细看到底是哪个细节出了问题,时间紧急就全删了重新编译导入。成功!!...  = =+

 

别人的引起错误的例子们:

Line 22: 	
Line 23: f3 = New Scripting.FileSystemObject
Line 24: f4 = f3.OpenTextFile(server.MapPath("visitor.txt"), 2)
Line 25: f4.Write((session("hits")))
Line 26: session("lock") = 1
 http://forums.asp.net/p/897045/970403.aspx

http://www.vbdotnetforums.com/deployment/25593-exception-hresult-0x800a0046-ctl_e_permissiondenied.html

 http://social.msdn.microsoft.com/Forums/en/clr/thread/429f89f5-25bf-4e5f-a905-3dc2a32d661b

http://www.velocityreviews.com/forums/t302088-ctl_e_permissiondenied.html

http://bytes.com/topic/visual-basic-net/answers/368367-security-error-writing-text-file

 

你可能感兴趣的:(20100625 学习记录2:System.Security.SecurityException - Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)