asp.net access Denied

Source: Internet
Author: User
Tags iis resource stack trace
asp.net| Access

Using Microsoft's COM component to write inserts data into Excel and then download to the client native program, the test passes at development time and the following error occurs after uploading to the WIN2000 server:
Server Error in '/WEBQR ' application.
--------------------------------------------------------------------------------
Access denied.
Description:an unhandled exception occurred during the execution of the current Web request. Please review the "stack Trace for" Information about the error and where it originated in the code.

Exception Details:System.UnauthorizedAccessException: Access denied.

ASP.net is isn't authorized to access the requested resource. Consider granting access rights to the resource to the ASP.net request identity. ASP.net has a base process identity (typically {machine}\aspnet on IIS 5 or network Service on IIS 6) which is used if the Application is not impersonating. If the application is impersonating via <identity impersonate= "true"/>, the identity would be the anonymous user (Typ Ically IUSR_machinename) or the authenticated request user.

To grant ASP.net write access to a file, right-click the ' File in Explorer, choose ' Properties ' and select the Security tab . Click "Add" to add the appropriate user or group. Highlight the ASP.net account, and check the boxes for the desired access.

Because this is the case when this machine is tested, find the solution online and try to solve the following methods:
1. Increase the iis_user of the authority, will iis_user join the administrator, personally feel that there is a security risk, so do not use
2. At start-"Run input DCOMCNFG configuration, excelcom file security permissions, edit startup permissions, configure permissions
Error occurred after modification completed
Server Error in '/WEBQR ' application.
--------------------------------------------------------------------------------
Object reference not set to a instance of an object



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.