web service

Discussion in 'Windows / IIS' started by ARFX, May 8, 2008.

  1. Hello

    I'm developing two web service pages for my site. one of them is for feeding stock market data to my web site and data is comming from a special IP. is this possible to block any other incomming IP addresses?

    for the other web service page, every body can feed some input; Is there any way to secure against abusing by sending too frequent fake requests? what shall I do?

    thanks
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You can easily add logic to your web service page to check the requester IP and return an error (by either throwing an error or returning a invalid data set).


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Yes, you can check HttpContext.Current.Request.UserHostAddress . It is possible at DASP now.
    But if DASP will use firewall that it isn ?t be possible because all requests will have the same firewall server address.
    Alexei.
    http://www.californiadreamhomesandland.com
     
  4. Thanks
    According to these two rplies I conclude there is no firewall on the way, so I can check the IP address. But, excuse me, I'm not expert, isn't there a need for firewall?
     
  5. Unfortunately at this time WSE is not support on the Windows 2008 servers......

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    You can do something like this


    if HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString <> "1.2.3.4" Then


    Throw new exception("Your IP address is not on the white list")


    End If


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page