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