On 1st server, there is wcf service hosted in windows managed service. On the 2nd server, there is another wcf service, hosted in their own windows managed service. I try to connect to 1st service from the inside of the 2nd service, but I become a exception "The socket connection was aborted". With same configuration and same code I successfully connect from console application and winform application, but not from this windows managed service.
Configure your WCF services on both servers to perform diagnostic logging. Follow the instructions in http://msdn.microsoft.com/en-us/library/ms730064.aspx to achieve that.
Make sure the account your service on server 2 is running under is capable of connecting to server 1. This is a typical difference between the client test you did (and worked) and a service running on that system. For a test, make the service on server 2 run under your personal login credentials.
Related
I'm trying to test my net.tcp binded wcf service on my server machine, the service cannot be accessed from outside, does anyone know any tool that can be helpful to call my service on server 2008 machine?
Host the service in IIS. You can test the service using Integration Tests by adding the service Reference (net.tcp://localhost:8000/WCFTestService) in your test project.
Read this.
It is a very simple wcf service. Since my original wcf service didn't work there I decided to create one test service. Basically I'm using the default method GetData(int).
I hosted this service on windows 2003 server. It works well when I consume it from a different machine. I use a windows forms test application to consume this service. When I run this forms app on the same ws2003 server and attempt to consume the service on the same server it throws the following error:
There was no endpoint listening at http://...
I created another wcf client using asp.net, also silverlight, nothing works.
Basically, it looks like it can't consume any wcf service.
I couldn't figure out what could be the issue.
Basically, the machine had McAfee antivirus installed and was blocking http communication to aspnet_wp.exe.
The full path is c:\windows\microsoft.net\framework\v4.0.30319\aspnet_wp.exe
Everything works fine after unblocking this specific exe.
I have a WCF service which is hosted on localhost, and I have a Metro app which consumes the service. Currently, for using the service, I have to separately run the service in a separate instance of Visual Studio, and after that I run the Metro App client.
Is there any way I can set the client app to start running the service as soon as the app starts, and not again and again start the service separately before the app?
Thanks in advance.
You should host the WCF service using full-blown IIS instead of IIS Express within Visual Studio. You can change this via the Web Tab of the project properties. By using IIS instead of IIS Express, the WCF service will always be listening for requests.
AFAIK, Windows 8 does not support (yet) the communication on localhost from a Metro App to a WCF service. The reason it works in VS is because they did allow this for development use. If you want a continuously running service available, use another (virtual) machine to host it separately.
Alternatively, check out this question on SO for more information about this issue.
I have worker roles that send out multicast messages using the azure service bus. Two of the consumers of these messages are websites hosted on Azure. I know that there are issues hosting service bus WCF endpoints in IIS even when running on premise. I've followed the Microsoft's advice and configured a service host programmatically.
One of the websites has been using this technique successfully for quite a while. It uses the hosted web core (it was developed before full IIS was an option on Azure) and it initialises the service host as part of the RoleEntryPoint.OnRun(). I'm trying to move this site to using full IIS. Because in full IIS the RoleEntryPoint runs in a different process to the site itself and the service host needs access to some static variables in the site I've moved the initialisation of the service host to the Global.asax Application_OnStart. This code works fine when running as a website under IIS locally and it runs fine when running in the compute emulator, but once I deploy it to the cloud my WCF host never seems to receive any messages. I haven't been able to catch any errors that are occurring.
Has anyone else out there successfully deployed something like this?
Does anyone recognise this error?
The SecurityContextSecurityToken with context-id=urn:uuid:xxx (key generation-id=) is not registered
It has suddenly appeared in the service trace log of my WCF service.
We had a Windows service successfully transmitting data into the WCF service for a day until it broke. The error manifests when the Windows service tries to connect to the WCF service.
It's highly unlikely that the environments changed. The two services exist on separate machines (an application server and a web server). Both are Windows Server 2003 SP1 machines, and the web server is running IIS 6.
Unfortunately, we have scarce access to the servers to help us debug, so any guesses on what might be wrong would be highly appreciated.
Indi
We had this problem with Web Service Extension 3.0, which was used before WCF. I have not experianced this with WCF, but I think that it is worth checking.
The scenario works like this:
The service starts and the user that is the identity of the service gets logged on.
When the service makes a call it is done in the security context of this user
After a while the logon token becomes so old (a day?) that the service will no longer accept it.
The easy way to test this is to restart the windows service.