diff --git a/Framework/Azure/Cqrs.Azure.ConfigurationManager/Cqrs.Azure.ConfigurationManager.csproj b/Framework/Azure/Cqrs.Azure.ConfigurationManager/Cqrs.Azure.ConfigurationManager.csproj
index 3ef6e0f096..0dcb2d7f2d 100644
--- a/Framework/Azure/Cqrs.Azure.ConfigurationManager/Cqrs.Azure.ConfigurationManager.csproj
+++ b/Framework/Azure/Cqrs.Azure.ConfigurationManager/Cqrs.Azure.ConfigurationManager.csproj
@@ -48,8 +48,8 @@
..\..\..\packages\cdmdotnet.Performance.1.0.5.8\lib\net40\cdmdotnet.Performance.dll
True
-
- ..\..\..\packages\cdmdotnet.StateManagement.3.0.9.7\lib\net40\cdmdotnet.StateManagement.dll
+
+ ..\..\..\packages\cdmdotnet.StateManagement.3.0.13.9\lib\net40\cdmdotnet.StateManagement.dll
True
diff --git a/Framework/Azure/Cqrs.Azure.ConfigurationManager/packages.config b/Framework/Azure/Cqrs.Azure.ConfigurationManager/packages.config
index ed0d2c31d3..cab04ef399 100644
--- a/Framework/Azure/Cqrs.Azure.ConfigurationManager/packages.config
+++ b/Framework/Azure/Cqrs.Azure.ConfigurationManager/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/Framework/Azure/Cqrs.Azure.WebJobs/Cqrs.Azure.WebJobs.csproj b/Framework/Azure/Cqrs.Azure.WebJobs/Cqrs.Azure.WebJobs.csproj
index a672417f91..a3b947be1c 100644
--- a/Framework/Azure/Cqrs.Azure.WebJobs/Cqrs.Azure.WebJobs.csproj
+++ b/Framework/Azure/Cqrs.Azure.WebJobs/Cqrs.Azure.WebJobs.csproj
@@ -45,8 +45,8 @@
..\..\..\packages\cdmdotnet.Performance.1.0.5.8\lib\net40\cdmdotnet.Performance.dll
True
-
- ..\..\..\packages\cdmdotnet.StateManagement.3.0.9.7\lib\net40\cdmdotnet.StateManagement.dll
+
+ ..\..\..\packages\cdmdotnet.StateManagement.3.0.13.9\lib\net40\cdmdotnet.StateManagement.dll
True
diff --git a/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/app.config.install.xdt b/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/app.config.install.xdt
index 88408e0ef6..4d1e2593cf 100644
--- a/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/app.config.install.xdt
+++ b/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/app.config.install.xdt
@@ -5,15 +5,9 @@
-
-
-
-
-
-
diff --git a/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/web.config.install.xdt b/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/web.config.install.xdt
index 88408e0ef6..4d1e2593cf 100644
--- a/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/web.config.install.xdt
+++ b/Framework/Azure/Cqrs.Azure.WebJobs/Packaging/web.config.install.xdt
@@ -5,15 +5,9 @@
-
-
-
-
-
-
diff --git a/Framework/Azure/Cqrs.Azure.WebJobs/packages.config b/Framework/Azure/Cqrs.Azure.WebJobs/packages.config
index 924f3a9d6e..729fec3d1a 100644
--- a/Framework/Azure/Cqrs.Azure.WebJobs/packages.config
+++ b/Framework/Azure/Cqrs.Azure.WebJobs/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/Framework/Cqrs.WebApi/Controllers/ClientController.cs b/Framework/Cqrs.WebApi/Controllers/ClientController.cs
index c9b0e7a8d0..92cd32f849 100644
--- a/Framework/Cqrs.WebApi/Controllers/ClientController.cs
+++ b/Framework/Cqrs.WebApi/Controllers/ClientController.cs
@@ -13,6 +13,7 @@
using System.Text;
using System.Web.Http;
using System.Web.Http.Description;
+using Cqrs.Configuration;
namespace Cqrs.WebApi.Controllers
{
@@ -35,7 +36,7 @@ public virtual HttpResponseMessage Index()
metadata: {0},
useJson: true,
useXToken: true,
- cookieTokenName: 'X-Token',
+ cookieTokenName: '{3}',
// This is because JQuery notes Global events are never fired for cross-domain script or JSONP requests, regardless of the value of global at https://api.jquery.com/category/ajax/global-ajax-event-handlers/
globalHandlers: {{
'before' : function(jqXHR, settings) {{}},
@@ -170,7 +171,8 @@ public virtual HttpResponseMessage Index()
}});",
System.Web.Helpers.Json.Encode(apiMethods),
host,
- path);
+ path,
+ DependencyResolver.Current.Resolve().GetSetting("Cqrs.Web.AuthenticationTokenName") ?? "X-Token");
HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, responseBody);
response.Content = new StringContent(responseBody, Encoding.UTF8, "application/javascript");
diff --git a/Framework/Cqrs.WebApi/CqrsApiController.cs b/Framework/Cqrs.WebApi/CqrsApiController.cs
index cf4879fcfa..4c5601ce5e 100644
--- a/Framework/Cqrs.WebApi/CqrsApiController.cs
+++ b/Framework/Cqrs.WebApi/CqrsApiController.cs
@@ -17,12 +17,12 @@
using Cqrs.Authentication;
using Cqrs.Services;
using System.Net.Http.Formatting;
-using System.Web.Http.Results;
+using Cqrs.Configuration;
namespace Cqrs.WebApi
{
///
- /// A that expects the to be sent as a with a key of "X-Token", in accordance with OAuth specifications
+ /// A that expects the to be sent as a with a key whose name is defined by the "Cqrs.Web.AuthenticationTokenName", in accordance with OAuth specifications
///
///
/// See https://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages for details on adding WebApi Help Pages.
@@ -30,9 +30,10 @@ namespace Cqrs.WebApi
public abstract class CqrsApiController
: ApiController
{
- protected CqrsApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper)
+ protected CqrsApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager)
{
CorrelationIdHelper = correlationIdHelper;
+ ConfigurationManager = configurationManager;
Logger = logger;
}
@@ -40,20 +41,24 @@ protected CqrsApiController(ILogger logger, ICorrelationIdHelper correlationIdHe
protected ILogger Logger { get; private set; }
+ protected IConfigurationManager ConfigurationManager { get; private set; }
+
protected virtual string GetToken()
{
- string token = null;
+ string authenticationTokenName = ConfigurationManager.GetSetting("Cqrs.Web.AuthenticationTokenName") ?? "X-Token";
+
+ string xToken = null;
IEnumerable tokenValue;
- if (Request.Headers.TryGetValues("X-Token", out tokenValue))
- token = tokenValue.First();
+ if (Request.Headers.TryGetValues(authenticationTokenName, out tokenValue))
+ xToken = tokenValue.First();
else
{
- CookieHeaderValue cookie = Request.Headers.GetCookies("X-Token").FirstOrDefault();
+ CookieHeaderValue cookie = Request.Headers.GetCookies(authenticationTokenName).FirstOrDefault();
if (cookie != null)
- token = cookie["X-Token"].Value;
+ xToken = cookie[authenticationTokenName].Value;
}
- return token;
+ return xToken;
}
protected virtual IServiceRequest CreateRequest()
@@ -159,8 +164,8 @@ protected virtual HttpResponseMessage CompleteResponse(TServic
public abstract class CqrsApiController
: CqrsApiController
{
- protected CqrsApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper authenticationTokenHelper)
- : base(logger, correlationIdHelper)
+ protected CqrsApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager, IAuthenticationTokenHelper authenticationTokenHelper)
+ : base(logger, correlationIdHelper, configurationManager)
{
AuthenticationTokenHelper = authenticationTokenHelper;
}
diff --git a/Framework/Cqrs.WebApi/CqrsEventApiController.cs b/Framework/Cqrs.WebApi/CqrsEventApiController.cs
index 986957e83d..36ae3cded0 100644
--- a/Framework/Cqrs.WebApi/CqrsEventApiController.cs
+++ b/Framework/Cqrs.WebApi/CqrsEventApiController.cs
@@ -10,6 +10,7 @@
using System.Collections.Generic;
using cdmdotnet.Logging;
using Cqrs.Authentication;
+using Cqrs.Configuration;
using Cqrs.Events;
using Cqrs.Services;
@@ -23,8 +24,8 @@ public abstract class CqrsEventApiController
, IEventService
where TSingleSignOnToken : ISingleSignOnToken, new()
{
- protected CqrsEventApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper authenticationTokenHelper, IEventStore eventStore)
- : base(logger, correlationIdHelper)
+ protected CqrsEventApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper authenticationTokenHelper, IEventStore eventStore, IConfigurationManager configurationManager)
+ : base(logger, correlationIdHelper, configurationManager)
{
AuthenticationTokenHelper = authenticationTokenHelper;
EventStore = eventStore;
diff --git a/Framework/Cqrs.WebApi/CqrsHttpApplicationWithSignalR.cs b/Framework/Cqrs.WebApi/CqrsHttpApplicationWithSignalR.cs
index 3b30318f2e..88b05c3cdf 100644
--- a/Framework/Cqrs.WebApi/CqrsHttpApplicationWithSignalR.cs
+++ b/Framework/Cqrs.WebApi/CqrsHttpApplicationWithSignalR.cs
@@ -29,7 +29,8 @@ public abstract class CqrsHttpApplicationWithSignalR
: CqrsHttpApplicationWithSignalR>
{
+ #region Overrides of CqrsHttpApplicationWithSignalR
+
///
/// Register SignalR and auto wire-up to automatically proxy all events to SignalR.
///
@@ -79,9 +84,11 @@ protected override void RegisterSignalR(BusRegistrar registrar)
{
base.RegisterSignalR(registrar);
- var eventHandlerRegistrar = DependencyResolver.Resolve();
- var proxy = DependencyResolver.Resolve>();
+ var eventHandlerRegistrar = DependencyResolver.Current.Resolve();
+ var proxy = DependencyResolver.Current.Resolve>();
eventHandlerRegistrar.RegisterGlobalEventHandler>(proxy.Handle, false);
}
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/Framework/Cqrs.WebApi/SignalR/Hubs/NotificationHub.cs b/Framework/Cqrs.WebApi/SignalR/Hubs/NotificationHub.cs
index 0057a7a959..44a33baa2b 100644
--- a/Framework/Cqrs.WebApi/SignalR/Hubs/NotificationHub.cs
+++ b/Framework/Cqrs.WebApi/SignalR/Hubs/NotificationHub.cs
@@ -12,6 +12,7 @@
using System.Threading;
using System.Threading.Tasks;
using cdmdotnet.Logging;
+using Cqrs.Configuration;
using Cqrs.Events;
using Microsoft.AspNet.SignalR;
@@ -62,10 +63,13 @@ protected virtual string UserToken()
{
string userRsn;
Cookie cookie;
- if (Context.RequestCookies.TryGetValue("X-Token", out cookie))
+
+ string authenticationTokenName = DependencyResolver.Current.Resolve().GetSetting("Cqrs.Web.AuthenticationTokenName") ?? "X-Token";
+
+ if (Context.RequestCookies.TryGetValue(authenticationTokenName, out cookie))
userRsn = cookie.Value;
else
- userRsn = Context.QueryString["X-Token"];
+ userRsn = Context.QueryString[authenticationTokenName];
return userRsn.Replace(".", string.Empty);
}
diff --git a/Framework/Cqrs/Hosts/CoreHost.cs b/Framework/Cqrs/Hosts/CoreHost.cs
index 0c0e1f21f6..604ad6fa7a 100644
--- a/Framework/Cqrs/Hosts/CoreHost.cs
+++ b/Framework/Cqrs/Hosts/CoreHost.cs
@@ -68,7 +68,6 @@ protected CoreHost()
bool pauseAndWait;
long waitCounter = 0;
long maximumCount;
- // I set this to true ... just because.
if (!long.TryParse(ConfigurationManager.GetSetting("Cqrs.Hosts.PauseAndWaitMaximumCount"), out maximumCount))
maximumCount = 300;
SpinWait.SpinUntil
@@ -83,7 +82,6 @@ protected CoreHost()
(short)1000
);
- // I set this to true ... just because.
TelemetryName = ConfigurationManager.GetSetting("Cqrs.Hosts.AppName") ?? AppDomain.CurrentDomain.FriendlyName;
}
// ReSharper restore DoNotCallOverridableMethodsInConstructor
diff --git a/Framework/Cqrs/Hosts/CqrsHttpApplication.cs b/Framework/Cqrs/Hosts/CqrsHttpApplication.cs
index 7dbddf5da8..b91775f1f4 100644
--- a/Framework/Cqrs/Hosts/CqrsHttpApplication.cs
+++ b/Framework/Cqrs/Hosts/CqrsHttpApplication.cs
@@ -13,7 +13,9 @@
using System.Web.SessionState;
using cdmdotnet.Logging;
using Cqrs.Authentication;
+using Cqrs.Commands;
using Cqrs.Configuration;
+using Cqrs.Events;
namespace Cqrs.Hosts
{
@@ -24,45 +26,78 @@ public abstract class CqrsHttpApplication
: HttpApplication
{
///
- /// The to configure in
+ /// Each will be traced back to it's assembly, and that assembly will be scanned for other handlers to auto register.
///
- protected static IDependencyResolver DependencyResolver { get; set; }
+ protected Type[] HandlerTypes { get; set; }
///
- /// Each will be traced back to it's assembly, and that assembly will be scanned for other handlers to auto register.
+ /// The that will be configured to receive events.
///
- protected Type[] HandlerTypes { get; set; }
+ protected IEventReceiver EventBus { get; set; }
+
+ ///
+ /// The that will be configured to receive commands.
+ ///
+ protected ICommandReceiver CommandBus { get; set; }
///
- /// Calls , and finally .
+ /// Instantiate a new instance of a
+ ///
+ protected CqrsHttpApplication()
+ {
+ HandlerTypes = new Type[]{};
+ }
+
+ ///
+ /// Calls , and finally .
/// Gets executed once during the life cycle of the application when the first request for any resource in the application is made. A resource can be a page or an image in the application.
/// If the server where the application is hosted is restarted then this is fired once again upon the first request for any resource in the application.
///
protected virtual void Application_Start(object sender, EventArgs e)
{
- ConfigureDefaultDependencyResolver();
+ SetBuses();
RegisterCommandAndEventHandlers();
+ StartBuses();
+
LogApplicationStarted();
}
///
- /// Configure the .
+ /// Set and .
///
- protected abstract void ConfigureDefaultDependencyResolver();
+ protected abstract void SetBuses();
///
/// Start the by calling passing
///
protected virtual BusRegistrar RegisterCommandAndEventHandlers()
{
- var registrar = new BusRegistrar(DependencyResolver);
+ var registrar = new BusRegistrar(DependencyResolver.Current);
registrar.Register(HandlerTypes);
return registrar;
}
+ ///
+ /// Starts the command bus and event bus receivers depending on configuration settings
+ ///
+ protected virtual void StartBuses()
+ {
+
+ var configurationManager = DependencyResolver.Current.Resolve();
+ bool setting;
+ if (!configurationManager.TryGetSetting("Cqrs.Hosts.EnableEventReceiving", out setting))
+ setting = true;
+ if (setting)
+ EventBus.Start();
+ if (!configurationManager.TryGetSetting("Cqrs.Hosts.EnableCommandReceiving", out setting))
+ setting = true;
+ if (setting)
+ CommandBus.Start();
+ }
+
///
/// Log that the application has started
///
@@ -70,11 +105,11 @@ protected virtual void LogApplicationStarted()
{
try
{
- ILogger logger = DependencyResolver.Resolve();
+ ILogger logger = DependencyResolver.Current.Resolve();
if (logger != null)
{
- DependencyResolver.Resolve().SetCorrelationId(Guid.Empty);
+ DependencyResolver.Current.Resolve().SetCorrelationId(Guid.Empty);
logger.LogInfo("Application started.");
}
}
@@ -89,11 +124,11 @@ protected virtual void Application_End(object sender, EventArgs e)
{
try
{
- ILogger logger = DependencyResolver.Resolve();
+ ILogger logger = DependencyResolver.Current.Resolve();
if (logger != null)
{
- DependencyResolver.Resolve().SetCorrelationId(Guid.Empty);
+ DependencyResolver.Current.Resolve().SetCorrelationId(Guid.Empty);
logger.LogInfo("Application stopped.");
}
}
@@ -110,7 +145,7 @@ protected virtual void Application_Error(object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
- ILogger logger = DependencyResolver.Resolve();
+ ILogger logger = DependencyResolver.Current.Resolve();
Action, IDictionary> loggerFunction = logger.LogError;
if (ex is SecurityException)
loggerFunction = logger.LogWarning;
@@ -129,7 +164,7 @@ protected virtual void Application_BeginRequest(object sender, EventArgs e)
try
{
Guid correlationId = Guid.NewGuid();
- DependencyResolver.Resolve().SetCorrelationId(correlationId);
+ DependencyResolver.Current.Resolve().SetCorrelationId(correlationId);
Response.AddHeader("CorrelationId", correlationId.ToString("N"));
}
catch (NullReferenceException) { }
@@ -181,9 +216,11 @@ protected virtual void Session_End(object sender, EventArgs e)
public abstract class CqrsHttpApplication
: CqrsHttpApplication
{
+ #region Overrides of CqrsHttpApplication
+
///
/// Gets executed after .
- /// Extracts the authentication token looking for a where the key is "X-Token",
+ /// Extracts the authentication token looking for a where the key as defined by the "Cqrs.Web.AuthenticationTokenName",
/// from the , if one isn't found we then try the following in order
/// , or ; then
/// calls to make it accessible to others parts of the system if one is found.
@@ -193,24 +230,26 @@ protected override void Application_AuthenticateRequest(object sender, EventArgs
if (typeof (TAuthenticationToken) != typeof (Guid) && typeof (TAuthenticationToken) != typeof (string) && typeof (TAuthenticationToken) != typeof (int))
return;
- string xToken = Request.Headers["X-Token"];
+ string authenticationTokenName = DependencyResolver.Current.Resolve().GetSetting("Cqrs.Web.AuthenticationTokenName") ?? "X-Token";
+
+ string xToken = Request.Headers[authenticationTokenName];
if (string.IsNullOrWhiteSpace(xToken))
{
- HttpCookie authCookie = Request.Cookies["X-Token"];
+ HttpCookie authCookie = Request.Cookies[authenticationTokenName];
if (authCookie != null)
xToken = authCookie.Value;
}
if (string.IsNullOrWhiteSpace(xToken))
- xToken = Request.Form["X-Token"];
+ xToken = Request.Form[authenticationTokenName];
if (string.IsNullOrWhiteSpace(xToken))
- xToken = Request.QueryString["X-Token"];
+ xToken = Request.QueryString[authenticationTokenName];
if (typeof(TAuthenticationToken) != typeof(Guid))
{
Guid token;
if (Guid.TryParse(xToken, out token))
{
// Pass the authentication token to the helper to allow automated authentication handling
- DependencyResolver.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)token);
+ DependencyResolver.Current.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)token);
}
}
else if (typeof(TAuthenticationToken) != typeof(int))
@@ -219,11 +258,22 @@ protected override void Application_AuthenticateRequest(object sender, EventArgs
if (int.TryParse(xToken, out token))
{
// Pass the authentication token to the helper to allow automated authentication handling
- DependencyResolver.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)token);
+ DependencyResolver.Current.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)token);
}
}
else
- DependencyResolver.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)xToken);
+ DependencyResolver.Current.Resolve>().SetAuthenticationToken((TAuthenticationToken)(object)xToken);
}
+
+ ///
+ /// Set and .
+ ///
+ protected override void SetBuses()
+ {
+ EventBus = DependencyResolver.Current.Resolve>();
+ CommandBus = DependencyResolver.Current.Resolve>();
+ }
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/Framework/Cqrs/Packaging/app.config.install.xdt b/Framework/Cqrs/Packaging/app.config.install.xdt
index f537d31a30..7b3ce5a8d9 100644
--- a/Framework/Cqrs/Packaging/app.config.install.xdt
+++ b/Framework/Cqrs/Packaging/app.config.install.xdt
@@ -5,10 +5,19 @@
+
+
+
+
+
+
+
+
+
diff --git a/Framework/Cqrs/Packaging/web.config.install.xdt b/Framework/Cqrs/Packaging/web.config.install.xdt
index da282a043a..a880db5709 100644
--- a/Framework/Cqrs/Packaging/web.config.install.xdt
+++ b/Framework/Cqrs/Packaging/web.config.install.xdt
@@ -5,11 +5,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/Cqrs.Ninject.Azure.Wcf.csproj b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/Cqrs.Ninject.Azure.Wcf.csproj
index 9289b8237f..df9449544c 100644
--- a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/Cqrs.Ninject.Azure.Wcf.csproj
+++ b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/Cqrs.Ninject.Azure.Wcf.csproj
@@ -49,8 +49,8 @@
..\..\..\..\packages\cdmdotnet.Performance.1.0.5.8\lib\net40\cdmdotnet.Performance.dll
True
-
- ..\..\..\..\packages\cdmdotnet.StateManagement.3.0.9.7\lib\net40\cdmdotnet.StateManagement.dll
+
+ ..\..\..\..\packages\cdmdotnet.StateManagement.3.0.13.9\lib\net40\cdmdotnet.StateManagement.dll
True
diff --git a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/CqrsWebHost.cs b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/CqrsWebHost.cs
index 4fa8d7aeb1..51d43ae6dd 100644
--- a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/CqrsWebHost.cs
+++ b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/CqrsWebHost.cs
@@ -62,7 +62,6 @@ protected virtual IEnumerable GetSupplementaryModules()
///
/// A collection of that configure the Azure Servicebus as a command bus as both
/// and .
- /// If the app setting Cqrs.Azure.WebJobs.EnableEventReceiving is "false" then no modules will be returned.
///
protected virtual IEnumerable GetCommandBusModules()
{
@@ -76,6 +75,7 @@ protected virtual IEnumerable GetCommandBusModules()
///
/// A collection of that configure the Azure Servicebus as a event bus as both
/// and
+ /// If the app setting Cqrs.Host.EnableEventReceiving is "false" then no modules will be returned.
///
protected virtual IEnumerable GetEventBusModules()
{
diff --git a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/packages.config b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/packages.config
index bf146f2f41..11db05861e 100644
--- a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/packages.config
+++ b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.Wcf/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/Cqrs.Ninject.Azure.WebJobs.csproj b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/Cqrs.Ninject.Azure.WebJobs.csproj
index 0c009f7ffd..0109e19622 100644
--- a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/Cqrs.Ninject.Azure.WebJobs.csproj
+++ b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/Cqrs.Ninject.Azure.WebJobs.csproj
@@ -49,8 +49,8 @@
..\..\..\..\packages\cdmdotnet.Performance.1.0.5.8\lib\net40\cdmdotnet.Performance.dll
True
-
- ..\..\..\..\packages\cdmdotnet.StateManagement.3.0.9.7\lib\net40\cdmdotnet.StateManagement.dll
+
+ ..\..\..\..\packages\cdmdotnet.StateManagement.3.0.13.9\lib\net40\cdmdotnet.StateManagement.dll
True
diff --git a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/packages.config b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/packages.config
index 8cf9a13d04..a1d87728ce 100644
--- a/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/packages.config
+++ b/Framework/Ninject/Azure/Cqrs.Ninject.Azure.WebJobs/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.csproj b/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.csproj
index cef4f41187..9b28b2b3a3 100644
--- a/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.csproj
+++ b/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.csproj
@@ -101,8 +101,6 @@
Designer
-
-
diff --git a/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.nuspec b/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.nuspec
index ade3e4209c..60bd4fc429 100644
--- a/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.nuspec
+++ b/Framework/Ninject/Cqrs.Ninject.WebApi/Cqrs.Ninject.WebApi.nuspec
@@ -26,7 +26,6 @@
-
\ No newline at end of file
diff --git a/Framework/Ninject/Cqrs.Ninject/Configuration/SimplifiedNinjectStartUp.cs b/Framework/Ninject/Cqrs.Ninject/Configuration/SimplifiedNinjectStartUp.cs
index 844102f376..9ae160b8bf 100644
--- a/Framework/Ninject/Cqrs.Ninject/Configuration/SimplifiedNinjectStartUp.cs
+++ b/Framework/Ninject/Cqrs.Ninject/Configuration/SimplifiedNinjectStartUp.cs
@@ -37,7 +37,7 @@ public virtual IKernel CreateKernel()
NinjectDependencyResolver.ModulesToLoad.Insert(0, new THostModule());
string authenticationType;
- if (!ConfigurationManager.TryGetSetting("Cqrs.WebApi.AuthenticationTokenType", out authenticationType))
+ if (!ConfigurationManager.TryGetSetting("Cqrs.AuthenticationTokenType", out authenticationType))
authenticationType = "Guid";
if (authenticationType.ToLowerInvariant() == "int" || authenticationType.ToLowerInvariant() == "integer")
diff --git a/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.csproj b/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.csproj
index f96165d057..d9fe216b87 100644
--- a/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.csproj
+++ b/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.csproj
@@ -76,6 +76,8 @@
Designer
+
+
diff --git a/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.nuspec b/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.nuspec
index bf23858c75..d9d436acbc 100644
--- a/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.nuspec
+++ b/Framework/Ninject/Cqrs.Ninject/Cqrs.Ninject.nuspec
@@ -13,6 +13,10 @@
Copyright 2013
CQRS Ninject
+ Version 2.2
+
+ * Added Host StartUp support.
+
Version 2.1
* Added Ninject module entries for Saga/Process Manager requirements.
@@ -26,6 +30,7 @@
+
\ No newline at end of file
diff --git a/Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/app.config.install.xdt b/Framework/Ninject/Cqrs.Ninject/Packaging/app.config.install.xdt
similarity index 65%
rename from Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/app.config.install.xdt
rename to Framework/Ninject/Cqrs.Ninject/Packaging/app.config.install.xdt
index 0f32da8c05..422de52015 100644
--- a/Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/app.config.install.xdt
+++ b/Framework/Ninject/Cqrs.Ninject/Packaging/app.config.install.xdt
@@ -5,6 +5,6 @@
-
+
\ No newline at end of file
diff --git a/Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/web.config.install.xdt b/Framework/Ninject/Cqrs.Ninject/Packaging/web.config.install.xdt
similarity index 65%
rename from Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/web.config.install.xdt
rename to Framework/Ninject/Cqrs.Ninject/Packaging/web.config.install.xdt
index 0f32da8c05..422de52015 100644
--- a/Framework/Ninject/Cqrs.Ninject.WebApi/Packaging/web.config.install.xdt
+++ b/Framework/Ninject/Cqrs.Ninject/Packaging/web.config.install.xdt
@@ -5,6 +5,6 @@
-
+
\ No newline at end of file