IIS Publishing Web site: CS0016: Workaround for failure to write to output file

Source: Internet
Author: User

Server error in "/" application.
--------------------------------------------------------------------------------

Compile error
Description: An error occurred during compilation of the resource required to provide service to the request. Please check the following specific error details and modify the source code as appropriate.

Compiler error Message: CS0016: Failed to write output file "c:\Windows\Microsoft.NET\Framework\v2.0.50727 \temporary ASP. files\root\9b70b3a1\ 3eb1115f\app_code.aez6e3ev.dll "--" denied access. ”

SOURCE Error:

[No related source line]

Source file: line: 0

Cause:
Temporary files that are generated when the application runs need to be stored under the C: "Windows" Temp folder while running applications that are based on the Microsoft. NET Framework framework need to have read and write permissions to temp, so the temporary files generated by the program cannot be stored or read. Or if the path does not exist, a compilation error will occur.

Workaround
1. Set C:windows\temp Directory Access rights temp--> Properties--security--> Add Iis_user and Network SERVICE--all given their permissions to read and write--ok
2. First shut down IIS, empty the C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP. NET files\ directory, restart IIS, and then give C:\Windows\ The Microsoft.net\framework\v2.0.50727\temporary ASP. Files\ Directory adds the network service and Iis_user user rights, and is set to read and write permissions, as described in step 1th.
3, add Users and Network Service user rights to the Web site file directory, and set permissions for read and run, Add method see step 1th.

In IIS7 under the common this problem, generally follow the above steps can be resolved, if not yet, you can add to the above several directories of the permissions of everyone and the ASPNET test.

IIS Publishing Web site: CS0016: Workaround for failure to write to output file

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.