NituP Posted December 27, 2004 Posted December 27, 2004 (edited) Same prob even then Hi, Even I'm getting the same problem.... but this is while creating the object i.e. the very first line which is : Word.ApplicationClass oWord = new Word.ApplicationClass(); ....in this till this point have not accessed any file so granting permission on file accessed goes out of questn :o ..... ...... could u pls help me in this ? Thanks, NituP :rolleyes: Quote I have a strange problem. I get an "Access Denied Error" when I try to instantiate a Word.Application in my custom vb.net class from an ASPX page. Dim wrdApp As New Word.Application How can I fix? Here is the error: 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: Removed from old http://www.xtremedotnettalk.com/showthread.php?t=77741 Edited December 28, 2004 by Iceplug Quote
WebJumper Posted December 27, 2004 Posted December 27, 2004 Maybe you have to run "dcomcnfg" I have german Windows XP, so I will write down how to do: 1. Start->Ausführen... (the command promt) 2. type dcomcnfg 3. a window should appear 4. On the left side is a tree, open first node. 5. Open the computer node 6. Open the next subnode 7. Open DCOM-Konfiguration 8. Search for "Microsoft Word-Document" 9. Right-Click (with mouse) the Word-Document 10. Eigenschaften / us: Properties 11. Go to tab "Security" 12. Change the three properties to "Anpassen" -> All radiobutons have to select the second entry. 13. Klick on the button "Edit" or some like this. 14. Add the ASP.NET user and gibe him full control. 15. Do step 13+14 for the three properties! 16. Try again! Regards, Stefan Quote
WebJumper Posted December 27, 2004 Posted December 27, 2004 Consider: For the solution I typed at the moment, you have NOT to use following I have typed before some months... Quote or this way: web.config: <system.web> <identity impersonate="true" userName="Administrator" password="admin"/> </system.web> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.