0

I have a WCF service running inside an ASP.NET MVC 4 application. The site is running on IIS8 on Server 2012. Until recently, the WSDL pages loaded without any problems. This week, the WSDL no longer loads. The link from the "Welcome" page is correct, but when I click it or attempt to generate a client, the same Welcome page is returned.

I have tried this using a ServiceRoute and also using an .svc file.

The ServiceRoute looks like this:

/DataService

Its WSDL link is:

/DataService?wsdl

The .svc file looks like:

/directory/otherdir/DataService.svc

The WSDL link is

/directory/otherdir/DataService.svc?wsdl

I never needed any configuration in the web.comfic section before, using the SerivceRoute.

How can I get WCF to show the WSDL correctly?

4

1 に答える 1

2

以前にこれに遭遇しましたが、複数の理由が考えられます。操作のエラーが原因でサービスが機能していないか、ServiceHostFactory の代わりに WebServiceHostFactory を使用している可能性があります

RouteTable.Routes.Add(new ServiceRoute("DataService", new ServiceHostFactory(), typeof(MyServiceType)));
于 2013-05-03T14:37:05.870 に答える