Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com

I wanted to ResolveUrl() from WCF service and found

http://www.west-wind.com/weblog/posts/2007/Sep/18/ResolveUrl-without-Page .
However the function assumes that the call is synchronous, in asynchronous call (e.g called from TPL task) HttpContext.Current==null.
I had to split my asynchronous method into two-a long asynchronous one, invoked as task and generating relative URL and a post-task, that is calling wwWebUtils.ResolveServerUrl(relativeUrL)

The http://www.codeproject.com/Articles/205425/ASP-NET-ResolveUrl-Without-Page  article suggests to use
System.Web.VirtualPathUtility.ToAbsolute("~/default.aspx");
but i expect, it wouldn’t work from asynchronous thread as well.
Posted on Saturday, July 7, 2012 9:51 PM Web Services/WCF | Back to top


Comments on this post: ResolveUrl() from WCF service

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net