WCF Winform Hosting - winforms

I have a WCF service hosted in a Winforms application, it's running on a vista machine and I've used netsh to allow the application to listen on port 6003.
I have a client application which can call the WCF service when it is running on the same machine.
The problem is I cannot access the WCF service from any other PC on the network.
I've run netstat and it's definately listening on the port.
I'm using the basicHttpBinding, and it's .Net 4.
Any help would be great.
Regards
Steve

Check the firewall settings on the PC hosting the service. It is probably blocking the access.

Have you tried hitting the services through a web browser?
You can try adding a clientaccesspolicy.xml (and a crossdomain.xml, for good measure) to the root of your server. Check the following link - http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx

Related

How to access XBAP Application from Internet

I'm new to WPF Web Application.
I've created a test application and exported it to C:\Test Application with publish.htm file created.
I'm able to run the application on my PC but I'm unable to configure Windows Firewall so that application can be accessed from internet.
I've configured port forwarding on my broadband router to forward port 8080 to my laptop's port 80
I'm stucked here
Amit Saraf
Acoording to this article on technet you may install iis on w7hbs. I would advice you to do so, configure it and add a site for your xbap to publish, deploy it here. How to install IIS is described in the link. In w7 and windows server 2008+ IIS is "included" in features/roles. Remember to also configure your windows firewall! Try telneting your ip and port to see if you get through(also a feature btw!).
Another example is apache, but I've never used it to host xbap applications before. Maybe someone else has experience with that(linux-mono people :) )
Hope it helps!

Want to use SignalR in Windows Application to sync my clients

i want to create a application where i will use a Windows application as a server and a web application as a client.
Now i want to sync my client(web application) with my server(Windows application).
Both Web and Windows applications are in .NET4.0
Can any one help me on this ?
SignalR supports self-hosting. See https://github.com/SignalR/SignalR/tree/master/SignalR.Hosting.Self
You should be able to start the host directly from inside a Windows application or a Windows service. Your question wasn't clear, but I inferred an application due to the winforms tag on the question.
As long as your application is running, web clients should be able to communicate with your SignalR server code.

What is the current state of Web Sockets for Silverlight applications

From what I've read Web Sockets holds more promise than the duplex polling that is currently available to Silverlight developers for receiving server notifications. However I'm not finding much written in the last 10 months, nor am I finding much at all from a Silverlight perspective.
Please don't answer, that Silverlight can open sockets. I know that --- howerver what I don't know is how silverlight can do that with its web server over port 80 in a firewall friendly way -- all of which is why I'm interested in Web Sockets.
The underlying Silverlight network stack won't allow port 80 to be connected to. The port restrictions are that the port must be between 4502-4534. See Network Security Access Restrictions in Silverlight.
Microsoft recently release a WebSockets prototype part of which includes a Silverlight WebSocket client. One additional restriction with the Microsoft Silverlight WebSocket prototype implementation is that a clientaccesspolicy.xml file must be served up from port 80 on the server that is being connected to.
The Super Websockets project also contains a Silverlight client somewhere. It will most probably have the same restrictions as the Microsoft implementation.
SL4 and 5 do not implement websockets. If browser used to host silverlight plugin supports websockets then you can use browser interop to call websockets api form the silverlight app.
Alternatively a trusted application can connect to any TCP port including port 80.

Is there an easyier way to publish silverlight & wcf services from localhost to IIS?

Is there a simpler way to deploy/publish silverlight & wcf projects from localhost enviroment to a IIS server?
I have a web project with a self host wcf service which my silverlight application references. When I work locally I set the reference address to htt://localhost:8080/MyService.svc -and when I want to put it on the IIS server, I reference its address htt:///MyService.svc everything works which is good. -and in fact, I event put a clientaccesspolicy file on root of the site too just incase i need to do a test connect from my desktop/laptop.
Its getting a bit tiresome, having to change it each time. Surely this is quite a common thing? Is there a setting somewhere that allows me to swap configuartions when deploying/publishing? -similar to that of the (Debug / Release) solution configuration.
Any thoughts, pointers or recommended practices would be highly appreciated.
Cheers
If you will deploy it to the IIS: why don't you just use the host of visual studio creating a not self hosted wcf service? new project --> WCF --> WCF Service Application.
In the other hand, for managing environments dependent configs I like this thing:
http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx

Hosting ASP.NET Inside Silverlight

Yes, I know it is not the intention of Silverlight to host ASP.NET and that the namespaces/classes have been removed, but I have a small personal/pet project where Cassini-like hosting functionality (localhost only is fine) from within Silverlight would be a slick feature.
Can this be made to work somehow? What is missing?
You won't be able to do it because it's not possible to create a listening TCP socket. You can only create client TCP connections.

Resources