We have a VB app that calls VB COM+ components on a separate server machine (classic 3 Tier). To instantiate a COM+ object on the server, we invoke a function that calls CoCreateInstanceEx:
Dim ServerInfo as COSERVERINFO
....
'Decide on the appropriate context value.
If RunOnComputer = "" Then
Context = CLSCTX_SERVER
Else
Context = CLSCTX_REMOTE_SERVER
End If
'Setup the COSERVERINFO structure.
ServerInfo.pwszName = StrPtr(RunOnComputer)
ServerInfo.pAuthInfo = VarPtr(objAuthInfo)
' Create an instance of the object
lRet = CoCreateInstanceEx(typGUID, CLng(0), Context, ServerInfo, CLng(1), typMQI)
Normally the ServerInfo.pwszName (denoting the server's hostname/IP) was equal to an empty string. The intention was that the name would be obtained through the COM+ proxy's RemoteServerName named value.
After installing XP Service Pack 2, the call to CoCreateInstanceEx fails, with the Error Handler throwing Error 70 - Permission Denied. We can get around this by explictly setting COSERVERINFO.pwszName to the server's IP address or hostname.
What it is the rationale for this error being thrown? Are there any non-code changes (ie. modifying DCOM ACLs, Transaction Config. security, etc.) that would allow the call to CoCreateInstanceEx with the empty string assigned to ServerInfo.pwszName?
Dim ServerInfo as COSERVERINFO
....
'Decide on the appropriate context value.
If RunOnComputer = "" Then
Context = CLSCTX_SERVER
Else
Context = CLSCTX_REMOTE_SERVER
End If
'Setup the COSERVERINFO structure.
ServerInfo.pwszName = StrPtr(RunOnComputer)
ServerInfo.pAuthInfo = VarPtr(objAuthInfo)
' Create an instance of the object
lRet = CoCreateInstanceEx(typGUID, CLng(0), Context, ServerInfo, CLng(1), typMQI)
Normally the ServerInfo.pwszName (denoting the server's hostname/IP) was equal to an empty string. The intention was that the name would be obtained through the COM+ proxy's RemoteServerName named value.
After installing XP Service Pack 2, the call to CoCreateInstanceEx fails, with the Error Handler throwing Error 70 - Permission Denied. We can get around this by explictly setting COSERVERINFO.pwszName to the server's IP address or hostname.
What it is the rationale for this error being thrown? Are there any non-code changes (ie. modifying DCOM ACLs, Transaction Config. security, etc.) that would allow the call to CoCreateInstanceEx with the empty string assigned to ServerInfo.pwszName?