开发者

SharePoint Url in Webpart with Alternate Acess mapping

开发者 https://www.devze.com 2022-12-16 04:25 出处:网络
I have deployed my web part to a SharePoint environment having alternate accessing mapping configured.

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

精彩评论

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