Jonathan Allen
Jonathan Allen

Reputation: 70337

Can't display a WSDL for a WCF service hosted in an ASP.NET MVC application

When I launch the application and go to the service page I see...

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe http://localhost:26109/DashboardServices.svc?wsdl You can also access the service description as a single file:

http://localhost:26109/DashboardServices.svc?singleWsdl

But when I click on those links I don't see the WSDL. Instead I just get the same text.

I assume this has something to do with MVC routing, but I don't know how to fix it.

Upvotes: 1

Views: 795

Answers (1)

Jonathan Allen
Jonathan Allen

Reputation: 70337

This behavior happens when you forget to put [ServiceContract] on the interface.

Upvotes: 1

Related Questions