I am aware that WCF is available in .NET 3.0 and higher.
However I was wondering if it's possible to creating working WCF service Service.svc within ASP.NET 2.0 website ?
There is a reason why we have ASP.NET website in .NET 2.0, It's an old app with tons of code, built on top of 3rd party .NET 2.0 CMS system.
Now, I was able with no problem to add WCF service to the website, the following files have been created: MyWebsite/App_Code/Service1.cs MyWebsite/App_Code/IService1.cs MyWebsite/Service1.svc
Everything compiles just fine, I was able to add all required endpoints and node was created successfully.
But when I navigate to the service:
http://localhost/MyWebsite/Service1.svc
I get this error message:
Server Error in '/MyWebsite' Application. Service 'Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
The error message is confusing, because I have everything defined. Could it be because the website is running in IIS as .NET 2.0 app ? Or is it still possible to have WCF service inside the website that runs as .NET 2.0 app ?
Clarification The IIS virtual directory for the website is configured with ASP.NET 2.0 version. But we do have .NET 4.0 installed.