日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

异常:HRESULT: 0x80070057 (E_INVALIDARG) 的处理

發布時間:2023/12/20 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 异常:HRESULT: 0x80070057 (E_INVALIDARG) 的处理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

碰到這個異常的原因很偶然:

現象:
Solution在ReBuild過程中斷電了,來電恢復了,重析編譯整個Solution不報錯,但在瀏覽頁面時始終無法正常瀏覽,而在design的視圖中,每個aspx的首行代碼都報錯。

解決過程:

搜索找到很多國內的方案,有的建議重新引用AjaxControlToolkit.dll,還有就是清除asp.net的緩存文件,但都沒有看到想要的效果,最后在一個國外MSDN的貼子(http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/352c58ec-65d8-4d77-ac7b-d2338c621ef3)中看到種種處理辦法.

相關方法可以嘗試一下,不能保證所有的方案都能達到效果,但應該也八九不離十了吧。呵呵。

方案1:清空Temporary ASP.NET Files文件夾的文件,重新編譯

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\MyWebService and recompiled and it worked fine.?

這個方法是網上推薦得最多的方案,好像也可行,也不可行。里面有些文件不能直接刪除,需要通過特殊手段進行刪除。


方案2:卸載系統上所有的Net Framework的版本,IIS,重新安裝Net Framework,IIS

這個方法好像比較麻煩,而且也不太能確定能達到解決異常的效果。就網上看到的結果而言,大多數人這樣操作并沒有解決問題。這里要注意安裝的順序
?Uninstall .NET (Runtime and SDK)->Uninstall IIS->Install .NET (Runtime and SDK)->Install IIS


方案3:這個方法我沒看懂,就不解釋了,貌似比較復雜Background: The assembly causing me trouble was built in house and I did not have the source code.

Required: You need the Visual Studio SDK for ildasm.exe



Steps:


1.) Disassemble the .dll with the command ildasm.exe AssemblyName.dll /out:AssemblyName.il??

2.) Open the newly created AssemblyName.il with a text editor and search for "permissionset"

3.) Find and delete the following lines:


??.permissionset reqmin?
???????????? = {[mscorlib]System.Security.Permissions.PermissionSetAttribute = {property string 'Name' = string('nobody')},?
????????????????[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'Execution' = bool(true)}}



4.) Save and rebuild the assembly with the following command: ilasm.exe AssemblyName.il /dll

5.) Throw the new dll in your bin directory or if it's strong named and needed in the GAC you can put it there.


方案4:清除 系統盤:\用戶\用戶名稱\AppData\Local\Temp\Temporary ASP.NET Files里面的文件
C:\Users\\AppData\Local\Temp\Temporary ASP.NET Files

我是用這個方案搞掂的,恰巧我的是win7的系統.不過好像這個與方案1配合使用較好.注意:Vista系統與Window7系統這個尤為適合

?

原文地址

轉載于:https://www.cnblogs.com/WillZhang7/p/4341039.html

總結

以上是生活随笔為你收集整理的异常:HRESULT: 0x80070057 (E_INVALIDARG) 的处理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。