473,396 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Launching Excel from ASP.NET application

I have an ASP.NET application installed on a Windows Server 2003
computer. MS Excel is also installed on the same computer. And yes, the
application makes use of Excel.

When the Application Pool Identity for the pool in which this
application resides is set to the default (NetworkService), everything
runs as expected. However, for this application to work, it is
necessary that I use a different user account. And when I do, there is
a problem.

The code that gets executed is this:

Public Sub OpenWorkbook(ByVal FilePath As String)
excelApp = New Excel.Application
excelApp.Visible = True
excelApp.DisplayAlerts = False
excelWorkbook = excelApp.Workbooks.Open(FilePath)
End Sub

When the first line is executed, a new Excel process is created. Thus,
I do not believe that the problem is related to DCOM object
permissions. (Using Component Management, I have granted the App Pool
Identity user launch and configuration permissions for Excel.) However,
when the program tries to open the file, it simply fails to do so,
i.e., it hangs. Note that I do not believe this to be a file permission
issue as this behavior was observed even when the App Pool Identity
account had been added to group administrators. (I also logged into the
server using the App Pool Identity account user and was able to open
and save the file from within Excel.)

Other things tried:
The App Pool Identity account has been added to group IIS_WPG. I have
ensured that this group has Modify permission on the directory into
which the spreadsheet is to be saved. In the Local Policy Editor, I
have added this user to the 'Access this computer from network',
'Log on as batch job', and 'Log on as service' policies. I have
restarted IIS and have rebooted the server. In addition, I believe that
all items listed the MS document 'ASP.NET Required Access Control
Lists) have been addressed.

I am not sure what else to try. Please offer a suggestion.

Nov 19 '05 #1
1 1813
I have an ASP.NET application installed on a Windows Server 2003
computer. MS Excel is also installed on the same computer. And yes,
the application makes use of Excel. <snip> I am not sure what else to try. Please offer a suggestion.


Hello Gerry,

Perhaps you've heard this before, but I don't know what else to offer other
than to mention that using Excel on a server is not recommended, even by
Microsoft:

http://support.microsoft.com/default...;EN-US;q257757

There are third-party tools specifically designed for this kind of use:

http://officewriter.softartisans.com

Best,
Chris

Nov 19 '05 #2

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

Similar topics

1
by: Peter | last post by:
Hi, please advise the following how-to Within a .NET application, launch an Excel or Word document in a different process Thanks Peter
4
by: davidw | last post by:
Just like you can launch word or excel from IE, I want to develop something so I can launch my app from IE, thanks!
3
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...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
4
by: Staticbob | last post by:
Guys, I have this code that loads some data from a SQL view into a datatable, then into arrays, I can then export it to a predefined Excel template that creates lots of fancy charts and stuff...
1
by: John A. Bailo | last post by:
Excuse the novice aspects of this question, but: What techniques are available to me for launching one c# application ( console .exe) from another? For example, I know there is the Process and...
0
by: microb0x | last post by:
Is there any difference in the way an Access .mdb file is launched from directly double-clicking the file through windows explorer versus using code within another Access file to launch the...
1
by: =?Utf-8?B?TWFyayBIb2xsYW5kZXI=?= | last post by:
Hi All, I am trying to launch an application based on the extension just like windows explorer does, specifically with regards to templates. For example, 1. When you double click on a word...
0
by: SteelNetNob | last post by:
I am having a problem where I have a COM application that can be run stand-alone and programatically via COM interop. If an instance of the COM application is being run when my .NET application that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.