2

System.Security.VerificationException: 操作により、ランタイムが不安定になる可能性があります。.... 私のサイト: http://noyaban.com/tara

IoC.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;
    }

ローカルホストのこのコードは完全に機能しますが、ホストでは機能しません!

スタックトレース

4

1 に答える 1