System.Security.VerificationException:操作可能会破坏运行时的稳定性。....我的网站: http: //noyaban.com/tara
国际奥委会.cs:
public static IContainer Initialize()
{
ObjectFactory.Initialize(x =>
{
x.Scan(scan =>
{
// scan.AssembliesFromApplicationBaseDirectory();
scan.TheCallingAssembly();
scan.WithDefaultConventions();
});
x.For<IUnitOfWork>().HttpContextScoped().Use<SadeghianDbContext>();
x.For<IAboutUsService>().Use<AboutUsService>();
x.For<IBannersService>().Use<BannersService>();
x.For<ICentralOfficeService>().Use<CentralOfficeService>();
x.For<IContactUsService>().Use<ContactUsService>();
x.For<IDownloadsService>().Use<DownloadsService>();
x.For<ILogoService>().Use<LogoService>();
x.For<INewsService>().Use<NewsService>();
x.For<IProductsService>().Use<ProductsService>();
x.For<IResellerService>().Use<ResellerService>();
x.For<ISlideShowService>().Use<SlideShowService>();
x.For<IUsersService>().Use<UsersService>();
x.For<IProvinceService>().Use<ProvinceService>();
x.For<IForgottenPasswordService>().Use<ForgottenPasswordService>();
x.For<IAdminCommentsService>().Use<AdminCommentsService>();
x.For<IGroupingProductService>().Use<GroupingProductService>();
x.For<IHomePageBannerService>().Use<HomePageBannerService>();
x.For<IHomePageFooterService>().Use<HomePageFooterService>();
});
return ObjectFactory.Container;
}
本地主机中的此代码完美运行,但在主机中不起作用!