【发布时间】:2010-11-29 14:12:31
【问题描述】:
我正在尝试使用来自经典 ASP 的 WCF 日志服务,而无需部署 Com 包装器。我找到了这样做的方法here。这是简化的 vb 脚本。
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")
这适用于 Server 2008,但会因 Server 2003 上的错误而失败。
Failed to do mex retrieval:Metadata contains a reference that cannot be resolved: net.pipe://localhost/Services/Logging/LoggingManager/Mex..
只有在通过 ASP 运行时才会失败,在同一台机器上使用相同代码的示例 VBS 文件可以正常工作。
我认为这可能与权限有关,但不知道从哪里开始。有人有什么想法吗?
编辑 - 让我澄清一下 WCF 主机是作为 NETWORK SERVICE 运行的 Windows 服务。
如果这属于服务器故障,版主可以移动它。我在那里也有一个帐户。
【问题讨论】:
-
serverfault.com 上的人很擅长这些东西。
标签: wcf asp-classic windows-server-2003