Implementation of Self-host Project based on ASP WebAPI Owin

Source: Internet
Author: User

Reference

The hosted ASP. NET Web API does not necessarily require IIS support, and we can use the self host as a host for any type of application (console, Windows Forms app, WPF app, or even Windows Service).

I. Summary

This issue also brings you to share is the real work of the stupid in real business scenarios, please follow a stupid perspective on how to implement the use of Microsoft ASP. NET Owin Technology hosting WEBAPI services, if you are interested in this issue of the tutorial content, then please allow a stupid with you to learn together!

Needless to say, directly on dry goods, we do not produce dry goods, we are just dry goods porter.


Iv. Demand Analysis

4.1. Previous Period Review

Last issue we shared the implementation of the client and service-side communication project based on the open source SuperSocket implementation of Web page submission printing data to the Web server side, the Web server will accept the print data through the socket communications servers to push to the specified client.

Can we simplify the call process steps above?

Directly allows the client to print the data to the local client without having to relay through the socket communication server.

4.2. Schematic diagram


4.3, Then the problem we are going to solve today can be summed up in the following sentence:

How do I get the Web page side to access the local desktop client directly in HTTP, just like a Web application on a remote IIS?

4.4, Implementing a self-host solution for Web applications

Implementing a simple HTTP service (. NET 2.0+) via HttpListener

Self-hosted selfhosting based on the WCF stack

Use ASP. NET Httpselfhost to host the Webapi service (. 4.0+)

Use ASP. Owin to host the Webapi service (. NET4.5 Microsoft recommended)

Wait a minute......

V. Knowledge points relating to coverage

ASP. WebAPI Httpselfhost/owin How to host the WebAPI service in the form of a desktop application;

ASP. WebAPI Httpselfhost/owin How to enable the server to support Cros cross-access;

IE10.0 the following browsers to achieve cors access through xdomainrequest;

Six, the source online interpretation and demonstration
Online video viewing


If you don't believe it, sweep it.

Implementation of Self-host Project based on ASP. WebAPI Owin

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.