Exception: hresult: 0 × 80070057 (e_invalidarg) Processing

Source: Internet
Author: User
Tags mscorlib

The cause of this exception is accidental:

Symptom:
Solution stops power during the rebuild process, and the incoming call is restored. There is no error in re-compiling the entire solution, but the page cannot be browsed normally. In the design view, an error is reported for the first line of code of each Aspx.

Http://www.dezai.cn/blog/article.asp? Id = 355

Solution Process:

Search for many domestic solutions, and some suggest referencing ajaxcontroltoolkit again. DLL, there is clear Asp.net cache files, but do not see the desired effect, and finally in a foreign msdn posts (http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/352c58ec-65d8-4d77-ac7b-d2338c621ef3) to see a variety of solutions.

You can try the relevant methods. It cannot be guaranteed that all solutions can achieve the effect, but it should be no different from any other solution. Haha.

Solution 1: Clear the files in the temporary ASP. NET Files folder and re-compile the files.

C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ temporary ASP. NET files \ mywebservice and recompiled and it worked fine.

This method is the most recommended solution on the Internet. It seems to be feasible and not feasible. Some files cannot be deleted directly. You need to delete them by special means.

Solution 2: Uninstall all the Net Framework versions on the system, IIS, and reinstall Net Framework and IIS.

This method seems to be quite troublesome, and it cannot be determined that it can solve the exception. Most people do not solve the problem in this way. Note the installation sequence.
? Uninstall. Net (runtime and SDK)-> uninstall IIS-> install. Net (runtime and SDK)-> install IIS

Solution 3: I didn't understand this method, so I won't explain it. It seems complicated. 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.

Solution 4: Clear the files in System Disk \ User Name \ appdata \ Local \ temp \ temporary ASP. NET files
C: \ Users \ <Name> \ appdata \ Local \ temp \ temporary ASP. NET files

I used this solution to solve the problem. I happen to be using the win7 system. However, it seems that it works well with solution 1. Note: Vista and window7 systems are particularly suitable.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.