开发者

SharePoint Url in Webpart with Alternate Acess mapping

I have deployed my web part to a SharePoint environment having alternate accessing mapping configured. The public Url is https://sharepoint.com and the internal url for the same is http://internal-sharepoint.com

On one button click, i need to redirect the url to the same page with some additional parameter in query string.

I tried with both SPcontext.Current.Web.Url and Page.Request.Url.ToString() and both of them seem to give me the internal Url rather than the mapped url.

So the sequence is User types in https://sharepoint.com, clicks on the button and开发者_开发知识库 gets redirected to http://internal-sharepoint.com?myparam=somthing. Rather i would expect it be https://sharepoint.com?myparam=somthing

Please let me know your thoughts.

Thanks


Did you add both urls as public URLs in Alternate Access mapping?

Regardless, Page.Request.Url should always return the exact url you're seeing in the browser..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜