473,320 Members | 1,854 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.

GetObject() func does not work in asp.net?

bic
When porting my Windows app to asp.net I get an System.Exception: Cannot
create ActiveX component. What function can I use instead? Thanks for your
comments.

--
bic
Sep 2 '05 #1
4 6355
It depends on what object you want to get and if it has been already created
(GetObject() is inherited from VB by VB.NET, to get existing object
instance, not for instantiating a new object instance), and more
importantly, if the user account has the permission to run that app the
object instance stands for.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
When porting my Windows app to asp.net I get an System.Exception: Cannot
create ActiveX component. What function can I use instead? Thanks for
your
comments.

--
bic

Sep 2 '05 #2
bic
Norman,

Thanks for your attempt to help. My Windows app works but moved to asp.net
the same code as follows
Dim objExcel As Object
objExcel = GetObject("P:\newbuild_data.xls")
I got bogged down. Why?
--
bic
"Norman Yuan" wrote:
It depends on what object you want to get and if it has been already created
(GetObject() is inherited from VB by VB.NET, to get existing object
instance, not for instantiating a new object instance), and more
importantly, if the user account has the permission to run that app the
object instance stands for.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
When porting my Windows app to asp.net I get an System.Exception: Cannot
create ActiveX component. What function can I use instead? Thanks for
your
comments.

--
bic


Sep 4 '05 #3
It is most likely that you have user permission problem: by default, the
user account running the ASP.NET app (ASPNET, or Network Service) does not
have permission to run applications, such as Word, Excel... on the web
server. There is quite some posts on this issue and how to solve this.
Search MS KB or Google will give lots of links.

BTW, running desktop app, such as Excel. on the server side, is risky and
tricky and not recommended, especially if the ASP.NET app is open to public
or has a lot concurrent users. Soon coming VS2005 for MS Office Tool add new
means to get data pushed into Excel/Word without actually opening
*.xls/*.doc on the server. You may want to look into that approach.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
Norman,

Thanks for your attempt to help. My Windows app works but moved to
asp.net
the same code as follows
Dim objExcel As Object
objExcel = GetObject("P:\newbuild_data.xls")
I got bogged down. Why?
--
bic
"Norman Yuan" wrote:
It depends on what object you want to get and if it has been already
created
(GetObject() is inherited from VB by VB.NET, to get existing object
instance, not for instantiating a new object instance), and more
importantly, if the user account has the permission to run that app the
object instance stands for.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
> When porting my Windows app to asp.net I get an System.Exception:
> Cannot
> create ActiveX component. What function can I use instead? Thanks for
> your
> comments.
>
> --
> bic


Sep 5 '05 #4
bic
Norman,

Thanks very much for being great help. Since you've helped answering this
question, would you please help answering my Win app question reqarding the
same object? What would I have to do to completely close the objExcel I
execute the app? For I have problem opening the file once the obj had been
accessed until I restart Windows. Thanks.
--
bic
"Norman Yuan" wrote:
It is most likely that you have user permission problem: by default, the
user account running the ASP.NET app (ASPNET, or Network Service) does not
have permission to run applications, such as Word, Excel... on the web
server. There is quite some posts on this issue and how to solve this.
Search MS KB or Google will give lots of links.

BTW, running desktop app, such as Excel. on the server side, is risky and
tricky and not recommended, especially if the ASP.NET app is open to public
or has a lot concurrent users. Soon coming VS2005 for MS Office Tool add new
means to get data pushed into Excel/Word without actually opening
*.xls/*.doc on the server. You may want to look into that approach.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
Norman,

Thanks for your attempt to help. My Windows app works but moved to
asp.net
the same code as follows
Dim objExcel As Object
objExcel = GetObject("P:\newbuild_data.xls")
I got bogged down. Why?
--
bic
"Norman Yuan" wrote:
It depends on what object you want to get and if it has been already
created
(GetObject() is inherited from VB by VB.NET, to get existing object
instance, not for instantiating a new object instance), and more
importantly, if the user account has the permission to run that app the
object instance stands for.

"bic" <bi*@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
> When porting my Windows app to asp.net I get an System.Exception:
> Cannot
> create ActiveX component. What function can I use instead? Thanks for
> your
> comments.
>
> --
> bic


Sep 7 '05 #5

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

Similar topics

90
by: Mark Hahn | last post by:
"Michael Geary" <Mike@Geary.com> wrote ... >Does anyone have some sample code where obj$func() would be used? > (Apologies if I missed it.) There have been so many messages about delegation...
10
by: Rich | last post by:
Hello, I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP. I have searched for articles on the following question but not come up...
2
by: CJM | last post by:
I'm building an ASP app that uses Windows Authentication (IWA). I have an authentication routine that assesses if & how the user can use the application (see code snippet below). Users of a...
2
by: Martyn Gwynne | last post by:
Thanks to some help yesterday, I am progressing with GetObject .. the following code will open and print a report. But, how can i get it to open, maximise WITHOUT printing by default? I need...
1
by: Martyn Gwynne | last post by:
I am progressing with GetObject .. The following code will open and print a report. I enquired how to open, maximise WITHOUT printing by default and it was suggested that I look at further...
2
by: Randy Harris | last post by:
I'm going nuts trying to figure this out, sure hope someone can help. My application uses TransferSpreadsheet to insert data into an existing Excel spreadsheet (which works), then opens and...
0
by: Wes | last post by:
Can anyone tell me how to change this C# code to grab all instances of an application that is running? Right now, it only will output to the first opened single document interface application n...
4
by: bic | last post by:
When porting my Windows app to asp.net I get an System.Exception: Cannot create ActiveX component. What function can I use instead? Thanks for your comments. -- bic
37
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.