Classic ASP to WCF using the Service Moniker
- by Jab
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.