?
Solved

VB-Client/Server(DCOM)

Posted on 2003-03-04
13
Medium Priority
?
514 Views
Last Modified: 2010-04-07
Sir,
  I have developed a DCOM application in Vb6.0 to get the
machine time of the machine.
Client connects to server ,gets the time and display's the time.Server gives the machine time to client.
   Problem is if client and server are in the same machine
it works correctly.Please help in seperating client and server.
Regs
Subramanya
0
Comment
Question by:Subramanya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +4
13 Comments
 
LVL 6

Expert Comment

by:marconovaro
ID: 8070182

I can't understand your question:

"Problem is if client and server are in the same machine
it works correctly"

Where is the problem ? :-)
Anyhow, separating the client and the server using DCOM is straightforward.

1. Install the server application on the server machine, and register it as a normal COM application (regsvr32)
2. Install the client application on the client
3. Now, you have to "tell" the client where he can find the server. You can do that with:

clireg32 -s <Name of the server PC> -d myDCOMProject.vbr

Hope this helps.
M.
0
 
LVL 1

Expert Comment

by:Cliven
ID: 8070209
You must set the dcomconfig first
key in DCOMCNFG.EXE at run and press ok to config your server program

0
 
LVL 5

Expert Comment

by:Cimperiali
ID: 8070719
Remember: when making the server, choose "Remote Server"
Then you will have a "vbr" file.
When building setup for client, remove the server file (.dll or .exe) and include the "vbr" file...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Subramanya
ID: 8073300
 When i run the client in the same machine it works fine but when run on different machine it gives error429 server object can not be instantiated.
  My server machine is win98,I have done the normal setting requirements. tell if you can helpout.
regs
Hegde
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 8073371

1. the server has to be an ActiveX EXE to run across DCOM. If the server is an ActiveX DLL, it cannot be used with DCOM (or, better, it needs an EXE to use it)

2. If you use Win98, you'll have to launch the server, then go to the client and activate that. DCOM will not run your ActiveX EXE on a 98 server (it could do on NT or 2000).

Hope this helps
M.
0
 

Author Comment

by:Subramanya
ID: 8134596
I made some setting changes using DCOM config
then it give the error70 permission denaied.
  I tryed running the server in WinNT.then also it give the
error 70.give some answer.
hegde
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 8134647

Hi,

that's quite a "normal" problem ... :-) It means that DCOM does not recognize your logged in user name as one of the users that have the rights to access your server.

Some questions about your network:

1- are you using an NT domain?
2- are you using a workgroup?

In case 1, you shall use DCOMCNFG on the server to allow access to the user name that is logged in on the client machine. If your application is generating events, you shall also do this on the client, allowing access to the server's user name.

In case 2, there is no way of using DCOM authentication. This means that you shall disable all authentications made by DCOM. To do this, choose your applcation and set "Authentication level" to "none" on both the client and the server.

Hope this helps
M

 
0
 
LVL 5

Expert Comment

by:Cimperiali
ID: 8134771
Be sure RPC protocol is running on client and server machines. It is a service (or a protocol, like Tcp/Ip).
0
 

Author Comment

by:Subramanya
ID: 8156662
Myne is workgroup.
   I changed athentication level to none after running
dcomcnfg at server exe,but couldn't do at client side
because it doesn't appear at client side.
   the problem exists.
hegde
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 8157389

If your client is running Windows 98, you have to download and install this:

"Error Message: Cannot Find the File 'Dcomcnfg'"
http://support.microsoft.com/?kbid=253311

Verify, with dcomcnfg:

1. "Enable DCOM on this computer" is set
2. That the first protocol on the list is TCP/IP

Have a look to the following article:

"HOWTO: Troubleshoot Run-time Error '70' in DCOM Applications"
http://support.microsoft.com/default.aspx?scid=kb;en-us;180384

and

"HOWTO: Configure DCOM for Visual Basic Using DCOMCNFG.EXE"
http://support.microsoft.com/default.aspx?scid=kb;en-us;183607


Hope this helps
Let me know
M
0
 

Expert Comment

by:CleanupPing
ID: 8900671
Subramanya:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9046901
Subramanya, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9151060
Question is PAQ'd and no points refunded.

YensidMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question