ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Protect Web Service so that it works only on one Domain or Server in IIS ASP.Net<p>Add an additional parameter say "SecretCode" to the Web Service methods.</p> <p>And every client that wants to access your WebService must have to pass the SecretCode.</p> <p>Then in the Web Service methods, validate whether the supplied Secret Code matches else return an error.</p> <p>Also you can detect the calling IP Address in the WebMethod then later save it and use it to block from the IIS.</p>https://www.aspforums.net:443/Threads/158283/Protect-Web-Service-so-that-it-works-only-on-one-Domain-or-Server-in-IIS-ASPNet/https://www.aspforums.net:443/Threads/158283/Protect-Web-Service-so-that-it-works-only-on-one-Domain-or-Server-in-IIS-ASPNet/Mon, 08 Jan 2018 05:23:00 GMTProtect Web Service so that it works only on one Domain or Server in IIS ASP.Net<pre class="brush: csharp">string ip = HttpContext.Current.Request.UserHostAddress.ToString();</pre> <p>Using this we can get ip address of the remote client who is calling our webservice. </p> <p>Wonderful Suggestion Mudassar and thanks!</p>https://www.aspforums.net:443/Threads/158283/Protect-Web-Service-so-that-it-works-only-on-one-Domain-or-Server-in-IIS-ASPNet/https://www.aspforums.net:443/Threads/158283/Protect-Web-Service-so-that-it-works-only-on-one-Domain-or-Server-in-IIS-ASPNet/Tue, 09 Jan 2018 02:54:11 GMT