Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Accessing wcf service (which is hosted on my pc) over the net

Comments

  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    httpete wrote: »
    I am learning wcf and I have created a wcf service hosted on iis on my pc that shows up when I visit
    http://localhost/HelloWorldService/HelloWorldService.svc

    The guide I am following says I can also access it over my local network using -
    [URL]http://[/URL][your_pc_name]/HelloWorldService/HelloWorldService.svc
    This works fine

    It also say I can access it over the net using
    [URL]http://[/URL][your_pc_name].[your_company_domain].com/HelloWorldService/HelloWorldService.svc

    I retrieved my IP address from google (188.141.abc.xyz) and used that in place of [your_company_domain].com

    However it didnt work. Does anyone know how I can access this web service over the internet?
    It's not that simple. That's your public IP. That will get as far as your router, but then your router needs to know where to forward this to.

    You'll probably have to enable IP forwarding or something. Did you check your firewall settings? - also I'm sure there are WCF security options for external connections.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    OP you need to read up on something called Network Address Translation (NAT). http://en.wikipedia.org/wiki/Network_address_translation

    Your internal IP and external IP are different, with the router in between. Need to map some external ports to your local ip address.


  • Registered Users, Registered Users 2 Posts: 208 ✭✭httpete


    Webmonkey wrote: »
    It's not that simple. That's your public IP. That will get as far as your router, but then your router needs to know where to forward this to.

    You'll probably have to enable IP forwarding or something. Did you check your firewall settings? - also I'm sure there are WCF security options for external connections.

    OK, looks like it's not so straightforward. Ill have to some reading up on this area.

    Are there specific steps I can take to make this service accessible over the net or are they different in every case?


  • Registered Users, Registered Users 2 Posts: 669 ✭✭✭whatstherush


    You could, depending on your setup, connect your server directly to the modem, you server than should have a public IP. This will allow a quick test, but you need to go down the route that WebMonkey suggests if you want a more permanent solution.


  • Registered Users, Registered Users 2 Posts: 3,323 ✭✭✭padraig_f


    httpete wrote: »
    OK, looks like it's not so straightforward. Ill have to some reading up on this area.

    Are there specific steps I can take to make this service accessible over the net or are they different in every case?

    If it's working via http on your local network, it shouldn't be a lot of work to make the service accessible outside your local network. For http, I don't believe WCF distinguishes between local network and remote requests, they're both just http requests.

    Check the NAT settings on your router, it's really just mapping a port to an IP address on the local network.


  • Advertisement
Advertisement