我正在运行一个服务,我正在使用Vb Script从客户端应用程序访问它。
客户端应用中的代码。是 System.Diagnostics.Process.Start(@ “C:\用户\ ade1kor \桌面\ test.vbs”);
test.vbs就像:......
Dim addr
addr = "service:mexAddress=""net.tcp://localhost:8523/Service1/mex"","
addr = addr + "address=""net.tcp://localhost:8523/Service1"","
addr = addr + "contract=""IService1"", contractNamespace=""WcfServiceLibrary1"","
addr = addr + "binding=""NetTcpBinding_IService1"", bindingNamespace=""http://tempuri.org/"""
Dim service
Set service = GetObject(addr)
MsgBox (service.GetData(3))
.....
但是当我运行客户端时,会出现一个错误对话框,告诉
"Error:Failed to do mex retrieval:Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:8523//Service1//mex'..
Code: 800401E4"
我不知道该怎么做......如果有人有任何想法,请分享
答案 0 :(得分:0)
contractType={9213C6D2-5A6F-3D26-839B-3BA9B82228D3}
其中GUID是注册客户端COMInterop启用.NET程序集的COM classid。