От: | senglory | ||
Дата: | 26.09.19 13:27 | ||
Оценка: |
protected void Application_Start(object sender, EventArgs e)
{
UnityContainer container = new UnityContainer();
container.RegisterType<IMapper, CustomMapper>();
container.RegisterType<ISessionLoginInfo, CustomSession>();
IDateTimeProvider dtp = DateTimeProvider.Current;
var cc = container.RegisterInstance<IDateTimeProvider>(dtp);
GlobalConfiguration.Configuration.DependencyResolver = new Unity.WebApi.UnityDependencyResolver(container);
}
Server Error in '/' Application.
Could not load type 'Custom.Shared.IDateTimeProvider' from assembly 'Custom.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'Custom.Shared.IDateTimeProvider' from assembly 'Custom.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.