2012-03-14 170 views

回答

1

你試過嗎?

OperationContext context = OperationContext.Current; 

MessageProperties prop = context.IncomingMessageProperties; 

RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; 

string ip = endpoint.Address; 
+0

請檢查'endpoint'爲空。 – 2012-03-14 11:19:48

+0

我都試過,但我得到endpoint.Address爲「:: 1」 – 2012-03-14 11:21:32

+0

是您的本地主機上的服務? – Mentezza 2012-03-14 11:24:30

相關問題