473,396 Members | 1,789 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.

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 6363
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
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
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
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
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...
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.