MSOffice and ASP.NET

  • Thread starter Thread starter S.Kartikeyan
  • Start date Start date
S

S.Kartikeyan

Hello,

I have a ASP.NET Page which allows the user to upload a file.
What i have to do is
when the user uploads a PowerPointFile i have to convert in to html
and
save both ppt and html versions of it.

I have a working program of converting ppt to html on localmachine.
When I try to do it from the ASP.NET Page I get an error Access
Denied.

Regarding Access to the directory i am able to save the posted file
(ppt)to the
directory.only when i convert it to html and save i get the problem.

Here are the details.
----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
In the source Error sections of ASP.NET error page i have the first
line of the
function where i am creating the PowerPoint.ApplicationClass() causing
the problem.


Is the problem due to desktop access to the powerpoint application.
How to fix the problem.
OR
Does the MSOffice components work only with the standalone
applications.



S.Kartikeyan
 
There are probably 2 aspects to it.

1. You are trying to interop within ASP.NET and the security policy may
prohibit this.
2. The loading and conversion using powerpoint will probably require access
to other directories, and possibly generate some temporary files somewhere.
You may need to grant additional access to some directories (and I am not
sure which ones) for the aspnet user (Win2000) or NETWORK SERVICE (Win2003)
to make it work. Check powerpoint for some temp directories that are setup
within the program or see where it might be creating temporary files under
your known working user.
 
Also, it should be noted that unattended server side use of Microsoft Office
in this manner is not a supported scenario.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 
How to change the Interop security policy so that it can be done.
I don't think it uses temporary files.
There are probably 2 aspects to it.
1. You are trying to interop within ASP.NET and the security policy may
prohibit this.
--
- Paul Glavich

You mean it is impossible to do it.????????
Or
just the official documentation does not list the scenario,but the scenario is
possible
 
Back
Top