简体   繁体   中英

Why is the WCF rest service (not created with WCF Rest service template) not working?

I created a WCF Rest service but not with the WCF Rest Service template. I just used a simple class library project and then made all the settings which were listed to create a WCF Rest service.

It compiled fine and I deployed it on IIS 7. When I ran the service it gave me the following error:

The server encountered an error processing the request. Please see the service help page for constructing valid requests to the service.

I then downloaded the WCF Rest template and created a sample service. Again deployed it on IIS7 and this is working fine. I compared the project, solution, references, web.config and other files as well and see no difference. Yet the WCF Rest Template service is working and the other once is not working...

Any thoughts?

Regards, Sid

I was able to solve it. The problem was that in the service there was an activator, trying to create an object. This object creation was failing at runtime. So, even though code was compiling the service was not able to get started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM