Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / September 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bic - 02 Sep 2005 01:59 GMT
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.

Signature

bic

Norman Yuan - 02 Sep 2005 15:29 GMT
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.

> 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 - 04 Sep 2005 08:53 GMT
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?
Signature

bic

> 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
[quoted text clipped - 6 lines]
> > your
> > comments.
Norman Yuan - 05 Sep 2005 18:14 GMT
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.

> Norman,
>
[quoted text clipped - 17 lines]
>> > your
>> > comments.
bic - 07 Sep 2005 07:21 GMT
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.
Signature

bic

> 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
[quoted text clipped - 29 lines]
> >> > your
> >> > comments.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.