views:

327

answers:

1

I am trying to consume a WCF logging service from classic ASP without deploy a Com wrapper. I found a method of doing so here. Here is the vb script, simplified.

Dim addr
addr = "service:mexAddress=""net.pipe://localhost/Services/Logging/LoggingManager/Mex""," _
& "address=""net.pipe://localhost/Services/Logging/LoggingManager/classic/""," _
& "contract=""ILoggingManagerClassic"", contractNamespace=""http://Services.Logging.Classic/""," _
& "binding=""NetNamedPipeBinding_ILoggingManagerClassic"", bindingNamespace=""http://Services.Logging.Classic/"""

set objErrorLogger = GetObject(addr)
Dim strError : strError = objErrorLogger.LogError("blahblah")

This works on Server 2008, but fails with this error on Server 2003.

Failed to do mex retrieval:Metadata contains a reference that cannot be resolved: net.pipe://localhost/Services/Logging/LoggingManager/Mex..

Only when running through ASP does it fail, a sample VBS file on the same machine using the same code works fine.

I think it may be permission related, but don't know where to begin. Anyone have any ideas?

EDIT - let me clarify that the WCF host is a windows service running as NETWORK SERVICE.

If this belongs on server fault, a moderator can move it. I have an account there as well.

A: 

You are using WCF with net pipe binding.

Windows 2003 does not support net pipes.

Update:

WCF net pipe uses windows Activation Serices (WAS) which is included in Windows 2008

http://msdn.microsoft.com/en-us/magazine/cc163357.aspx

Net pipes works on windows 2003, but not WCF net pipes

EDIT

Your comments are right that when you are running the WCF as a windows service and not in IIS, it should work on winows 2003.

Having said that, it must be related to the call coming from the ASP web site. One place to start is, are there any errors in your event log.

Shiraz Bhaiji
If that is true, how does the same code work in a stand-alone vbscript file? It is also using net pipes.
Jab
I saw your update but I just don't see how a vbscript file ran from the machine using the same WCF service works, but it doesn't work from the website. That would imply the net pipes are working as expected. I think WAS only applies to those hosting the WCF service through IIS, which I am not.
Jab
There are no errors in the event log. The only error is the error reported from the site, it acts as if it can't "see" the service at that net.pipe url.
Jab

related questions