473,799 Members | 2,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot create Excel Object via executable called from ASP.Net

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.Offic e.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.

Aug 3 '06 #1
1 1509
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.

"Keith McDonald" <kd********@hot mail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
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.Offic e.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.

Aug 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
50593
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") sPwd = inputbox("Enter password") WshNetwork.MapNetworkDrive "J:", "\\server1\data", false, "xyz_net\John", sPwd Msgbox "Drives has been map successful"
2
15784
by: brazilnut | last post by:
Hi. Let me explain the setup. I am using Visual Studio .NET to develop a sort of add-in (COM class) for Excel called SQLAddin. It basically queries a SQL server and pulls in data. Now within my Visual Studio Project, the SQLAddin references a compiled COM object built with Visual Studio 6.0 called SQLOld.dll. When I complie the project I get the following files in my \bin directory SQLAddin.dl SQLAddin.pd SQLAddin.tl Interop.SQLOld.dl ...
1
858
by: Benjamin | last post by:
I am making a Windows EXE (.NET Visual Basic Windows Application). I would like to make it possible to open Excel Worksheets from my EXE. This should work independent of Excel version on client machine (it is out of my control to know what versions of Excel different users has.) Anyway let us say that Excel 2000 is the oldest acceptable version. I build the EXE on a PC with Excel 2000. But I it is not working on an Excel 2003 machine! ...
3
20291
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet (MyXL). It uses the worksheet's Application property to make Microsoft Excel visible, to close it, and so on. Using two API calls, the DetectExcel Sub procedure looks for Microsoft Excel, and if it is running, enters it in the Running Object Table. The...
1
13283
by: PISINC | last post by:
I am having a problem creating an instance of the Acrobat application COM component ("AcroExch.App") with C#. The component "AcroExch.App" lives in the Acrobat executable, and you can't add "Acrobat.exe" directly as a reference. In VB 6.0, you use the CreateObject function with the "AcroExch.App" ProgID to instance the COM object.
1
4101
by: Vlad | last post by:
I am trying to decide whether I should buy Visual Basic.NET Standard. I’d like to know the answer to the following questions to help me decide 1. Can I use Visual Basic.NET Standard to create a spreadsheet program? I don’t need all the functionality of Excel (other than some formatting, using some formulas, adding/deleting rows/cells, and printing) 2. Would someone that has Excel be able to open a spreadsheet created in my program ...
3
3051
by: Administrator | last post by:
Hi, My web development server is a Windows 2000 SP4 system. Had created an aspx page with the following code which I had extracted from 1 of the Microsoft websites: Dim oExcel As Object Dim oBook As Object Dim oSheet As Object
2
5194
by: cendter | last post by:
Hi there, I am utterly confused - I have a form that starts an instance from excel and let's the user select a range. I then want to take this range as an array of doubles. I ran into trouble because the 1-based indexing that Excel passes (I think) so after many tries I got: Excel.Range aRange = xlApp.get_Range(textBox2.Text.Split(':'),textBox2.Text.Split(':') );
1
1384
by: Scott M. | last post by:
Many methods return objects when they are called. With Excel these objects are placed in memory and must be destroyed via ReleaseComObject as you have done with your NAR method, but the line: objExcel.Workbooks.Open(Page.MapPath("reports\BLCost.xls")) could be the culprit since the Open method returns a reference to a Workbook object that you haven't assigned a variable to. Since you have no variable to explicitly use to destroy the...
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10031
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9079
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.