How can I write a activeX that support socket communication in web page?

W

Wade Yin

Hi,

If I can write a ActiveX component that can support socket
communication in webpage, that will make browser have strongger
capability to communicate with different clients, but not only can
exchange info with the web server.

I don't familarize with C# programming and here I just want to
know is that possible to implemented?

Any comments are welcome.


Thanks

Wade
 
A

Alvin Bruney [MVP]

Sure it's possible but it doesn't make any sense. What you want to do is
create a client that uses the browser to create another connection that can
communicate with the server. That kind of programming only makes sense in
file upload scenarios - and that is a stretch.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 
S

Samuel R. Neff

Another option is to create an application for the Adobe Flash Player.
There are several development options but the best is Adobe Flex.

http://www.adobe.com/products/flex/

You can write a widget in Flex to do the necessary UI parts and
communications or you call also hook it up with Javascript to have
Flex to just the socket communications.

Also for communicating with .NET the Fluorine library provides very
good object serialization support.

http://fluorine.thesilentgroup.com/fluorine/index.html

HTH,

Sam
 
N

Nicholas Paldino [.NET/C# MVP]

Wade,

Creating ActiveX components is not supported outright in .NET. There
are ways to do it, but quite frankly, they are hacks, and I wouldn't rely on
them.

You can always embed the .NET control into IE. The following link shows
how to do so:

http://windowsclient.net/articles/iesourcing.aspx

There are security considerations as well which you have to address when
working with a .NET control, which the article points out.
 
S

Samuel R. Neff

This extra connection type of programming makes sense in a lot of
scenarios and is common in Flash applications--it's been possible
since at least Flash 5 (we're in Flash 9 now).

Games can use the extra socket connection to send real-time data back
and forth so you can write multiplayer games on the web (most only
games are written in Flash).

Business applications can use extra socket connections for pushing
data from client to server. In our own applications we use standard
HTTP for the client to send commands to the server but have an extra
socket connection for status messages. We also can use it to manage
concurrent actions--two clients log in to work on the same thing, we
can let them collaborate easily. Adobe Connect is another example
where many users can log in and listen to a presentation online. It
provides full screen sharing and chat and stuff within a Flash
application (clients only need the Flash player to view Adobe Connect
content).

Some general purpose apps can also benefit from an open socket.
Digg.com uses a type of pull-wait scenario to fake pushing data to the
client. A real open socket would be far easier to program.

Sam
 
A

Alvin Bruney [MVP]

That's precisely the point, these applications aren't at all suited for the
browser since they extend past browser functionality. In any case, the way
forward for that sort of thing is managed user controls. Creating the
embedded control can follow a pattern similar to what is described here:
(http://support.microsoft.com/kb/555685).You'll need to be aware of
permissions issues surrounding CAS. Cas for managed user controls is here
(http://support.microsoft.com/kb/555688).

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 
S

Samuel R. Neff

I think the relm of "aren't at all suited for the browser" is quite a
bit smaller than it used to be.

Sam
 
W

Wade Yin

You can image when visiting some website, it can provide you various
activex contorl. Trhough some of them you can communicate with your
online friends (embeded in the opened web page), at the same time you
can use other Activex component to play some small online games. And
more applets that need the socket communcation can be build to do more
task in the webpage, so we don't need always install so much different
clinet software, just maintain the IE Plugin should be enough... Is
that interesting?
 
W

Wade Yin

Thanks, Sam! Yes that would be another way to implement the
requirement.
But I have to study a new develop tool, but I'm lazy :)
 
W

Wade Yin

Um! The name is changed? Is it called "Window Form Control" which can
be used in Web-based application?

Anyway, thanks for the given reference!


Wade,

Creating ActiveX components is not supported outright in .NET. There
are ways to do it, but quite frankly, they are hacks, and I wouldn't rely on
them.

You can always embed the .NET control into IE. The following link shows
how to do so:

http://windowsclient.net/articles/iesourcing.aspx

There are security considerations as well which you have to address when
working with a .NET control, which the article points out.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


If I can write a ActiveX component that can support socket
communication in webpage, that will make browser have strongger
capability to communicate with different clients, but not only can
exchange info with the web server.
I don't familarize with C# programming and here I just want to
know is that possible to implemented?
Any comments are welcome.

Wade
 
S

Sheng Jiang[MVP]

This has nothing to do with C#. I suggest you ask this question in one of
the microsoft.public.inetsdk newsgroups


--
Sheng Jiang
Microsoft MVP in VC++
I am also trying to create an ACtiveX for use in IE. While it does not
use sockets, it does use COM ports. I have the code working great using an
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top