How can i create the proxy of wcf service which runs on my home pc from out side or from my office pc. when i connect my home pc to internet then ISP assign a dynamic IP to that pc. my home pc has no fixed or static IP.
if i know my Home pc dynamic IP then can i create the proxy of wcf service which is running on my home pc from my office pc. wcf client will run at my office pc and wcf service will run in my home pc.
so this is the situation.
it would be sufficient if anyone the dynamic ip of my home pc as a result one can reach to my wcf service. so please tell me what are the information one has to acquire to reach my wcf service running on my home pc.
please give me the idea how can i run wcf client at my office which can connect to wcf service running on my home pc and exchange some data. please give me the full instruction as a result my wcf client from my office pc which can connect to my wcf service running on my home pc.
some one told me to use a common way to solve this problem is to use a Dynamic DNS, such as No-IP http://www.noip.com/. he said "DDNS services allow you to access your home computer using a fixed name, like yoursite.no-ip.org. It requires your home computer to run a small client program that communicates with the provider's servers to update the DNS records for your name whenever your IP address changes."
suppose i am not interested for No-IP http://www.noip.com/.
just give me the idea if i know the dynamic IP of machine where my wcf service is running then how can i connect my wcf client from office pc to wcf service which is running on my home pc having dynamic IP which is known to me. looking for good discussion. thanks
You need 4 things correctly setup:
Your local WCF service should be up and running: Test it from your local pc and see that it works correctly.
Your local Windows firewall have to allow connections to your port: In order to test this you shoul try to connect to your WCF service from a different computer in your home.
Your router have to redirect a given port to your local PC: Probably port 8080 of your router to port 80 of your local PC. It is done from router configuration settings.
Dynamic DNS correctly pointing to your home DSL: Probably your DSL router will have a tab in configuration that allows it to connect to Dynamic DNS service. In order to test this check that your Dynamic DNS name resolves to your
Advice: A tiny virtual server in AWS (and maybe Azure) is free and maybe an interesting alternative...
your wcf proxy that runs on your home pc, runs on a port. you will need to map that port from your router to your pc, so you can access it from outside. using No-Ip you can create a 'static' dns record that gets you to your pc
Home.No-Ip.org:1234
instead of using that, you could also just use your ip address, which is provided by your isp. note, if that is subject to change, you would need to update it everytime it changes.
assuming, you mapped port 1234 to your pc, and the correct port the wcf service is running on.
next you would need to get the client to know where the service is, so you would need to set the endpoint of the service there, the endpoint consists then of the Home.No-Ip.org:1234/someEndPointName
depending on firewall settings at your work place and your home network this should work, i do not, however, know what happens between the connection at home or work
Related
I developed a MVC web app on my computer , running on local IIS Express server. My problem is that now the client wants to see how the app looks and i need to transfer my app online. I don't want to buy any hosting yet, just to use my computer as a web server. My question is, how can i do this using iis express ?. I've searched on old google but only found how to make the app accessible for users on my network. Tutorials like these . I also want to mention that i am behind a router on which i have access to configure .
You have to configure your router to forward port 80 (or a custom port) to your hosting device. Therefore you first have to give your computer a static ip address (also on the router) and enable port forwarding from for example extern port 8181 to your static ip and intern port of your iis port.
Then from outside your clients can call your external ip-address (modem ip):8181 to visit your website.
I am new to WCF Services, I have developed a WCF service library hosted within a Windows Service. The service end point is http://servername:9980/ApplicationServer/ServiceName.
When I run this service on local system and try to connect using my application, everything works fine.
The problem starts when I deploy this service on server system, none of my application can use this service, even the browser says page not found. Though, if I remove the specific port number from the endpoint all works well.
I have already opened all the ports in Windows Firewall including Client and Server. Also proper exceptions are made to the router firewall, still I am not able to host the service on specific port. I have even tried by switching firewall off on both client and server system.
Thank you in advance.
-Ashish Sharma
When you remove the specific port number it defaults to port 80.
So there is something that is blocking the other port.
Try using the Telnet command to check if the port is open (you may have to enable telnet)
As you have allready checked the firewalls, it could be urlscan or a network device.
i have hosted a wcf service in our office machine and which is being accessible from other pc in LAN. our office has static IP. so how can i access my wcf service from the out side of office if i know the static ip of our office.
now i am accessing the service from lan using this url http://192.168.6.2:7741/Services/CustomerService
if our office static ip is 122.160.187.236 then can i access my service just replace the ip address with static ip address ? please tell me all require steps to access wcf service over the internet. thanks
You will need to forward the port 7741 on the router to the 192.168.6.2 IP address.
You'll have to ask someone who has access to the router to do this.
Not sure what your environment is like but on your general router these settings will generally fall under 'advanced settings > NAT
Check out http://portforward.com/ for info on port forwarding.
Also, if you have a firewall, you need to ensure that traffic via port 7741 is allowed.
This is probably the quickest way to achieve what you want, but not the most secure. Establishing a VPN would be better but I'm not going to open that can of worms now.
Niel
it's not enough to know only IP of your network if you want access your machine from outside. Probably you should talk to administrator of your network to either establish virtual private network or assign external IP address to your machine. Actually the question related mostly to network administration and configuration, but not to WCF.
If you want to access your WCF Service from outside your LAN, from the internet, you need to assign a DNS Server outside on the internet that can assign to you a public static IP Address, because your LAN is most probably using a DHCP to lease a temporary static private IP Address. Some DNS server are free and other you need to pay a monthly fee.
I have develop one simple database application build using SilverLight5.0 + Entity Framework + WCF + VisualStudio 2010 with .NET 4.0.
Database and application located in my personal PC(connected in LAN).
Now i required that this application should accessible through any computer in LAN.
Any computer in LAN can inser,Update or delete data in Database located in my personal PC through the application which i have developed what should be the simple steps i have to follow.....
please help me....
Well you're just asking how you can host your WCF service, there is tonnes of material online or any decent WCF book. You have a number of choices, from simple self hosting, windows service or IIS. Hosting a WCF service in any of the aforementioned ways is not at all complicated. Worth mentioning that since you're on LAN, you should strongly consider netTcpBinding since it has considerable performance gains over other bindings, and you don't need to worry about opening particular ports since you're on LAN.
For example you can have a service hosted in IIS on port 8085 in your LAN, the host machine has a local IP of say 192.68.1.51, now the computers in the network (on the LAN, such as 192.168.6/.7.9/etc.) can consume the service by referencing the service locally like:
http://192.168.1.51:8085/MyService/TheService.svc
Now the benefit of hosting in IIS and having a static IP (public IP) is that you can also consume the service over the internet, so computers outside the LAN can
consume the service with an address like this (if your public IP is 22.175.194.56 for example):
http://22.175.194.56:8085/MyService/TheService.svc
To do this you just need to create a rule on your LANs router to forward the
traffic coming through the port 8085 to the local IP of your service host machine (192.168.1.51), this can be configured somewhere on your routers virtual server under NATs.
Obviously if the host machines' IP changes you need to reference the new IP address to your local and outside clients, but the point of a static IP is that it never changes, for the purposes precisely.
I want to convert my pc to a web server. I installed centos server and apache server.
How I can make apache server public? I want to everyone access my web site on my pc via browser.
Thank you..
You have 2 ways, you can buy a domain and a static IP address for your computer (usually through the service provider) and configure your router and FW to allow access to the machine for port 80.
The other way is to use some sort of dynamic dns service like DynDNS to be able to bind a DNS to a dynamic IP address (you will need to run a daemon to update the account once in a while because your IP may change). The FW and router rules are still needed in this case as well.
After you do one of the these steps everyone should be able to access your apache server on your computer as long as it's on.