Code Monkey home page Code Monkey logo

wcf-to-corewcf's Introduction

Reference implementation - Modernizing WCF Service to CoreWCF

This is a reference implementation for modernizing legacy WCF services to CoreWCF.

This repository includes 2 versions of WCF services:

  • Legacy WCF service, built on .NET Framework 4.7.2
  • Modernized version of the legacy WCF service, built on .NET 6 and CoreWCF

The WCF services are exposed using BasicHttpBinding binding. The application uses custom behaviors on both client and service side, making it more similar to a real-world WCF application. In legacy WCF service, Behaviors have been configured through web.config or app.config file using classes that inherit from BehaviorExtensionElement.

Structure of the repository:

- src
  - client
      - WCF.SampleService.Client
  - legacy-wcf-service
      - WCF.SampleService
      - WCF.SampleService.Test
  - modernized-wcf-service
      - CoreWCF.SampleService
      - CoreWCF.SampleService.Test
  • src\client contains client application, built with .NET Framework 4.7.2

  • src\legacy-wcf-service contains a legacy WCF service, built with .NET Framework 4.7.2

  • src\modernized-wcf-service contains the modernized version of the legacy WCF service, built using CoreWCF and .NET 6.

    • The modernized solution supports backward compatibility, i.e., it can be built for .NET Framework 4.7.2 and for .NET 6.
    • To build for .NET Framework 4.7.2, use the 'Debug' or 'Release' configuration.
    • To build for .NET 6, use the 'Debug6' or 'Release6' configuration.
    • Unit tests in this solution would also work for .NET Framework 4.7.2 and for .NET 6. Choose the appropriate build configuration.

How to build & run

  • legacy-wcf-service

    • Build and publish, using Debug or Release configuration.
    • Host on IIS.
    • You may have to open Visual Studio as Administrator - to publish to IIS and to execute unit tests.
  • modernized-wcf-service

    • Contains both legacy WCF and CoreWCF implementations.
    • To build and run legacy WCF service (.NET Framework), use Debug or Release configuration. Host on IIS.
    • To build and run CoreWCF service (.NET 6), use Debug6 or Release6 configuration. Self-hosted on kestrel.
  • client application

    • Edit App.config and update endpoint addresses of the WCF services.
    • You may also update the endpoint address by editing the service config under 'Connected services'.
    • Build and run in Debug or Release mode.

Security considerations

This is just a reference implementation and should not be used as-is for production grade code.

The following security aspects should be addressed:

References

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

wcf-to-corewcf's People

Contributors

amazon-auto avatar rramanu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.