Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

com object can write to disk

Status
Not open for further replies.

hungerf5

IS-IT--Management
Sep 17, 2001
36
0
0
US
I'm using a COM object in a web app that needs to write temporary files to disk then delete them.

Once the COM object tires to write to disk I get the folloing message:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

ASP.NET is not 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) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


The COM Object is trying to write to c:\temp. I've given the ASPNET account full rights to the folder. I've tried setting up the site using both anonymous and non-anonymous access. I tired giving the COM .dll in question filesystemIO permissions in the .net configuration tool but it won't let me because it says the file is not an assembly.

None of these things work. What else can I try or am I SOL and this COM dll is untrusted and cannot write to disk?




--Rick
 
Are you using windows 2003?

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
In that case try adding permissions to the folder for the "NETWORK SERVICE" account.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Already added NETWORK SERVICE and NETWORK with full rights.

Also I know the accounts have access becuase I wrote a blank text file to c:\temp without any problems. So the app security is ok but the COM object can't write or there is something else causing problems.

The only thing that looks fishy in the event log is the following etry:


Event Type: Warning
Event Source: W3SVC-WP
Event Category: None
Event ID: 2265
Date: 2/25/2005
Time: 7:25:52 AM
User: N/A
Computer: EDGEFS
Description:
The registry key for IIS subauthenticator is not configured correctly on local machine, the anonymous password sync feature is disabled.

For more information, see Help and Support Center at


--Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top