Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Creating Word Document Issue

Reply
Thread Tools

Creating Word Document Issue

 
 
Arvind P Rangan
Guest
Posts: n/a
 
      02-16-2005
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


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      02-16-2005
Arvind,

In the document
http://support.microsoft.com/default...b;en-us;257757 you will find
that Microsoft is strongly against using office automation on server side.
Nevertheless if you insist, you can do it. Try giving permission to ASPNET
user account to access word application
object. It can be done with dcomcnfg.exe

Eliyahu


"Arvind P Rangan" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      02-16-2005
Hi,

Maybe this will help
http://msdn.microsoft.com/vbasic/def...vbnettortf.asp

Ken
---------------------
"Arvind P Rangan" <> wrote in message
news:...
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-25-2007 06:34 AM
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-24-2007 01:59 PM
Creating Word Document Issue Arvind P Rangan ASP .Net 2 02-16-2005 10:17 AM
creating word document in asp.net Nikhil Patel ASP .Net 4 05-13-2004 02:56 PM
Modifying a Word document without using Word Automation Michael G. Schneider ASP General 5 12-16-2003 06:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57