Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Summary of the problem: The very same windows service program hosting WCF services:

1) Works flawlessly on our Windows Server 2008 server
2) Used to work, but now doesn't work on my laptop
3) Never worked on my new desktop.

I have a windows service that runs WCF WebGet services. This service does NOT use IIS. The service works on our Windows Server 2008 (32 bit) perfectly well. It also used to work just as well on my development laptop, Win7 (32bit).

Then about nine months ago I bought a Win8 64bit workstation as a fall-back development computer. The very same service on our server mentioned above installs correctly using installutil and and starts up fine. However, when I submit a GET REQUEST to the service I get the following response:

"The remote server returned an unexpected response: (405) Method Not Allowed."

To compound things, not having used the services on my laptop (Win7 32bit) for several months, I recently needed to do some development work and where the services used to work on this computer, I now get the same response message as above. I haven't wittingly changed anything on the laptop and the services program was the same as before. Development work is now very cumbersome as I have to copy the new build to the server and test it there.

I originally thought this was an issue with 64bit or Win8, but now the problem has spread to my Win7 32 bit development computer that idea seems less likely. I am beginning to think that this is some kb that our dear friends at Microsoft have pushed out which I religiously install.

I have read every article I can find but they all hark on about iis. Now I know this looks like an iis response and probably is, but what I want to know is (1) why has my laptop started handling the service requests differently and (2) what can I do to get back to where I was? The answer will no doubt help me work out why the service never worked on my fall-back computer also. It is like something is forcing all my get requests into iis, which I definitely don't want to happen.

The app.config file contains a service trace block, which has reliably worked (when not getting this 405 response). Where I have the 405 response, no entries are made in the service trace log.

I would be immensely grateful for the right help. I should stress that my solution is a windows Service, not a web application and my solution has an app.config file NOT a web.config (as would a web application).


Many thanks,

Malcolm
Posted
Updated 11-Jul-15 4:14am
v3
Comments
FranzBe 9-Jul-15 7:10am    
did you try analyzing with service trace? i.e. insert a system.diagnostics section in you app.config with a tracelistener and than opening the resulting file with
c:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\SvcTraceViewer.exe
vantage_point 11-Jul-15 10:17am    
Hi FranzBe, Thanks for looking at this. I should have mentioned, the service trace log file receives no data, so I'm presuming that the GET REQUEST has been consumed somewhere else before it even reaches my services. Guessing by IIS.
FranzBe 12-Jul-15 4:30am    
Thanks for clarifing. In your position I would try two things: have a look with wireshark to see who is fetching your request and replying to it; and I would take an "old" Win-7 vmware guest (or install one, it's not that painfull) that doesn't have the KB updates of the last year installed to verify your "some update did break it" suspect. Sorry for not beeing helpful and: good luck!
vantage_point 28-Aug-15 18:12pm    
Thanks FranzBe. Using Wireshark I have found the following listening to all all interfaces but with the filter: tcp.dstport == 8001
1) If I call my remote servers which also listen on port 8001, Wireshark show the transaction
2) If I call my laptop on port 8001 -zippo, nothing comes up.

Either I'm using wireshark incorrectly, or the packet is flying below its radar. But here's the rub... if I stop my laptop's service and make a GET REQUEST I get the following message:

There was no endpoint listening at http://127.0.0.1:8001/rmu_seqP?gtw=MAR002&dat=2013-05-28T12%3a36%3a46&mk=21652344 that could accept the message.
This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

When I restart the service and make the same GET REQUEST, I get the unwelcome:
The remote server returned an unexpected response: (405) Method Not Allowed.

I must reiterate that this very same service works perfectly well on the remote server!

Any more thoughts?



1 solution

i could kick myself around the block for this one...

so all that is required is to include the prog.exe.config file in the same folder as the prog.exe

Thanks to those who offered advice.

MF
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900