문제

I am using a WebServiceHost to receive a command object and return a response to a client.

I have datacontracts setup for the objects and the client is executed using HttpWebRequest and HttpWebResponse objects.

This has all been working fine for two application versions, and still works fine on machines that have never had Visual Studio 2012 installed.

I have a test machine I installed Visual Studio 2012 on to debug the client to server interaction and try out VS2012 at the same time. As soon as VS2012 was installed the WebServiceHost stopped working. The client receives 404 errors if its attempting to send commands to the machine with VS2012 or if the client itself is on VS2012 I get the same error. This happens in debug, release, and built versions of the application. Including versions that have been released and work on other machines.

Once I narrowed down the issue to the machine with Visual Studio 2012 I did some searching to no avail. So I uninstalled Visual Studio 2012, 404's still received. Uninstalled .Net Framework 4.5 and reinstalled 4.0, 404's still received. Uninstalled and reinstalled application, 404's still received. I have ensured firewalls are disabled on both client and server.

I'm thinking it probably is related to the VS2012 machine failing to serialize and deserialize the command object to and from xml. But what VS2012 dependency could mess that up is what I cant seem to find.

I'm at the point now where I'm ready to re-image the test machine, but that won't help me if I ever want to use Visual Studio 2012 in the future.

Thanks for any help or direction you can provide.

도움이 되었습니까?

해결책

This turned out to be a problem on the client side. The configured URI for the WebServiceHost contained a "commands/" qualifier. Before installing .Net 4.5 the WebServiceHost was responding to requests without the "commands/" but once it was updated it no longer would. Not really sure why this is but it did correct the issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top