embedio

A tiny, cross-platform, module based web server for .NET

OTHER License

Stars
1.5K
Committers
42

Bot releases are visible (Hide)

embedio - Global Exception Handler for IWebServer

Published by geoperez over 5 years ago

  • Global Exception Handler was added as propose issue #300. For example, if you want to remove the default HTML error response, you can add a function to the UnhandledException property at IWebServer:
using (var server = new WebServer(webOptions))
{
    // Report to console the error only
    server.UnhandledException = (ctx, ex, ct) => {
        ex.Message.Error(nameof(WebServer));
        ctx.Response.StatusCode = 500;

        return Task.FromResult(true);
    };

    // Continue with WebServer start up
}
  • The MIME Types Dictionary was reverted to plain Dictionary to allow add new entries (Issue #302)
embedio - Mark Obsolete items and WebSocket subprotocol selector

Published by geoperez over 5 years ago

Some extensions methods, properties, and classes are marked as Obsolete because they are no longer part of the next major version of EmbedIO. One important breaking change is we are no longer supporting Wildcard routing so we encourage to change your code to Regex routing.

Also, this version includes a subprotocol selector for WebSocket #285.

embedio - Update dependencies

Published by geoperez over 5 years ago

Fix issue with SWAN JSON issues updating this dependency.

embedio - Update WebApiController

Published by geoperez over 5 years ago

Breaking changes

This version replaces the logic of how WebApiController works but introducing new Extension Methods and how the Request and Response are handles in the controller's method.

The core change is that WebApiController is no longer implementing the interface IHttpContext. Instead of this, the WebApiController contains a property HttpContext where this instance is located. This affect how you can, for example, response a JSON:

[WebApiHandler(HttpVerbs.Post, "/api/data")]
public async Task<bool> PostData() 
{
    // previous code
    return await this.JsonResponseAsync(new { error = "Invalid Product" });

    // new code
    return await HttpContext.JsonResponseAsync(new { error = "Invalid Product" });
    // or using the new virtual methods
    return await Ok(new { error = "Invalid Product" });
}
embedio - Add Items to IHttpContext

Published by geoperez over 5 years ago

  • Add Items to IHttpContext
  • Add virtual methods to WebApiController
  • Fix #278 (Thanks @rdeago)
embedio - Improvements to StaticFileModule

Published by geoperez over 5 years ago

Thanks to @rdeago for the PR #275 (Issue #272).

embedio - Smaller EmbedIO

Published by geoperez over 5 years ago

Remove the WebSocket client and fix several issues.

embedio - HTTPS Support

Published by geoperez over 5 years ago

HTTPS Support

embedio - IPv6 Support

Published by geoperez almost 6 years ago

  • Support to IPv6 (Issue #214)

You can setup IPv6 in two ways:

Using new EndPointManager.UseIpv6 will set IPAddress.IPv6Any for * hostname:

EndPointManager.UseIpv6 = true;
var instance = new WebServer("http://*:8877");

Or directly using the IPv6 address like the lookback:

var instance = new WebServer("http://[::1]:8877");
  • Fix WebSocket client for targets NET47 and NETCOREAPP21
  • Remove Task.Delay from polling (Issue #155)
  • Add ConfigureAwait(false) to async invocations.
embedio - New EmbedIO 2.0

Published by geoperez almost 6 years ago

Breaking changes

  • WebApiController is renewed. Reduce the methods overhead removing the WebServer and Context arguments. See examples below.
  • RoutingStrategy.Regex is the default routing scheme.

Additional changes

  • IHttpListener is runtime/platform independent, you can choose Unosquare HttpListener implementation with NET47 or NETSTANDARD20. This separation of implementations brings new access to interfaces from common Http objects like IHttpRequest, IHttpContext and more.
  • IWebServer is a new interface to create custom web server implementation, like a Test Web Server where all the operations are in-memory to speed up unit testing. Similar to TestServer from OWIN
  • General improvements in how the Unosquare HttpListner is working and code clean-up.

Note - We encourage to upgrade to the newest EmbedIO version. Branch version 1.X will no longer be maintained, and issues will be tested against 2.X and resolved just there.

embedio - Release 1.14.0

Published by geoperez over 6 years ago

Add new Resources File Module by @nickhodge.

embedio - Release 1.13.0

Published by geoperez over 6 years ago

  • Change dependency SWAN to Lite version
  • Upgrade codebase to C# 7.1
embedio - Release 1.12.0

Published by geoperez over 6 years ago

  • Added support for web socket routing #124
  • New callback to handle 405 HTTP responses #123
embedio - Release 1.11.3

Published by geoperez almost 7 years ago

Workaroud issue Firefox WebSocket #96

embedio - Release 1.11.0

Published by geoperez almost 7 years ago

Resolved issue #103 .

embedio - Release 1.10.0

Published by geoperez about 7 years ago

Resolved issue #98 and restored .NET Framework 4.7 as target.

embedio - Release 1.9.1

Published by geoperez about 7 years ago

Fixed issue with CloseAsync

embedio - Release 1.9.0

Published by geoperez about 7 years ago

Fixing issues with performance. Avg 100 req/sec getting index.html @ Sample App.

embedio - Release 1.8.0

Published by geoperez about 7 years ago

  • Resolved Issue #89
  • Removed PROXY and AUTHENTICATION segments.
  • Resolved some StyleCop issues.
  • Refactored some classes to reduce responsibility.
embedio - Release 1.7.0

Published by geoperez about 7 years ago

  • Upgrade NET frameworks target to 4.6 and 4.6.2.
  • Upgrade Solution to VS2017
  • Fix issue #47