<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 Obtain IP Website Server Address (TechOff on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/techoff/255400-obtain-ip-website-server-address/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for Obtain IP Website Server Address (TechOff on Channel 9)</title><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/</link></image><description>Obtain IP Website Server Address</description><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/</link><language>en-us</language><pubDate>Mon, 11 Jun 2007 11:21:36 GMT</pubDate><lastBuildDate>Mon, 11 Jun 2007 11:21:36 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3243.35083, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Obtain IP Website Server Address</title><description>&lt;blockquote&gt;
				&lt;div&gt;m1keread wrote:&lt;/div&gt;
				&lt;div&gt;...&lt;br /&gt;&lt;br /&gt;What I dont want is "billy the script kiddie" copying my HTML page and sending his own emails via my web service.&lt;br /&gt;&lt;br /&gt;Therefore, I was hoping for a way to stop any invocation of the web service except those coming from SERVER01. &lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;So, it is as I described, then - you need to secure your Web Service.&lt;br /&gt;&lt;br /&gt;I'm not a Web Developer, so I'm not familar with what is currently around for this. But if I were to &lt;b&gt;design&lt;/b&gt; something like this, then the first thing you need to do is take the non-trusted party out of loop. ie Not have the client (Web Browser) use the Service.&lt;br /&gt;&lt;br /&gt;However, if for some reason you &lt;b&gt;have to&lt;/b&gt; involve the (non-trusted) client, then I would have the Web &lt;u&gt;Server&lt;/u&gt; pass a token (permission) to the client, which &lt;b&gt;must&lt;/b&gt; in turn supply this token to the Web &lt;u&gt;Service&lt;/u&gt;. The token would need to be volatile. How volatile, would be dependent upon your needs. For example, it could even be a one-to-one, per message token, and/or expire after some amount of time, etc.&lt;br /&gt;&lt;br /&gt;So the flow would be something like: &lt;br /&gt;&lt;br /&gt;The Web Server obtains a batch of tokens from the Web Service, which it dispenses to the Browser as a hidden field (or whatever), and the javascript running on the Browser, passes the token on to your Web Service as a parameter. Your Web Service then validates the token, responding accordingly...&lt;br /&gt;&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316649</link><pubDate>Mon, 11 Jun 2007 11:21:36 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316649</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316649/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	m1keread wrote:
				...What I dont want is "billy the script kiddie" copying my HTML page and sending his own emails via my web service.Therefore, I was hoping for a way to stop any invocation of the web service except those coming from SERVER01. ...
		
		
		So, it is as I described, then - you&amp;#8230;</evnet:previewtext><dc:creator>RichardRudek</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316649/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</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;prencher wrote:&lt;/strong&gt;&lt;i&gt;﻿The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another server.&lt;br /&gt;&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,&lt;br /&gt;&lt;br /&gt;That seems to be exactly what is happening.&amp;nbsp; Maybe I should try a different tac.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;What I am after is a "Form to Email" solution for generic HTML sites (Not ASP.NET).&amp;nbsp; I thought my web service was an elegent solution, but if I cant nail it down, then I will have to try something like Frontpage extensions or I expect there are scripts out there somewhere&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;Mike&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;It depends on your needs, but it might be enough to just limit the addresses you can send to through the script, and put a per-ip timeout on sending new e-mails.&lt;br /&gt;&lt;br /&gt;Further I'd add a unique ID in a hidden field, so if abuse does happen, you can easily tell where it originated from, and eliminate that ID.&lt;br /&gt;&lt;br /&gt;Obviously, you could then extend on that, and add a timeout per-ID as well as per-IP to make it even more robust. Etc etc.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316632</link><pubDate>Mon, 11 Jun 2007 09:41:06 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316632</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316632/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	m1keread wrote:
				﻿prencher wrote:﻿The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another&amp;#8230;</evnet:previewtext><dc:creator>prencher</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316632/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</title><description>&lt;blockquote&gt;
				&lt;div&gt;prencher wrote:&lt;/div&gt;
				&lt;div&gt;﻿The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another server.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;That seems to be exactly what is happening.&amp;nbsp; Maybe I should try a different tac.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;What I am after is a "Form to Email" solution for generic HTML sites (Not ASP.NET).&amp;nbsp; I thought my web service was an elegent solution, but if I cant nail it down, then I will have to try something like Frontpage extensions or I expect there are scripts out there somewhere&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;Mike</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316629</link><pubDate>Mon, 11 Jun 2007 09:24:31 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316629</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316629/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	prencher wrote:
				﻿The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316629/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</title><description>The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another server.&lt;br /&gt;&lt;br /&gt;In other words, you'll want to set up a proxy postback or similar, that calls out to the service on the server side. That alone won't help anything against spamming however.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316625</link><pubDate>Mon, 11 Jun 2007 08:56:20 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316625</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316625/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The only feasible way to do that is to route it through the server. A HTML/JS only script will just talk directly to your webservice from the client; Obviosuly you can't know whether that file is on your server, or the clients harddrive, or another server.In other words, you'll want to set up a&amp;#8230;</evnet:previewtext><dc:creator>prencher</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316625/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</title><description>It is quite difficult to explain, but I'll try again with a morning head on!&lt;br /&gt;&lt;br /&gt;I have a web service written in ASP.NET hosted on SERVER01.&lt;br /&gt;&lt;br /&gt;I have web sites also hosted on SERVER01.&lt;br /&gt;&lt;br /&gt;I have a very basic HTML script that calls the web service, basically allowing the HTML page to send out emails as and when required.&amp;nbsp; This script will be hosted on Web server SERVER01&lt;br /&gt;&lt;br /&gt;What I dont want is "billy the script kiddie" copying my HTML page and sending his own emails via my web service.&lt;br /&gt;&lt;br /&gt;Therefore, I was hoping for a way to stop any invocation of the web service except those coming from SERVER01.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;My initial though was to get the IP address of the web server (SCRIPTKIDDIESERVER01) and if was not the same as the server I am in control of (SERVER01) then do not call the web service email code.&lt;br /&gt;&lt;br /&gt;Problem is that I cant get the IP address of the SCRIPTKIDDIESERVER01 machine, only the Script Kiddies PC/Laptop Ip address.&lt;br /&gt;&lt;br /&gt;Basically, I would like my email service to look like this&lt;br /&gt;&lt;br /&gt;[webservice]&lt;br /&gt;function SendEmail()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; if (RequestingServer == ServerRunningOn)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Send email&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Quite simple really, just that I cant seem to get the IP address the requesting server.&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;Mike</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316620</link><pubDate>Mon, 11 Jun 2007 08:03:45 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316620</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316620/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>It is quite difficult to explain, but I'll try again with a morning head on!I have a web service written in ASP.NET hosted on SERVER01.I have web sites also hosted on SERVER01.I have a very basic HTML script that calls the web service, basically allowing the HTML page to send out emails as and when&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316620/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</title><description>I'm confused.&lt;br /&gt;&lt;br /&gt;So are you saying that your user's  Web Browser uses your Web Service, directly (AJAX/whatever), but you actually want the IP Address of the site that their Browser navigated to. In other words, you want you prevent others from (repackaging and) using your Web Service, yes ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316591</link><pubDate>Mon, 11 Jun 2007 01:22:27 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316591</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316591/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I'm confused.So are you saying that your user's  Web Browser uses your Web Service, directly (AJAX/whatever), but you actually want the IP Address of the site that their Browser navigated to. In other words, you want you prevent others from (repackaging and) using your Web Service, yes ?</evnet:previewtext><dc:creator>RichardRudek</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316591/Trackback.aspx</trackback:ping></item><item><title>Re: Obtain IP Website Server Address</title><description>A computer can have more than one IP address, which one are you after?&lt;br /&gt;&lt;br /&gt;You could try and see if there's a class under System.Net that ASP.NET uses to represent the connection between the server and client, that would contain the address of both endpoints.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316556</link><pubDate>Sun, 10 Jun 2007 21:08:20 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255400-Obtain-IP-Website-Server-Address/?CommentID=316556</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/316556/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>A computer can have more than one IP address, which one are you after?You could try and see if there's a class under System.Net that ASP.NET uses to represent the connection between the server and client, that would contain the address of both endpoints.</evnet:previewtext><dc:creator>W3bbo</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/316556/Trackback.aspx</trackback:ping></item></channel></rss>