asp.net program compile debugging occasional Access Denied error solution _ Practical Tips

Source: Internet
Author: User

Problem Description:

Write asp.net programs, when the compilation debugging is more frequent, it is easy to frequently appear access denied. Shaped like:

Parser Error message: Access Denied: "Microsoft.Web.UI.WebControls".
SOURCE Error:
Row 197: <add assembly= "System.Web.Mobile, version=1.0.5000.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a"/ >
Row 198: <add assembly= "*"/>
.....
Source file: C:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198

Source Error:

行 196:             <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      行 197:                <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      行 198: <add assembly="*"/> 行 199:         </assemblies>
      行 200:        </compilation>
      


source file: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198



Reason:

Due to frequent changes, the corresponding directories or files under the c:\windows\microsoft.net\framework\v1.1.4322\Temporary asp.net files\ directory are locked by the index server to rebuild the index. So the general release after a few minutes, back to normal. (did not understand before, caused me to restart the site, restart IIS, close vs.net, not busy, and seems to be useful, (now know is to make the time to earn enough-_-"), but that is not a cure. Now finally understand, all of a sudden the whole world is quiet. haha

Solution:

Method One: If you do not use the Index server to turn it off. (The service is closed, preferably disabled, then all quiet.) )

1. Enter the Control Panel-〉 management tool-〉 Service, find indexing Services and click the right button to stop it.
Or:
2. You can enter the Net Stop cisvc command at MS-DOS! "I didn't try."


Method Two: Configure the Index Server to not index the directory.

2.1, start--management tools--Computer Management (Win2003 location, similar to other operating systems) turn on Computer Management
2.2. Expand Computer Management The services and Applications node in the left tree, expand the Indexing Service node under it, expand the System node under it, and then expand the directory node below it.
2.3, on the right side of the computer Management we can see the configured Indexing Service directory.
2.4, on the "Directory" node right click on the mouse, select "New"--"directory"
2.5. In the Add Directory dialog box, enter the asp.net temporary file directory in the entry box. The default should be:
C:\<windir>\microsoft.net\framework\<version number>\temporary asp.net Files directory.
<version number> refers to the. NET version you are dealing with.
2.6, in the "included in the index?" "option, select" No "
2.7, click "OK" button
2.8. Right-click on the Indexing Service node to restart Indexing Service.

Method Three: You can delete bin\xx.pdb

Related Article

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.