Can't Create Object in COM+

I have 5 years of experience in VB6, but I'm new to .NET. I've created a web service to replace VB6 SOAP calls. This web service needs to create objects that are actually COM+ proxies that I've installed from a DB server. The two servers are on a workgroup, not a domain. I've also specified in IIS that the anonymous user is a user I've created that also exists on the DB server (with the same password).

The problem is that whenever I do objVariable = CreateObject("Object.Class") to create the object from COM+, I get an error saying "Cannot create ActiveX component".

If I go into COM Security on the DB server and add the ANONYMOUS LOGON to the list of users and run it again, it creates the object, but then crashes when try to call a function. Now I get "Object reference not set to an instance of an object".

I've created other functions in the web service trying to figure out what's going on. One of them returns My.User.Name.ToString, the other returns System.Security.Principal.WindowsIdentity.GetCurrent.Name.ToString. When running on the development computer, everything looks good. However, when running on the web server, the first function doesn't return anything and the second function returns "NT AUTHORITY\NETWORK SERVICE". Do web services ignore the IIS settings for the anonymous user

I tried running the dll locally and discovered that I had to add the "NETWORK SERVICE" to the security permissions of the dll to get it to work. I tried the same on the DB server, but it didn't work. I've also gotten it to work on the development computer.

Is this issue because the servers are not on a domain Any suggestions will be greatly appreciated.



Answer this question

Can't Create Object in COM+

  • Michal Donat

    Hi Matt,

    I'm trying to create a VB6+SOAP through web service call. Do you have any sample codes how this works


  • Can't Create Object in COM+