<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for Restrict Web Service Access to host only (TechOff on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/techoff/254467-restrict-web-service-access-to-host-only/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for Restrict Web Service Access to host only (TechOff on Channel 9)</title><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/</link></image><description>Restrict Web Service Access to host only</description><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/</link><language>en-us</language><pubDate>Fri, 04 May 2007 20:33:23 GMT</pubDate><lastBuildDate>Fri, 04 May 2007 20:33:23 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3243.35083, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Restrict Web Service Access to host only</title><description>&lt;blockquote&gt;
				&lt;div&gt;m1keread wrote:&lt;/div&gt;
				&lt;div&gt;﻿&lt;blockquote&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Minh wrote:&lt;/strong&gt;&lt;i&gt;﻿ 
&lt;blockquote&gt;
&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;m1keread wrote:&lt;/strong&gt;

&lt;i&gt;﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;That should work.&lt;br /&gt;&lt;br /&gt;Also, if I understood you correctly,&lt;br /&gt;&lt;br /&gt;HttpContext.Current.Request.UserHostAddress&lt;br /&gt;&lt;br /&gt;should be the IP of the web site, not the client's browser -- because it is the website that is making the web service request to your web service.&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Thanks Minh,&lt;br /&gt;&lt;br /&gt;What you said is what I understood also, however the IP address being returned was not the IP address of the physical Server hosting the website.&amp;nbsp; I assumed that it was the IP address of my client PC on the internet.&amp;nbsp; The Web server physical machine had a static IP address and yet the above line was returning different addresses at varying times.&amp;nbsp; (I should have done some more research into it, but did not).&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;Mike&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;Weird.... Just so I'm clear, you're querying the UserHostAddress from within the Web Service's code &amp;amp; not the Web site's code.&lt;br /&gt;&lt;br /&gt;As ScanIam said, multiple NIC's could produce a differnt IP address, but it should be consistent, shouldn't it?&lt;br /&gt;&lt;br /&gt;Well, maybe that's where the Firewall / router plays a role.&lt;br /&gt;&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=308088</link><pubDate>Fri, 04 May 2007 20:33:23 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=308088</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/308088/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	m1keread wrote:
				﻿Minh wrote:﻿ 





m1keread wrote:

﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.That should work.Also, if I understood&amp;#8230;</evnet:previewtext><dc:creator>Minh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/308088/Trackback.aspx</trackback:ping></item><item><title>Re: Restrict Web Service Access to host only</title><description>If you have 2 NIC cards or if the request comes through a firewall/NAT you'll get weird IP addresses.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=308059</link><pubDate>Fri, 04 May 2007 18:35:36 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=308059</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/308059/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>If you have 2 NIC cards or if the request comes through a firewall/NAT you'll get weird IP addresses.</evnet:previewtext><dc:creator>ScanIAm</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/308059/Trackback.aspx</trackback:ping></item><item><title>Re: Restrict Web Service Access to host only</title><description>&lt;blockquote&gt;
				&lt;div&gt;Minh wrote:&lt;/div&gt;
				&lt;div&gt;﻿ 
&lt;blockquote&gt;
&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;m1keread wrote:&lt;/strong&gt;

&lt;i&gt;﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;That should work.&lt;br /&gt;&lt;br /&gt;Also, if I understood you correctly,&lt;br /&gt;&lt;br /&gt;HttpContext.Current.Request.UserHostAddress&lt;br /&gt;&lt;br /&gt;should be the IP of the web site, not the client's browser -- because it is the website that is making the web service request to your web service.&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;Thanks Minh,&lt;br /&gt;&lt;br /&gt;What you said is what I understood also, however the IP address being returned was not the IP address of the physical Server hosting the website.&amp;nbsp; I assumed that it was the IP address of my client PC on the internet.&amp;nbsp; The Web server physical machine had a static IP address and yet the above line was returning different addresses at varying times.&amp;nbsp; (I should have done some more research into it, but did not).&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;Mike</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307936</link><pubDate>Fri, 04 May 2007 09:00:37 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307936</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/307936/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	Minh wrote:
				﻿ 





m1keread wrote:

﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.That should work.Also, if I understood you&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/307936/Trackback.aspx</trackback:ping></item><item><title>Re: Restrict Web Service Access to host only</title><description>&lt;blockquote&gt;
				&lt;div&gt;m1keread wrote:&lt;/div&gt;
				&lt;div&gt;﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;That should work.&lt;br /&gt;&lt;br /&gt;Also, if I understood you correctly,&lt;br /&gt;&lt;br /&gt;HttpContext.Current.Request.UserHostAddress&lt;br /&gt;&lt;br /&gt;should be the IP of the web site, not the client's browser -- because it is the website that is making the web service request to your web service.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307885</link><pubDate>Thu, 03 May 2007 20:35:37 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307885</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/307885/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	m1keread wrote:
				﻿So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.
		
		That should work.Also, if I understood you&amp;#8230;</evnet:previewtext><dc:creator>Minh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/307885/Trackback.aspx</trackback:ping></item><item><title>Re: Restrict Web Service Access to host only</title><description>&lt;p&gt;Thanks buddy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Web Services is a properly defined Web service and lives already in a .asmx file.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I need to do.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307820</link><pubDate>Thu, 03 May 2007 14:36:30 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307820</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/307820/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Thanks buddy,
&amp;nbsp;
The Web Services is a properly defined Web service and lives already in a .asmx file.&amp;nbsp; 
So if I read you correctly, I can go into IIS Manager and restrict the sites that can call the web service.&amp;nbsp; If this is correct, it is a much more elegant way of doing what I&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/307820/Trackback.aspx</trackback:ping></item><item><title>Re: Restrict Web Service Access to host only</title><description>&lt;p&gt;Why not move the webMethod into it's own asmx file and set IP restriction on the file via IIS admin tool?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307805</link><pubDate>Thu, 03 May 2007 12:58:04 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/254467-Restrict-Web-Service-Access-to-host-only/?CommentID=307805</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/307805/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Why not move the webMethod into it's own asmx file and set IP restriction on the file via IIS admin tool?
&amp;nbsp;</evnet:previewtext><dc:creator>PerfectPhase</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/307805/Trackback.aspx</trackback:ping></item></channel></rss>