PRB: "Permission Denied" Using WithEvents and DCOM on WIN95ID: Q179835
|
Receiving Error 70: "Permission Denied."
The client application has referenced a remote server class using the keyword WithEvents. When the server attempts to raise an event to the remote client, it attempts to identify itself to the client before it can raise the event. Remote access is not being granted to the server; therefore, the error occurs.
You can enable a Windows 95 or Windows 98 DCOM client to receive remote
events by adding "The World" user to the client machines default security
group using DCOMCNFG.EXE and setting it to "Access Granted."
The DCOM configuration that needs to occur for an NT server (or
workstation) to communicate with a Windows 95 or Windows 98 client
application is the following:
On the DCOM SERVER using DCOMCNFG.EXE:
CUSTOM ACCESS PERMISSIONS:
Everyone -allow access
System -allow access
Interactive -allow access
CUSTOM LAUNCH PERMISSIONS:
Everyone -allow launch
System -allow launch
Interactive -allow launch
CUSTOM CONFIGURATION PERMISSIONS:
CREATOR-OWNER -full
Everyone -read
System -full
Interactive -full
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
As an alternative to using remote events, you can implement a callback to
enable two-way communication between a DCOM client and server using Visual
Basic 5.0.
For more information regarding callbacks, please see the following article
in the Microsoft Knowledge Base:
Q175510 : VB5DCOM.EXE: Using Callbacks and WithEvents with DCOM
Dim WithEvents MyServer as DCOMServer.EventClass
Private Sub Command1_Click()
Set MyServer = New DCOMServer.EventClass
Call MyServer.TimerTask(9.84)
End Sub
Private Sub MyServer_UpdateTime(ByVal dblJump As Double)
Dim ServerTime as String
ServerTime = Str(Format(dblJump, "0"))
DoEvents
End Sub
Private Sub MyServer_Complete()
Set MyServer = Nothing
End Sub
Public Event UpdateTime(ByVal dblJump As Double)
Public Event Complete()
Public Sub TimerTask(ByVal Duration As Double)
Dim dblStart As Double
Dim dblSecond As Double
Dim dblSoFar As Double
dblStart = Timer
dblSoFar = dblStart
Do While Timer < dblStart + Duration
If Timer - dblSoFar >= 1 Then
dblSoFar = dblSoFar + 1
RaiseEvent UpdateTime(Timer - dblStart)
End If
Loop
RaiseEvent Complete
End Sub
VB5DCOM.exe file in the Microsoft SoftWare Library.
For additional information, please see the following article in the
Microsoft Knowledge Base:
Q171456 : PRB: Run-time error -2147023071 (80070721) using WithEvents
Additional query words: "Error 70" kbVBp500 kbVBp kbWinOS98 kbDSupport kbVBp600 kbDCOM kbdse
Keywords :
Version : WINDOWS:5.0,6.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 20, 1999