服務(wù)器安全狗導(dǎo)致asp.net網(wǎng)站運(yùn)行出錯(cuò)的一個(gè)案例

字號(hào):


    字典中的關(guān)鍵字:“registrypermission”所添加的關(guān)鍵字:“registrypermission” 報(bào)錯(cuò),因?yàn)榉?wù)器上安全狗對(duì).net程序關(guān)鍵字過(guò)于苛刻引出報(bào)錯(cuò)。
    今天碰到一個(gè).net的報(bào)錯(cuò),之前并沒(méi)見(jiàn)過(guò)這種報(bào)錯(cuò),也沒(méi)有太多的詳細(xì)信息?!?”應(yīng)用程序中的服務(wù)器錯(cuò)誤。
    字典中的關(guān)鍵字:“registrypermission”所添加的關(guān)鍵字:“registrypermission”
    說(shuō)明: 執(zhí)行當(dāng)前 web 請(qǐng)求期間,出現(xiàn)未處理的異常。請(qǐng)檢查堆棧跟蹤信息,以了解有關(guān)該錯(cuò)誤以及代碼中導(dǎo)致錯(cuò)誤的出處的詳細(xì)信息。
    異常詳細(xì)信息: system.argumentexception: 已添加項(xiàng)。字典中的關(guān)鍵字:“registrypermission”所添加的關(guān)鍵字:“registrypermission”
    源錯(cuò)誤:
    執(zhí)行當(dāng)前 web 請(qǐng)求期間生成了未處理的異常??梢允褂孟旅娴漠惓6褩8櫺畔⒋_定有關(guān)異常原因和發(fā)生位置的信息。
    堆棧跟蹤:
    代碼如下:
    [argumentexception: 已添加項(xiàng)。字典中的關(guān)鍵字:“registrypermission”所添加的關(guān)鍵字:“registrypermission”]
    system.collections.hashtable.insert(object key, object nvalue, boolean add) +7482408
    system.collections.hashtable.add(object key, object value) +11
    system.security.policy.policylevel.fromxml(securityelement e) +307
    system.security.securitymanager.loadpolicylevelfromstringhelper(string str, string path, policyleveltype type) +207
    system.security.securitymanager.loadpolicylevelfromstring(string str, policyleveltype type) +37
    system.web.httpruntime.createpolicylevel(string configfile, string appdir, string bindir, string stroriginurl, boolean& foundgactoken) +420
    system.web.httpruntime.settrustlevel(trustsection trustsection, securitypolicysection securitypolicysection) +8913358
    system.web.httpruntime.hostinginit(hostingenvironmentflags hostingflags) +186
    [httpexception (0x80004005): 已添加項(xiàng)。字典中的關(guān)鍵字:“registrypermission”所添加的關(guān)鍵字:“registrypermission”]
    system.web.httpruntime.firstrequestinit(httpcontext context) +8886319
    system.web.httpruntime.ensurefirstrequestinit(httpcontext context) +85
    system.web.httpruntime.processrequestinternal(httpworkerrequest wr) +259
    --------------------------------------------------------------------------------
    版本信息: microsoft .net framework 版本:2.0.50727.3053; asp.net 版本:2.0.50727.3053
    剛開(kāi)始以為是權(quán)限還是dll文件有問(wèn)題,最后才發(fā)現(xiàn)原來(lái)是服務(wù)器上安裝了安全狗的問(wèn)題
    在安全狗中有一個(gè)與.net相關(guān)的配置面板,將其改成完整模式,沒(méi)有任何權(quán)限限制,系統(tǒng)默認(rèn)級(jí)別