Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8147789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:28:04+00:00 2026-06-06T14:28:04+00:00

As I have already figured out. I want to create a web service on

  • 0

As I have already figured out. I want to create a web service on IIS to test my web service. But my question is, I have to select the binding type. there are HTTP, net.tcp …. but I have not only HTTP connection with the client. In my case I have to send data to the client by using their IP address(Its stored in a database). So my question is how should I configure it.
server side contains this code also

public void Notify(string ipAddress) //List<string> ipList
    {
        try
        {
            Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

            IPAddress ip = IPAddress.Parse(ipAddress);

            IPEndPoint endPoint = new IPEndPoint(ip, 15000);
            string notification = "new_update";
            byte[] sendBuffer = Encoding.ASCII.GetBytes(notification);
            sock.SendTo(sendBuffer, endPoint);
            sock.Close();
        }
        catch
        {
        }
    }

I also would like to know any resources on configuring IIS to deploy a web service with greater details.
Thank you!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:28:06+00:00Added an answer on June 6, 2026 at 2:28 pm

    Deploying a web service is same as deploying a web site in the IIS7 manager.
    This piece of code works fine on the IIS7, But the problem arises when the using this piece of code in world scenarios. The deviation from the client server concept(Ex: Client also acts as a server at the same time).
    The web service can get the clients IP address by using the following code inside a web method

    string IPAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
    string port = HttpContext.Current.Request.ServerVariables["REMOTE_PORT"];
    if (IPAddress == null)
    { 
                IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
    }
    

    But this will not provide the real IP address of the client. It depends on the network devices and the ISP policy. So its better to re-think the design before going to this approach. But this works inside a local network.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(I had already written this question out when I figured out the answer, so
I have already download and install this package to support HTML5 input type http://support.microsoft.com/kb/2468871
I have already googled and searched stackoverflow but I can find nothing related to
I have already created my application on web socket with ASP.net 4.0. I just
I have already read some posts, but no one helped me with my problem.
I have a web service which allows the users to upload and keep track
So talented people have figured out how to make xkcd style graphs in Mathematica
I'm using pygtk with PIL. I've already figured out a way to convert PIL
I am learning on how to use JTables in Swing. I have already figured
I have created a couple of web services of type .asmx (.NET) getting data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.