{"id":35,"date":"2012-10-30T19:47:00","date_gmt":"2012-10-30T19:47:00","guid":{"rendered":"https:\/\/www.sharepoint13.org\/?p=35"},"modified":"2012-10-30T19:47:45","modified_gmt":"2012-10-30T19:47:45","slug":"display-client-ip","status":"publish","type":"post","link":"https:\/\/www.sharepoint13.org\/?p=35","title":{"rendered":"Display client IP"},"content":{"rendered":"<p>Today I got a request from one of my customers to display the IP address of the client computer on the SharePoint intranet. Well I started of like any it-consultant searching the big internet for a web-part or some nice code to copy with pride. Well it didn&#8217;t happen this time. I grabbed a cup of coffee and out of the blue came the solution as easy as one two three.<\/p>\n<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/12PageViewer.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"12PageViewer\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"12PageViewer\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/12PageViewer_thumb.jpg\" width=\"264\" height=\"90\" \/><\/a>&#160; <\/p>\n<p>First I created a Web Site on port 86 on the front end SP server. Created a new folder for the Pysical&#160; inetpub\\wwwroot\\86 (any free port in 8x is ok)<\/p>\n<\/p>\n<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/1.createweb.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"1.createweb\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"1.createweb\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/1.createweb_thumb.jpg\" width=\"244\" height=\"241\" \/><\/a> <\/p>\n<p>Set the default document to Default.asp<\/p>\n<\/p>\n<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/2.defaultdocument.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"2.default document\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"2.default document\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/2.defaultdocument_thumb.jpg\" width=\"244\" height=\"155\" \/><\/a> <\/p>\n<p>Create a deafult.asp file with the following asp code (well you can replace the norwegian sentence \u201cDin IP adresse er\u201d with Your IP Address \ud83d\ude42 :<\/p>\n<p>&lt;html&gt;   <br \/>&lt;body&gt;    <br \/>&lt;p&gt;    <br \/>&lt;b&gt;Din IP addresse er:&lt;\/b&gt;    <br \/>&lt;%Response.Write(Request.ServerVariables(&quot;remote_addr&quot;))%&gt;    <br \/>&lt;\/p&gt;    <br \/>&lt;\/body&gt;    <br \/>&lt;\/html&gt; <\/p>\n<\/p>\n<p> <a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/3.defaultaspfile.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"3.defaultaspfile\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"3.defaultaspfile\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/3.defaultaspfile_thumb.jpg\" width=\"244\" height=\"93\" \/><\/a>   <\/p>\n<p>&#160;<\/p>\n<p>Test it from a remote server (this will most likely run without IISreset)<\/p>\n<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/4.testing.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"4.testing\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"4.testing\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/4.testing_thumb.jpg\" width=\"244\" height=\"175\" \/><\/a> <\/p>\n<p>To display this nicely inside SharePoint, just add the PageViewer web-part, Chrome type it to None, trim the Height and With to your satisfaction. And voila!! You are all done.<\/p>\n<p><a href=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/PageViewer.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"PageViewer\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"PageViewer\" src=\"https:\/\/www.sharepoint13.org\/wp-content\/uploads\/2012\/10\/PageViewer_thumb.jpg\" width=\"149\" height=\"244\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I got a request from one of my customers to display the IP address of the client computer on the SharePoint intranet. Well I started of like any it-consultant searching the big internet for<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[7],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-tip","tag-sharepoint"],"_links":{"self":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":1,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sharepoint13.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}