Creating WCF web service II

Posted in :

stlplace
Reading Time: < 1 minute

A continuation of previous post.

1) Visual Studio, publish web service: check destination IIS app
Before the change, the error was “cannot show the content of the folder”.

2) Add this line to the service.cs (service class C# file), to work around/avoid a problem, asp .net compatibility issue. Do something like this:

[ServiceBehavior]
[AspNetCompatibilityRequirements(RequirementsMode=
AspNetCompatibilityRequirementsMode.Allowed)]
class BarService : IHelloContract
{
// …
}

Refer to wenlong

3) Bad request: it appears to be a class rename problem, Visual Studio has a “red” warning sign, follow it and accept “update”, rebuild.

%d bloggers like this: