Creating Word Document Issue

A

Arvind P Rangan

Hi all,

trying to create word document using following syntax in c#

private Word.ApplicationClass oWordApp = new Word.ApplicationClass();

Application throws error as :
Exception Details: System.UnauthorizedAccessException: Access is denied.

The ASP.NET process is not authorized to access the requested resource. For
security reasons the default ASP.NET process identity is
'{machinename}\ASPNET', which has limited privileges. Consider granting
access rights to the resource to the ASP.NET process identity.

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
"{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the
Write box in the Allow column.

But as per the security goes, i have ensured that machine\aspnet user has
full access to the folder and even i gave the full access to C: but still
the same error is showing. Can anyone help me on this.

Thanks
Arvind
 
K

Ken Tucker [MVP]

Hi,

Maybe this will help
http://msdn.microsoft.com/vbasic/de...n-us/odc_wd2003_ta/html/odc_wd_vbnettortf.asp

Ken
---------------------
Hi all,

trying to create word document using following syntax in c#

private Word.ApplicationClass oWordApp = new Word.ApplicationClass();

Application throws error as :
Exception Details: System.UnauthorizedAccessException: Access is denied.

The ASP.NET process is not authorized to access the requested resource. For
security reasons the default ASP.NET process identity is
'{machinename}\ASPNET', which has limited privileges. Consider granting
access rights to the resource to the ASP.NET process identity.

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
"{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the
Write box in the Allow column.

But as per the security goes, i have ensured that machine\aspnet user has
full access to the folder and even i gave the full access to C: but still
the same error is showing. Can anyone help me on this.

Thanks
Arvind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top