今天按照往常一樣,運行項目,卻不能登入了。並且拋出來一個異常。“Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths”
上網查查,說會在訪問webservice的時候會遇到這樣的問題。
“If you use Simple Object Access Protocol (SOAP) to call the WebServices method from an .aspx page, the .aspx page may fail when you run the Microsoft Internet Information Services (IIS) Lockdown tool. In addition, you may receive the following error message:
[ExternalException (0x5): Cannot execute a program. The command being executed was "d:\winnt\microsoft.net\framework\v1.0.3408\csc.exe" /noconfig @"D:\WINNT\TEMP\eyrpuhyg.cmdline".]
This problem only affects Web applications or Web services that are clients of a Web service and that impersonate the Anonymous user account. ”
在根據自己的情況,好像真是處在訪問webservice時出現的問題。因為我們在進入項目的時候,使用者名稱和密碼都是通過webservice來驗證的!
回想起金山毒霸曾經攔截過自己的項目。就去金山毒霸哪裡查詢一下日誌。結果被我發現了!
金山毒霸->檔案即時防護->查看日誌 彈出:
看到csc.exe被誤認為注入程式,給阻止了。
隨便點擊操作中的“永久允許”或“永久阻止”,彈出“程式行為管理器”
在阻止列表中將csc.exe移除掉。 在次運行程式,一切正常!