473,403 Members | 2,366 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,403 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 6364
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.