Asp. NET denial of access to temporary directories _ practical Tips

Source: Internet
Author: User

The blog program was deployed to a Aliyun Windows host today, and the following error occurred while accessing through the browser:

Copy Code code as follows:

An error occurred while creating the Blogconfigurationsettings configuration section handler: Access to the temporary directory was denied. "IIS apppool\www.cnblogs.com", as it runs XmlSerializer, does not have sufficient privileges to access the temporary directory. The CodeDom will use the user account that this process uses for compiling, so if the user does not have access to the system temp directory, it will not compile. Use the Path.gettemppath () API to locate the temporary directory location.
Access to the Temp directory is denied. Identity ' IIS apppool\www.cnblogs.com ' under which XmlSerializer is running does do not have sufficient to access  The temp directory. CodeDom would use the ' user account ' the ' process is ' using to do ' compilation, so if the user doesnt have access to system  Temp directory, you are not is able to compile. Use Path.gettemppath () APIs to find out the temp directory location.
CS0016: Failed to write to output file ' c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary asp.net files\root\946055b8\92eead15\ App_global.asax.qakaesxx.dll "--" Deny access. ”

The issue is initially thought to be the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary asp.net Files" folder permissions, but how to set this permission will not solve the problem.

The problem is resolved later when the load user profile is set to true in the application pool settings.

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.