0

I need to create a new web servce instead of ASMX for WinForms client, working on .NET 4.0. The client can not use nothing except .NET 4.0, because is must support Windows XP. For now I have found stub generators for Web Api, but they must be based on .NET 4.5 that is unacceptable. For now I see just WCF service as a solution, but WCF now is obsolete.

4
  • Goryachev - couldn't you have/run your webservice on a server with latest .NET installed, and just have client connect to it remotely? Commented Oct 14, 2019 at 14:21
  • I agree with @yob. It doesn't sound like your server is restricted to XP, so just make your API .NET 4.5 (or newer) and just call it with your older clients. Here's a post on how to do that (it's for 3.5, but still applies): stackoverflow.com/questions/22397865/… Commented Oct 14, 2019 at 14:37
  • Thanks, I see that such possibility exists, but I am looking for a solution with automated client stubs generation which works using .net 4.0. Commented Oct 15, 2019 at 10:29
  • solved! it is possible to define .net version for the generator java -jar swagger-codegen-cli-2.2.1.jar generate -i swagger.json -l csharp -o . --additional-properties packageName=WebApiClient,targetFramework=v3.5,optionalProjectFile=false,optionalAssemblyInfo=false,sourceFolder=. Commented Oct 18, 2019 at 12:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.