PC Review


Reply
Thread Tools Rate Thread

Creating Word Document Issue

 
 
Arvind P Rangan
Guest
Posts: n/a
 
      16th Feb 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
 
      16th Feb 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
 
      16th Feb 2005
Hi,

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

Ken
---------------------
"Arvind P Rangan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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
Rate This Thread
Rate This Thread:

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
Creating Word document of Word 97-2003 file type on the New menu in Vista =?Utf-8?B?TWlrcm9YUA==?= Windows Vista General Discussion 7 19th Mar 2007 04:59 PM
Creating Word document of Word 97-2003 file type on the New menu in Vista =?Utf-8?B?TWlrcm9YUA==?= Microsoft Word New Users 7 19th Mar 2007 04:59 PM
Creating a Word document in .NET - convert HTML to Word? =?Utf-8?B?ZWR3YWxkbw==?= Microsoft Dot NET 0 12th May 2005 05:04 PM
Creating Word Document Issue Arvind P Rangan Microsoft VB .NET 2 16th Feb 2005 10:17 AM
Creating Word Document Issue Arvind P Rangan Microsoft ASP .NET 2 16th Feb 2005 10:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:53 PM.