Get current SharePoint site URL port number


Uri uri = new Uri("http://Site:80/SitePages/AllItems.aspx");
string requested = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port;

Comments

Popular posts from this blog

Difference between Application Page and Site Pages

Creating a Document Library in SharePoint hosted APP using SharePoint 2013 REST API

This content database has a schema version which is not supported in this farm