Omu
Omu

Reputation: 71288

MyService.svc?wsdl shows 400 Bad Request IIS 7.5

I'm on Windows 7 Ultimate x64 IIS 7.5
I have deployed the services to the web server and when I try them in IE like this: MyService.svc?wsdl I get the 400 "Bad Request" page

I should get the description of the web service instead, anybody knows how to fix this ?

Upvotes: 1

Views: 2879

Answers (2)

Peter K.
Peter K.

Reputation: 8108

Just an update: When using v4.0 on a 64-bit machine, you need to run go to

c:\windows\microsoft.net\framework64\v4.0.30319\

before running

ServiceModelReg.exe -r

If you go to

c:\windows\microsoft.net\framework\v4.0.30319\

and do the same thing, we found that it doesn't work correctly and we keep getting:

Unhandled Exception: System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/Elephant/Tiger.svc' is unavailable for the protocol of the address.

Upvotes: 0

Guido Domenici
Guido Domenici

Reputation: 5256

You might need to do the following on the server:

cd c:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\

followed by

ServiceModelReg -i

This should register the .SVC extension as a WCF service, if not already registered.

Upvotes: 2

Related Questions