Pritesh
Pritesh

Reputation: 3288

Deploy/Publish Silverlight application in LAN

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....

Upvotes: 1

Views: 642

Answers (1)

ms87
ms87

Reputation: 17492

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.

Upvotes: 3

Related Questions