(Originally posted to framework.aspne t.webservices, but I am casting a
larger net and trying again)
I am using a library supplied by a third-party vendor. Although the
library has no UI, the vendor supplies it as an .OCX control.
I need to utilize this library in an ASP.Net Web Service. My Web
Service does not expose the OCX control's functionality directly, but
utilizes the OCX for its own internal purposes.
What is the best approach here?
Since I am more familiar with old VB6 than with .Net, I was thinking of
wrapping the OCX with an ActiveX server written in VB6. This ActiveX
server would provide the hidden form that the OCX requires. I would
then utilize the ActiveX server from ASP.Net via interop.
Does this make sense? How would I do this using just .Net -- without
getting VB6 involved?
TIA!
Lee 8 2740
you have a couple issues. asp.net webservices do not support sta com objects
(like ones built in vb6). you should host then in com+, or create your own
sta thread that manages calls to the ocx.
-- bruce (sqlwork.com)
<la*@labapps.co m> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. . (Originally posted to framework.aspne t.webservices, but I am casting a larger net and trying again)
I am using a library supplied by a third-party vendor. Although the library has no UI, the vendor supplies it as an .OCX control.
I need to utilize this library in an ASP.Net Web Service. My Web Service does not expose the OCX control's functionality directly, but utilizes the OCX for its own internal purposes.
What is the best approach here?
Since I am more familiar with old VB6 than with .Net, I was thinking of wrapping the OCX with an ActiveX server written in VB6. This ActiveX server would provide the hidden form that the OCX requires. I would then utilize the ActiveX server from ASP.Net via interop.
Does this make sense? How would I do this using just .Net -- without getting VB6 involved?
TIA! Lee
Don't use VB6! Just add a reference to this OCX. In solution explorer,
right click "References " and add it.
Wait, the control requires a form?? In a web service? Won't work.
Thanks for the heads-up on STA! I had threading in the back of my mind
but had not yet gotten around to researching it -- maybe I was just
afraid of what I would find <grin>
Sure it does, all you have to do is set the "aspcomp" attribute to true at
the page level.
Willy.
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:eP******** ******@tk2msftn gp13.phx.gbl...
| you have a couple issues. asp.net webservices do not support sta com
objects
| (like ones built in vb6). you should host then in com+, or create your own
| sta thread that manages calls to the ocx.
|
| -- bruce (sqlwork.com)
|
|
|
|
| <la*@labapps.co m> wrote in message
| news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
| > (Originally posted to framework.aspne t.webservices, but I am casting a
| > larger net and trying again)
| >
| > I am using a library supplied by a third-party vendor. Although the
| > library has no UI, the vendor supplies it as an .OCX control.
| >
| > I need to utilize this library in an ASP.Net Web Service. My Web
| > Service does not expose the OCX control's functionality directly, but
| > utilizes the OCX for its own internal purposes.
| >
| > What is the best approach here?
| >
| > Since I am more familiar with old VB6 than with .Net, I was thinking of
| > wrapping the OCX with an ActiveX server written in VB6. This ActiveX
| > server would provide the hidden form that the OCX requires. I would
| > then utilize the ActiveX server from ASP.Net via interop.
| >
| > Does this make sense? How would I do this using just .Net -- without
| > getting VB6 involved?
| >
| > TIA!
| > Lee
| >
|
|
Bruce,
Reviewing the @Page directive, it looks like it can only be used on ASP
Web Forms.
Can aspcompat be set for a web service, or is there something
comparable for a web service?
Thanks,
Lee
Sorry, I meant to address that last question to Willy.
<la*@labapps.co m> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
| Bruce,
|
| Reviewing the @Page directive, it looks like it can only be used on ASP
| Web Forms.
|
| Can aspcompat be set for a web service, or is there something
| comparable for a web service?
|
| Thanks,
| Lee
|
You are right, it only applies to web application not web services. Web
services cannot handle STA threads nor should you ever try to run OCX
components in web applications at all, there isn't such a thing like server
type OCX's , even if they don't have an UI, they have at least one hidden
window and this window's message queue need to be pumped and dispached.
Nothing in the web framework will do this for you, this result in high
memory consumption leading to process recyling and possible deadlocks.
Willy.
I just got a communication from the vendor -- it seems their OCX can be
instantiated without a hidden window.
That good news solves the hidden window nastiness described by Willy,
but I guess I still must resolve the STA issue.
I've got some custom connection pooling issues to deal with too, so
I'll probably bundle the STA and connection pooling solutions together.
Looking into COM+ now, but I may just fall back on my old-school roots
and create an out-of-process activeX server.
Thanks Bruce and Willy for your feedback,
Lee This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Yves Touze |
last post by:
Hi All,
I'm trying to migrate from SQL Server 7.0 to SQL Server 2000.
I've got some ASP page which call VB components that retrieve shaped
recordsets from SQL Server using the MSDATASHAPE provider.
Precisely, here is the code i have
Dim Cmdobj As New ADODB.Command
Cmdobj.ActiveConnection = oconn
Cmdobj.CommandType = adCmdStoredProc
|
by: Nashat Wanly |
last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and
Visual C# .NET
View products that this article applies to.
This article was previously published under Q310070
For a Microsoft Visual Basic .NET version of this article, see 308049.
For a Microsoft Visual C++ .NET version of this article, see 310071.
For a Microsoft Visual J#...
|
by: chris.dunigan |
last post by:
I'm looking for an example of how to execute an existing DTS package
from an
ASP (VB)script and would appreciate any and all response. I don't
even
know if it's possible
Thanks
- Chuck Gatto
Dan Guzman Apr 27 2000, 12:00 am show options
|
by: Michelle Keys |
last post by:
I am trying to call a print function to print a string from a database
using javascript.
Which is RC_DATA of Varchar2(2500).
This is a javascript is not being used. I have a thing that needs to be
modified:
if(e.CommandName =="Print")
{
string parsedreceipt = null;
parsedreceipt = DecodeReceipt (e.Item.Cells.Text);
Session =...
|
by: Siddharth Jain |
last post by:
hello
I am trying to enumerate the shared folders on a server using the
NetShareEnum function.
Now, when the server has a password set to access the shared folders,
the function returns system error code 5 (access denied).
However, if I know the password to access the shares, how can I specify
that in my program?
| |
by: acb |
last post by:
Hi,
I wrote a DLL Component (using Visual Studio 2005) and managed to
include it into a C# Console application.
I am now trying to include this component into a Web project. I copy
the DLL into the bin directory but am not able to progress. Can anyone
please guide me to an online tutorial on the subject.
Thanks,
|
by: Metal2You |
last post by:
I'm working on an ASP.NET 2.0 application in Visual Studio 2005 that
accesses a Sybase database back end. We're using Sybase SQL Anywhere
9.0.2.3228. I have installed and registered the Sybase .NET 2.0
DataProvider (iAnywhere.Data.AsaClient.dll) into the GAC so it can be
used in the ProviderName property of a SQLDataSource and loads properly...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready...
|
by: dixonjm |
last post by:
Hi,
I have a master page & various pages that will use this master page. Each content page will have a CSS & JS file which will be named the same as the content page.
When I try to load the CSS & JS files using the code behind of the content page, my buttons aren't rendered and Im not sure why?
Here is the code for my content page -...
|
by: MissElegant |
last post by:
Hi all,
I have tried to do a test to a lesson which was in the internet, but it doesn't work?
ANYBody here to help please??
The problem that what I enter in the textbox should be sent to the database to be stored, but it doesn't.!!! I don't know why
the aspx. page...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |