Appfabric WF4-WCF services, how to retrieve current url in codeactivity without httpcontext?
- 阅读更多 关于 Appfabric WF4-WCF services, how to retrieve current url in codeactivity without httpcontext?
问题 I have developed a wf-wcf services with a code activity and in it I want to retrieve the current URL of the service. If I'm disabling the persistence feature of appfabric I can retrieve the URL using HttpContext.Current.Request.Url.ToString() If the persistence feature is enabled then the httpcontext is null. Is there a different way to retrieve the URL of the WCF that hosts my code activity? 回答1: You need to implment IReceiveMessageCallback and add that to an activity's context. In the