开发者

ASP.Net How do I get the base URL without HttpRequest?

I am trying to get the base URL from the worker role. I can't get it from there.

How do I get the base URL in this situation?

I have found this property:

Application.Current.Host.Source

but, in order for this to work, I need the reference System.Windows.dll which is in the Silverlight folder. Since I am not using Silverlight for this part of the application I am开发者_C百科 not sure if I should use it here or find another way.

What do you think?


Are you trying to find the external URL of your app? (Like something.cloudapp.net?) If so, there isn't a good way to do this from within a Windows Azure application (without calling out to the Service Management API and looking up the deployment by ID).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜