Cannot create Excel Object via executable called from ASP.Net

  • Thread starter Thread starter Keith McDonald
  • Start date Start date
K

Keith McDonald

We have executable program that is used to create and send emails to
users. Working on getting it able to be called from a web page we're
having some problems. First of all if debugging the website from local
it returns the common JIT debugger failure, access denied after the
Process.Start() call. Access denied for machine\ASPNET. Haven't been
able to correct even by adding the user to Administrators but can get
around by changing machine.config-processmodel-username to system.

Once past that we can see where it is erroring with
System.Runtime.InteropServices.COMException. Server execution failed.

on this line
Dim oExcel As New Microsoft.Office.Interop.Excel.Application

I assume this is also a permissions issue but running via system gives
this error so not sure what is wrong.

Any ideas?

Thanks.
 
1. Either use impersonation for your asp.net app or give the right to ASPNET
to execute Excel executable. By changing machine.config you have forced
every single ASP.Net app on your machine to run under that user context.

2. Try setting ASPCOMPAT attribute on your page. You may be runing into
threadong model issue.
 
Back
Top