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 / Security / January 2006

Tip: Looking for answers? Try searching our database.

COM and Windows control on webpage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
poppy - 20 Jan 2006 17:19 GMT
I have a windows control dll in my root folder and embedded it on a webpage
which works fine.
I then tried to make a reference to a COM object in the control which needs
to run on the client machine.  I copied the dll for this object into the root
as well.

When I run the web application on my machine it works fine as I have the COM
object registered on my machine.
I then went to a colleagues machine and ran the .net configuration wizard in
control panel and set the url "http://mymachinename/website/*" to full trust.
Unfortunatley it did not work as I received a strange COM error.

Can anyone tell me what I am doing wrong ?
Can a windows control in a webform ever call a com object on the client
machine ?

It is essential that I do this for a small intranet application I am working
on.
TIA
Yunus Emre ALPÖZEN [MVP] - 22 Jan 2006 15:05 GMT
Web & Windows application have a main difference. In web applications, your
code executed on your server. In windows applications, your code executed on
client application (no matter if it connects to server to perform bussiness
operation, executable file hosted on client). Therefore, u have two choices.
One is converting your web application to windows application, and the other
one is implementing an activeX component and embeding your COM object inside
this activex component.
Both makes sense, but choice is  your..

Signature

HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
Microsoft .NET & Security MVP

>I have a windows control dll in my root folder and embedded it on a webpage
> which works fine.
[quoted text clipped - 21 lines]
> on.
> TIA
Nicole Calinoiu - 24 Jan 2006 13:44 GMT
COM components normally required registration on the machines on which they
are intended to run.  However, if your client machines are all running
Windows XP, you may be able to take advantage of registration-free COM
(although I haven't seen any explicit mention of whether this should work
from an IE-hosted winforms control).  See
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx and
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx?side=true
for details.

If you need to support clients running earlier Windows versions, you might
be able to take advantage of the technique described at
http://blogs.msdn.com/mikhailarkhipov/archive/2005/04/01/404433.aspx.
However, for a "small intranet application", I'm guessing that installing
and registering the target COM component on the client machines would
probably be a simpler approach overall...

>I have a windows control dll in my root folder and embedded it on a webpage
> which works fine.
[quoted text clipped - 21 lines]
> on.
> TIA

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.