Aladdin etoken driver. The eToken Authentication Client installs all the necessary files and eToken drivers to support eToken integration with various security applications. It enables Windows operating system and third party applications to access the eToken. This version supports Windows XP SP2, Vista and Win7 64-bit. Aladdin eToken drivers are tiny programs that enable your Authenticator hardware to communicate with your operating system software. Maintaining updated Aladdin eToken software prevents crashes and maximizes hardware and system performance.
-->You are responsible for locating, reading and complying with the license terms that accompany each such package. Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. See Microsoft.AspNet.Identity.sln in the root directory to open the solution in Visual Studio.
By Steve Smith and Rick Anderson
ASP.NET Core supports the Open Web Interface for .NET (OWIN). OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses. ASP.NET Core applications and middleware can interoperate with OWIN-based applications, servers, and middleware.
OWIN provides a decoupling layer that allows two frameworks with disparate object models to be used together. The
Microsoft.AspNetCore.Owin
package provides two adapter implementations:- ASP.NET Core to OWIN
- OWIN to ASP.NET Core
This allows ASP.NET Core to be hosted on top of an OWIN compatible server/host or for other OWIN compatible components to be run on top of ASP.NET Core.
Note
Using these adapters comes with a performance cost. Apps using only ASP.NET Core components shouldn't use the
Microsoft.AspNetCore.Owin
package or adapters.View or download sample code (how to download)
Running OWIN middleware in the ASP.NET Core pipeline
ASP.NET Core's OWIN support is deployed as part of the
Microsoft.AspNetCore.Owin
package. You can import OWIN support into your project by installing this package.OWIN middleware conforms to the OWIN specification, which requires a
Func<IDictionary<string, object>, Task>
interface, and specific keys be set (such as owin.ResponseBody
). The following simple OWIN middleware displays 'Hello World':The sample signature returns a
Task
and accepts an IDictionary<string, object>
as required by OWIN.The following code shows how to add the
OwinHello
middleware (shown above) to the ASP.NET Core pipeline with the UseOwin
extension method.You can configure other actions to take place within the OWIN pipeline.
Note
Response headers should only be modified prior to the first write to the response stream.
Note
Multiple calls to
UseOwin
is discouraged for performance reasons. OWIN components will operate best if grouped together.Using ASP.NET Core Hosting on an OWIN-based server
OWIN-based servers can host ASP.NET Core apps. One such server is Nowin, a .NET OWIN web server. In the sample for this article, I've included a project that references Nowin and uses it to create an
IServer
capable of self-hosting ASP.NET Core.IServer
is an interface that requires a Features
property and a Start
method.Start
is responsible for configuring and starting the server, which in this case is done through a series of fluent API calls that set addresses parsed from the IServerAddressesFeature. Note that the fluent configuration of the _builder
variable specifies that requests will be handled by the appFunc
defined earlier in the method. This Func
is called on each request to process incoming requests.We'll also add an
IWebHostBuilder
extension to make it easy to add and configure the Nowin server.With this in place, invoke the extension in Program.cs to run an ASP.NET Core app using this custom server:
Learn more about ASP.NET Core Servers.
Run ASP.NET Core on an OWIN-based server and use its WebSockets support
Another example of how OWIN-based servers' features can be leveraged by ASP.NET Core is access to features like WebSockets. The .NET OWIN web server used in the previous example has support for Web Sockets built in, which can be leveraged by an ASP.NET Core application. The example below shows a simple web app that supports Web Sockets and echoes back everything sent to the server through WebSockets.
This sample is configured using the same
NowinServer
as the previous one - the only difference is in how the application is configured in its Configure
method. A test using a simple websocket client demonstrates the application:OWIN environment
You can construct an OWIN environment using the
HttpContext
.OWIN keys
OWIN depends on an
IDictionary<string,object>
object to communicate information throughout an HTTP Request/Response exchange. ASP.NET Core implements the keys listed below. See the primary specification, extensions, and OWIN Key Guidelines and Common Keys.Request data (OWIN v1.0.0)
Key | Value (type) | Description |
---|---|---|
owin.RequestScheme | String | |
owin.RequestMethod | String | |
owin.RequestPathBase | String | |
owin.RequestPath | String | |
owin.RequestQueryString | String | |
owin.RequestProtocol | String | |
owin.RequestHeaders | IDictionary<string,string[]> | |
owin.RequestBody | Stream |
Request data (OWIN v1.1.0)
Key | Value (type) | Description |
---|---|---|
owin.RequestId | String | Optional |
Response data (OWIN v1.0.0)
Key | Value (type) | Description |
---|---|---|
owin.ResponseStatusCode | int | Optional |
owin.ResponseReasonPhrase | String | Optional |
owin.ResponseHeaders | IDictionary<string,string[]> | |
owin.ResponseBody | Stream |
Other data (OWIN v1.0.0)
Key | Value (type) | Description |
---|---|---|
owin.CallCancelled | CancellationToken | |
owin.Version | String |
Common keys
Key | Value (type) | Description |
---|---|---|
ssl.ClientCertificate | X509Certificate | |
ssl.LoadClientCertAsync | Func<Task> | |
server.RemoteIpAddress | String | |
server.RemotePort | String | |
server.LocalIpAddress | String | |
server.LocalPort | String | |
server.IsLocal | bool | |
server.OnSendingHeaders | Action<Action<object>,object> |
SendFiles v0.3.0
Key | Value (type) | Description |
---|---|---|
sendfile.SendAsync | See delegate signature | Per Request |
Opaque v0.3.0
Key | Value (type) | Description |
---|---|---|
opaque.Version | String | |
opaque.Upgrade | OpaqueUpgrade | See delegate signature |
opaque.Stream | Stream | |
opaque.CallCancelled | CancellationToken |
WebSocket v0.3.0
Key | Value (type) | Description |
---|---|---|
websocket.Version | String | |
websocket.Accept | WebSocketAccept | See delegate signature |
websocket.AcceptAlt | Non-spec | |
websocket.SubProtocol | String | See RFC6455 Section 4.2.2 Step 5.5 |
websocket.SendAsync | WebSocketSendAsync | See delegate signature |
websocket.ReceiveAsync | WebSocketReceiveAsync | See delegate signature |
websocket.CloseAsync | WebSocketCloseAsync | See delegate signature |
websocket.CallCancelled | CancellationToken | |
websocket.ClientCloseStatus | int | Optional |
websocket.ClientCloseDescription | String | Optional |
Additional resources
-->by Mike Wasson
Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. By decoupling the web server from the application, OWIN makes it easier to create middleware for .NET web development. Also, OWIN makes it easier to port web applications to other hosts—for example, self-hosting in a Windows service or other process.
OWIN is a community-owned specification, not an implementation. The Katana project is a set of open-source OWIN components developed by Microsoft. For a general overview of both OWIN and Katana, see An Overview of Project Katana. In this article, I will jump right into code to get started.
This tutorial uses Visual Studio 2013 Release Candidate, but you can also use Visual Studio 2012. A few of the steps are different in Visual Studio 2012, which I note below.
Host OWIN in IIS
In this section, we'll host OWIN in IIS. This option gives you the flexibility and composability of an OWIN pipeline together with the mature feature set of IIS. Using this option, the OWIN application runs in the ASP.NET request pipeline.
First, create a new ASP.NET Web Application project. (In Visual Studio 2012, use the ASP.NET Empty Web Application project type.)
In the New ASP.NET Project dialog, select the Empty template.
Add NuGet Packages
Next, add the required NuGet packages. From the Tools menu, select NuGet Package Manager, then select Package Manager Console. In the Package Manager Console window, type the following command:
install-package Microsoft.Owin.Host.SystemWeb –Pre
Add a Startup Class
Next, add an OWIN startup class. In Solution Explorer, right-click the project and select Add, then select New Item. In the Add New Item dialog, select Owin Startup class. For more info on configuring the startup class, see OWIN Startup Class Detection.
Add the following code to the
Startup1.Configuration
method:This code adds a simple piece of middleware to the OWIN pipeline, implemented as a function that receives a Microsoft.Owin.IOwinContext instance. When the server receives an HTTP request, the OWIN pipeline invokes the middleware. The middleware sets the content type for the response and writes the response body.
Note
The OWIN Startup class template is available in Visual Studio 2013. If you are using Visual Studio 2012, just add a new empty class named
Startup1
, and paste in the following code:Run the Application
Press F5 to begin debugging. Visual Studio will open a browser window to
http://localhost:*port*/
. The page should look like the following:Self-Host OWIN in a Console Application
It's easy to convert this application from IIS hosting to self-hosting in a custom process. With IIS hosting, IIS acts as both the HTTP server and as the process that hosts the service. With self-hosting, your application creates the process and uses the HttpListener class as the HTTP server.
There also left out two completely non-Weird very early stories.For more information about this ebook, visit. Because Lovecraft was a terrible businessman and left no heirs to his intellectual property, all of his works are already in the public domain. It does not include collaborations or revisions because some of those works may still be under the co-author’s copyright. H p lovecraft livros download. It begins in 1917 with “The Tomb” and ends in 1935 with his last original work “The Haunter of the Dark.” The book is ordered chronologically by the date the story was written.
In Visual Studio, create a new console application. In the Package Manager Console window, type the following command:
Install-Package Microsoft.Owin.SelfHost -Pre
Microsoft Owin Source Manager
Add a
Startup1
class from part 1 of this tutorial to the project. You don't need to modify this class.Implement the application's
Main
method as follows.When you run the console application, the server starts listening to
http://localhost:9000
. If you navigate to this address in a web browser, you will see the 'Hello world' page.Add OWIN Diagnostics
The Microsoft.Owin.Diagnostics package contains middleware that catches unhandled exceptions and displays an HTML page with error details. This page functions much like the ASP.NET error page that is sometimes called the 'yellow screen of death' (YSOD). Like the YSOD, the Katana error page is useful during development, but it's a good practice to disable it in production mode.
To install the Diagnostics package in your project, type the following command in the Package Manager Console window:
install-package Microsoft.Owin.Diagnostics –Pre
Change the code in your
Startup1.Configuration
method as follows:Now use CTRL+F5 to run the application without debugging, so that Visual Studio will not break on the exception. The application behaves the same as before, until you navigate to
http://localhost/fail
, at which point the application throws the exception. The error page middleware will catch the exception and display an HTML page with information about the error. You can click the tabs to see the stack, query string, cookies, request header, and OWIN environment variables.