473,320 Members | 2,147 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,320 software developers and data experts.

Can't instantiate Excel app object in ASP.net app (permissions issue)

The following line in my ASP.NET 2.0 app will not execute because of a
permissions issue.

Excel.Application objApplication = new Excel.Application();

How/where do I make the setting to allow this?

Thanks,

Ron
Feb 15 '06 #1
7 1409
Ron,
Have you set the aspCompat="true" in your @Page declaration? This is
required to do COM Interop in an ASP.NET page. What is the exact exception
you are getting?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ronald S. Cook" wrote:
The following line in my ASP.NET 2.0 app will not execute because of a
permissions issue.

Excel.Application objApplication = new Excel.Application();

How/where do I make the setting to allow this?

Thanks,

Ron

Feb 15 '06 #2
Peter,

This attribute is for in-proc native COM servers only, here the server is an
out-proc server application, so this is not applicable and not the OP's
issue euither.

Willy.

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:50**********************************@microsof t.com...
| Ron,
| Have you set the aspCompat="true" in your @Page declaration? This is
| required to do COM Interop in an ASP.NET page. What is the exact exception
| you are getting?
| Peter
|
| --
| Co-founder, Eggheadcafe.com developer portal:
| http://www.eggheadcafe.com
| UnBlog:
| http://petesbloggerama.blogspot.com
|
|
|
|
| "Ronald S. Cook" wrote:
|
| > The following line in my ASP.NET 2.0 app will not execute because of a
| > permissions issue.
| >
| > Excel.Application objApplication = new Excel.Application();
| >
| > How/where do I make the setting to allow this?
| >
| >
| >
| > Thanks,
| >
| > Ron
| >
| >
| >
Feb 15 '06 #3

"Ronald S. Cook" <rc***@westinis.com> wrote in message
news:OK****************@TK2MSFTNGP09.phx.gbl...
| The following line in my ASP.NET 2.0 app will not execute because of a
| permissions issue.
|
| Excel.Application objApplication = new Excel.Application();
|
| How/where do I make the setting to allow this?
|
|
|
| Thanks,
|
| Ron
|
|

You have to grant the asp.net user (the user under witch asp.net runs)
"launch" and "access" permissions for excel (run dcomncfg), by default this
user is "aspnet" or "network service" depending on the type of OS (XP/W2K or
W2K3).
Note also that excel (like all other office applications) aren't designed to
run from asp or any other server like application, and it's not supported
either. Be prepared to encounter a lot of problems.

Willy.


Feb 15 '06 #4
Willy,
Thanks I stand corrected.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Willy Denoyette [MVP]" wrote:
Peter,

This attribute is for in-proc native COM servers only, here the server is an
out-proc server application, so this is not applicable and not the OP's
issue euither.

Willy.

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:50**********************************@microsof t.com...
| Ron,
| Have you set the aspCompat="true" in your @Page declaration? This is
| required to do COM Interop in an ASP.NET page. What is the exact exception
| you are getting?
| Peter
|
| --
| Co-founder, Eggheadcafe.com developer portal:
| http://www.eggheadcafe.com
| UnBlog:
| http://petesbloggerama.blogspot.com
|
|
|
|
| "Ronald S. Cook" wrote:
|
| > The following line in my ASP.NET 2.0 app will not execute because of a
| > permissions issue.
| >
| > Excel.Application objApplication = new Excel.Application();
| >
| > How/where do I make the setting to allow this?
| >
| >
| >
| > Thanks,
| >
| > Ron
| >
| >
| >

Feb 15 '06 #5
http://support.microsoft.com/default.aspx?kbid=257757
MS does not recommend server side automation of office.
And for writing to Excel the following link:
http://www.eggheadcafe.com/articles/20021012.asp

"Ronald S. Cook" wrote:
The following line in my ASP.NET 2.0 app will not execute because of a
permissions issue.

Excel.Application objApplication = new Excel.Application();

How/where do I make the setting to allow this?


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Feb 15 '06 #6
Peter, didn't you write about this topic over there
http://www.eggheadcafe.com/articles/20021012.asp

;))
"Peter Bromberg [C# MVP]" wrote:
Willy,
Thanks I stand corrected.
Peter


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Feb 15 '06 #7
Yes thanks for reminding me, but as you know there are so many variables
involved with Excel. Seems like everybody wants to do it, and as Willy so
astutely points out, it is almost never a good idea.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Michael Nemtsev" wrote:
Peter, didn't you write about this topic over there
http://www.eggheadcafe.com/articles/20021012.asp

;))
"Peter Bromberg [C# MVP]" wrote:
Willy,
Thanks I stand corrected.
Peter


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Feb 16 '06 #8

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

Similar topics

4
by: A frustrated developer | last post by:
The following article discussed how to use the Excel, close and kill it: http://support.microsoft.com/default.aspx?scid=kb;en-us;317109 But if you added a oBook.SaveAs(...) to save the workbook...
1
by: Marc Miller | last post by:
I have a vbscript in an .asp page that issues the following: Set xlApp = CreateObject("Excel.Application") When I run my page, I get the error: ActiveX Component can't create object: 'Excel...
7
by: J-T | last post by:
I can instantiate my object in my *ASP.NET* application in two ways: A) public sealed class RSSingleton { private static ReportingServiceProxy m_RsProxy=null; static RSSingleton() {...
0
by: tg | last post by:
I cannot figure out what resource to which to give ASPNET permissions. I've tried everything I can think of. Any ideas? (Error message and snippet below) --------- Server Error in...
4
by: Mr.Doubt | last post by:
I've a widows application, that makes use of an EXCEL COM object, to run a few macros available in a EXCEL file. The object is created when the app is started and is closed when the app is closed....
8
by: SteveS | last post by:
I'm attempting to close EXCEL from within my VB.NET application. Using the excel object library to write data to my spreadsheet is working fine but when I try to quit application object it does not...
1
by: Keith McDonald | last post by:
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...
4
by: Tomas | last post by:
A newbie question: How can I instantiate objects dynamically in VB.NET. E.g. I have the object 'Player' and I would like to instantiate it with the several instances (James, Gunner, etc.), without...
1
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: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.