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 / Interop / July 2007

Tip: Looking for answers? Try searching our database.

Problems creating DCOM server in C#; urgent...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
czapkofan@gmail.com - 10 Jul 2007 22:52 GMT
Hello,
I need to create a DCOM server in C# with a friend, to be accessible
for a client application with embedded VBS. We started with a "Hello
world" article at

http://blogs.msdn.com/adioltean/archive/2004/06/18/159479.aspx

but, unfortunately, it seems to work only partially for us, even after
quite a few days of fighting with the problem and googling and MSDN
searching :/ The application can be succesfully run from the local
computer (using a simple CreateObject VBS script running under WSH),
but throws an exception when run remotely, bailing out on the line
where we set ApartmentState (either as a property, or calling the
SetApartmentState() method). It doesn't run properly at all if we
remove the ApartmentState setting line.

How can we make it work? Or maybe there is some other, maybe easier
way to create the server than the method described in the article?
It's very important for us to make it work, we'd be grateful for any
help, hints. If we should provide some more info, please tell us.

- The server computer is WinXP, the client computer will also be WinXP
but we have to do testing on Win2000.

- A "TestDCOM.exe" application (kind of a DCOM-ping) from
http://support.microsoft.com/kb/259011
works for us, and does get succesfully invoked from a .vbs script on
the client as well. We have merged the registry settings from this
application with those created after following the "Hello world"
article and we're setting them both on the server and client
(regarding dcomcnfg.exe).

- Btw, we have no background in D/COM; still, we've already learned
some basics when trying to solve the problem.

Greetings
Mateusz Czaplinski
czapkofan@gmail.com - 13 Jul 2007 00:16 GMT
Found some way which I hope will solve our problem: to create a DLL in
C# and host it with a "DLL Surrogate". This way we shouldn't have
problems with playing with Windows Services (as required(?) in EXE &
out-of-process) and will be able to use *D*COM (problematic with a DLL/
in-process, as it normally doesn't have an AppID). Huzzah. But it
required truly *lots* of RTFMing on Google & MSDN.

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.