i have installed Sylius as following:
$ composer create-project sylius/sylius
$ cd sylius
$ php app/console sylius:install
Installed versions: Symfony 2.7.7 and Sylius 0.17
All things were working fine until i did composer update. Here was Symfony updated to 2.8.4-dev. I have changed nothing in composer.json. Now i become an error on startpage if i call app_dev.php
An exception has been thrown during the rendering of a template ("Doctrine is not available.") in SyliusWebBundle:Frontend:layout.html.twig at line 97.
500 Internal Server Error - Twig_Error_Runtime
1 linked Exception:
RuntimeException »
Debug-Info: CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Doctrine is not available.") in "SyliusWebBundle:Frontend:layout.html.twig" at line 97." at /.../vendor/twig/twig/lib/Twig/Template.php line 182
How can i keep the versionnumber of Symfony and Sylius on composer update?
Update 05.Apr 2016:
Result of composer show -i sylius/sylius:
name : sylius/sylius
descrip. : E-Commerce platform for PHP, based on Symfony framework.
keywords :
versions : * v0.17.0
type : project
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/Sylius/Sylius.git 73397b078f2b34982040b4bcfc8b79532262966d
dist : [zip] https://api.github.com/repos/Sylius/Sylius/zipball/73397b078f2b34982040b4bcfc8b79532262966d 73397b078f2b34982040b4bcfc8b79532262966d
names : sylius/sylius, sylius/addressing, sylius/addressing-bundle, sylius/admin-bundle, sylius/api-bundle, sylius/archetype, sylius/archetype-bundle, sylius/attribute, sylius/attribute-bundle, sylius/cart, sylius/cart-bundle, sylius/contact, sylius/contact-bundle, sylius/content-bundle, sylius/core, sylius/core-bundle, sylius/currency, sylius/currency-bundle, sylius/fixtures-bundle, sylius/flow-bundle, sylius/installer-bundle, sylius/inventory, sylius/inventory-bundle, sylius/locale, sylius/locale-bundle, sylius/money-bundle, sylius/order, sylius/order-bundle, sylius/payment, sylius/payment-bundle, sylius/payum-bundle, sylius/pricing, sylius/pricing-bundle, sylius/product, sylius/product-bundle, sylius/promotion, sylius/promotion-bundle, sylius/rbac, sylius/rbac-bundle, sylius/registry, sylius/report, sylius/report-bundle, sylius/resource, sylius/resource-bundle, sylius/search-bundle, sylius/sequence, sylius/sequence-bundle, sylius/settings-bundle, sylius/shipping, sylius/shipping-bundle, sylius/storage, sylius/taxation, sylius/taxation-bundle, sylius/taxonomy, sylius/taxonomy-bundle, sylius/theme-bundle, sylius/translation, sylius/translation-bundle, sylius/ui-bundle, sylius/user, sylius/user-bundle, sylius/variation, sylius/variation-bundle, sylius/web-bundle
autoload
psr-0
Sylius\ => src/
requires
a2lix/translation-form-bundle ~2.0
doctrine/collections ~1.2
doctrine/common ~2.5
doctrine/doctrine-bundle ~1.3
doctrine/doctrine-cache-bundle ~1.0
doctrine/doctrine-fixtures-bundle ~2.2
doctrine/doctrine-migrations-bundle ~1.0
doctrine/orm ^2.4.8,<2.5
doctrine/phpcr-odm ^1.3
ext-exif *
ext-fileinfo *
ext-gd *
friendsofsymfony/elastica-bundle ^3.0.2
friendsofsymfony/oauth-server-bundle ~1.4
friendsofsymfony/rest-bundle ~1.5
fzaninotto/faker ~1.2
hwi/oauth-bundle ~0.3
incenteev/composer-parameter-handler ~2.0
jackalope/jackalope ^1.1.4
jackalope/jackalope-doctrine-dbal ^1.1.2
jms/serializer-bundle ^0.13|^1.0
jms/translation-bundle ~1.1
knplabs/knp-gaufrette-bundle ~0.1
knplabs/knp-menu-bundle ~1.1
knplabs/knp-snappy-bundle ~1.2
liip/imagine-bundle ~1.0
ocramius/proxy-manager ^1.0
omnipay/omnipay ~2.3
payum/omnipay-bridge ~1.0
payum/payum ~1.0
payum/payum-bundle ~1.0
php ^5.5.9|^7.0
sensio/distribution-bundle ~3.0
stof/doctrine-extensions-bundle ~1.1
swiftmailer/swiftmailer ~5.0
symfony-cmf/block-bundle ~1.2
symfony-cmf/content-bundle ~1.2
symfony-cmf/create-bundle ~1.2
symfony-cmf/media-bundle ~1.2
symfony-cmf/menu-bundle ~1.2
symfony-cmf/routing-bundle ^1.4.0-RC1
symfony/assetic-bundle ^2.6
symfony/event-dispatcher ^2.7
symfony/expression-language ^2.7
symfony/form ^2.7
symfony/framework-bundle ^2.7
symfony/intl ^2.7
symfony/monolog-bundle ^2.7
symfony/options-resolver ^2.7
symfony/polyfill-iconv ~1.0
symfony/polyfill-intl-icu ~1.0
symfony/polyfill-mbstring ~1.0
symfony/property-access ^2.7
symfony/proxy-manager-bridge ^2.7
symfony/swiftmailer-bundle ^2.3
symfony/symfony ^2.7.7
symfony/twig-bundle ^2.7
twig/extensions ~1.0
twig/twig ~1.11
white-october/pagerfanta-bundle ~1.0
willdurand/hateoas-bundle ^0.4|^1.0
winzou/state-machine-bundle ~0.2
zendframework/zend-hydrator ^1.0|^2.0
zendframework/zend-stdlib ^2.0|^3.0
requires (dev)
akeneo/phpspec-skip-example-extension ~1.2
behat/behat ~3.0
behat/mink ~1.6
behat/mink-browserkit-driver ~1.2
behat/mink-extension ~2.0
behat/mink-selenium2-driver ~1.2
behat/symfony2-extension ~2.0
bossa/phpspec2-expect ^1.0
coduo/php-matcher ^2.1#dev
fabpot/php-cs-fixer ^1.11
lakion/api-test-case ^1.0#dev
lakion/mink-debug-extension ^1.0.3
malukenho/kawaii-gherkin ^0.1.2
matthiasnoback/symfony-config-test ^1.4
matthiasnoback/symfony-dependency-injection-test ^0.7.6
phpspec/phpspec ^2.4
phpunit/phpunit ~4.1
se/selenium-server-standalone ^2.52
suggests
ext-iconv For better performance than using Symfony Polyfill Component
ext-intl For better performance than using Symfony Polyfill Component
ext-mbstring For better performance than using Symfony Polyfill Component
replaces
sylius/addressing self.version
sylius/addressing-bundle self.version
sylius/admin-bundle self.version
sylius/api-bundle self.version
sylius/archetype self.version
sylius/archetype-bundle self.version
sylius/attribute self.version
sylius/attribute-bundle self.version
sylius/cart self.version
sylius/cart-bundle self.version
sylius/contact self.version
sylius/contact-bundle self.version
sylius/content-bundle self.version
sylius/core self.version
sylius/core-bundle self.version
sylius/currency self.version
sylius/currency-bundle self.version
sylius/fixtures-bundle self.version
sylius/flow-bundle self.version
sylius/installer-bundle self.version
sylius/inventory self.version
sylius/inventory-bundle self.version
sylius/locale self.version
sylius/locale-bundle self.version
sylius/money-bundle self.version
sylius/order self.version
sylius/order-bundle self.version
sylius/payment self.version
sylius/payment-bundle self.version
sylius/payum-bundle self.version
sylius/pricing self.version
sylius/pricing-bundle self.version
sylius/product self.version
sylius/product-bundle self.version
sylius/promotion self.version
sylius/promotion-bundle self.version
sylius/rbac self.version
sylius/rbac-bundle self.version
sylius/registry self.version
sylius/report self.version
sylius/report-bundle self.version
sylius/resource self.version
sylius/resource-bundle self.version
sylius/search-bundle self.version
sylius/sequence self.version
sylius/sequence-bundle self.version
sylius/settings-bundle self.version
sylius/shipping self.version
sylius/shipping-bundle self.version
sylius/storage self.version
sylius/taxation self.version
sylius/taxation-bundle self.version
sylius/taxonomy self.version
sylius/taxonomy-bundle self.version
sylius/theme-bundle self.version
sylius/translation self.version
sylius/translation-bundle self.version
sylius/ui-bundle self.version
sylius/user self.version
sylius/user-bundle self.version
sylius/variation self.version
sylius/variation-bundle self.version
sylius/web-bundle self.version
On second thought, after reviewing the last commit to symfony-cmf/core-bundle
https://github.com/symfony-cmf/core-bundle/commit/d47ac0f193139a90ecece20c46f42e588213824e
a better fix is to just add the following to your main config.yml :
cmf_core:
persistence:
phpcr:
enabled: true
This will allow the setter function to inject the ManagerRegistry service in Symfony\Cmf\Bundle\CoreBundle\DependencyInjection\CmfCoreExtension
I believe the cause of this Exception is that the Doctrine\Bundle\PHPCRBundle\ManagerRegistry service is not being injected into the Symfony\Cmf\Bundle\CoreBundle\Templating\Helper\CmfHelper constructor.
Try adding <argument type="service" id="doctrine_phpcr" on-invalid="ignore"/> to the the symfony-cmf dependency injection service configuration file
symfony-cmf/core-bundle/Resources/config/services.xml
as follows:
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="cmf_core.persistence.phpcr.manager_name">null</parameter>
<parameter key="cmf_core.twig_extension.class">Symfony\Cmf\Bundle\CoreBundle\Twig\Extension\CmfExtension</parameter>
<parameter key="cmf_core.templating.helper.class">Symfony\Cmf\Bundle\CoreBundle\Templating\Helper\CmfHelper</parameter>
</parameters>
<services>
<service id="cmf_core.twig.children_extension" class="%cmf_core.twig_extension.class%" public="false">
<argument type="service" id="cmf_core.templating.helper"/>
<tag name="twig.extension"/>
</service>
<service id="cmf_core.templating.helper" class="%cmf_core.templating.helper.class%" public="false">
<argument type="service" id="cmf_core.publish_workflow.checker" on-invalid="ignore"/>
<argument type="service" id="doctrine_phpcr" on-invalid="ignore"/>
<tag name="templating.helper" alias="cmf"/>
</service>
</services>
</container>
Related
This ASP.NET Core 2.1 Project runs fine on my Mac OS. However it throws this exception when I run it from Windows PC. I tried to run this from two Windows machines using the same version of .NET Core SDK.
I tried reinstalling .NET Core SDK 2.1.302, also tried upgrading to 2.1.401. Appreciate any help.
The error is
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Used Nuget Packages in .csproj file
<PackageReference Include="HangFire" Version="1.6.19" />
<PackageReference Include="Hangfire.LiteDB" Version="0.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.1.1" />
<PackageReference Include="LiteDB" Version="4.1.4" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
Full stack trace
> dotnet run
Using launch settings from C:\Source\repos\src\Properties\launchSettings.json...
Application startup exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance[T]()
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.CreateServiceContext(IOptions`1 options, ILoggerFactory loggerFactory)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer..ctor(IOptions`1 options, ITransportFactory transportFactory, ILoggerFactory loggerFactory)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureServer()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance[T]()
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.CreateServiceContext(IOptions`1 options, ILoggerFactory loggerFactory)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer..ctor(IOptions`1 options, ITransportFactory transportFactory, ILoggerFactory loggerFactory)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureServer()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance[T]()
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.CreateServiceContext(IOptions`1 options, ILoggerFactory loggerFactory)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer..ctor(IOptions`1 options, ITransportFactory transportFactory, ILoggerFactory loggerFactory)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureServer()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
at JustALink.Program.Main(String[] args) in C:\Source\repos\src\Program.cs:line 10
This problem is a known issue in .NET Core 2.1.x that was fixed in .NET Core 2.1.5 and newer. See https://github.com/dotnet/core-setup/issues/4512.
If you are getting failures due to "System.IO.FileLoadException" after updating the .NET Core SDK, you are probably running into https://github.com/dotnet/core-setup/issues/4376.
The best fix is to upgrade to .NET Core 2.1.5 or newer.
If you can't upgrade, another workaround is to update the project to
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.3" />
The cause of this issue, as described in https://github.com/dotnet/core-setup/issues/4376, is unintentionally upgrading out of the shared framework. For example:
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.1" />
Microsoft.AspNetCore.All 2.1.0 depends on Microsoft.AspNetCore.SignalR 1.0.0, but your project has upgrade to Microsoft.AspNetCore.SignalR 1.0.1. When you dotnet publish, you get Microsoft.AspNetCore.SignalR 1.0.1 AND ⚠️ its transitive dependencies in your publish folder. This is the publish trimming pitfall described in https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/.
This results in the following
+=================+===============================+================================+============================+
| AspNetCore.All | M.A.Connections.Abstractions | M.A.Connections.Abstractions | Which M.A.C.Abstractions |
| | (in shared framework) | (in publish dir) | should load |
+=================+===============================+================================+============================+
| 2.1.0 | 2.1.0 | 2.1.1 | publish dir |
+-----------------+-------------------------------+--------------------------------+----------------------------+
| 2.1.3 | 2.1.3 | 2.1.1 | shared framework* |
+-----------------+-------------------------------+--------------------------------+----------------------------+
* This is bug, and https://github.com/dotnet/core-setup/issues/4512 tracks getting a fix in a future 2.1.x update.
If you don't have Microsoft.AspNetCore.All, you can use Microsoft.AspNetCore.App and set its version to 2.1.3. They are quite the same:
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3"/>
I solved the problem by upgrading Microsoft.AspNetCore.All from 2.1.0 -> 2.1.3 (upgraded SDK to 2.1.401)
Still don't have a clue why this was working on Mac but not on Windows.
My Web API Core project file didn't contain Microsoft.AspNetCore.All. I manually added it to the item group and it fixed it for me.
You can add manually Connection.Abstractions dll
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="2.1.3" />
I've created a simple WCF service in an existing web site. I've tested it and all seems well. I've now made the site require https but now when I visit the svc via a browser (or any client) I get --
Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [http].
Stack trace is as follows:
[InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [http].]
System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) +12907656
System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost) +12905313
System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection) +69
System.ServiceModel.ServiceHostBase.ApplyConfiguration() +178
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHost.ApplyConfiguration() +46
System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +184
System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses) +46
System.ServiceModel.ServiceHost.InitializeDescription(Object singletonInstance, UriSchemeKeyedCollection baseAddresses) +43
System.ServiceModel.ServiceHost..ctor(Object singletonInstance, Uri[] baseAddresses) +247
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHost..ctor(WSTrustServiceContract serviceContract, Uri[] baseAddresses) +72
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHost..ctor(SecurityTokenServiceConfiguration securityTokenServiceConfiguration, Uri[] baseAddresses) +70
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +280
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1434
System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +52
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598
You need to change the configuration for the service so that the HTTPS enabled bindings are used. You may want to check out this blog post: http://weblogs.asp.net/srkirkland/archive/2008/02/20/wcf-bindings-needed-for-https.aspx
The suggested solution there is to define a custom binding within web.config/app.config and set its security mode to Transport:
<bindings>
<webHttpBinding>
<binding name="webBinding">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
Then use this binding in the binding configuration for the endpoint:
<endpoint address="" behaviorConfiguration="..." binding="webHttpBinding" bindingConfiguration="webBinding" contract="..." />
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.296
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.296 (RTMGDR.030319-2900)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : http://apps4you.comyr.com/appTest8 /snake.application
Server : Apache
IDENTITIES
Deployment Identity : snake.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=5bd57d3abffa2377, processorArchitecture=x86
APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://apps4you.comyr.com/appTest8/snake.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://apps4you.comyr.com/appTest8 /Application%20Files/snake_1_0_0_6/snake.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Unexpected end of file has occurred. The following elements are not closed: br, br. Line 3, position 254.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [15/04/2013 5:23:29 p.m.] : Activation of http://apps4you.comyr.com/appTest8/snake.application has started.
* [15/04/2013 5:23:31 p.m.] : Processing of deployment manifest has successfully completed.
* [15/04/2013 5:23:31 p.m.] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [15/04/2013 5:23:31 p.m.] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from http://apps4you.comyr.com/appTest8/Application%20Files/snake_1_0_0_6/snake.exe.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Xml.XmlException
- Unexpected end of file has occurred. The following elements are not closed: br, br. Line 3, position 254.
- Source: System.Xml
- Stack trace:
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlCharCheckingReader.Read()
at System.Xml.XsdValidatingReader.Read()
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Your deployment URL is wrong.
According to:
Activation of C:\Users\user\Downloads\snake.application resulted in
exception. Following failure messages were detected:
+ Deployment and application do not have matching security zones.
the URL
file:///C:/Users/user/Downloads/snake.application
should be
http://apps4you.comyr.com/appTest7/
so the browser knows via the manifest that the application is deployed on the same location as the publisher intended and is not tampered. It is a security issue.
In the publish tab:
In the Installation URL field, enter the installation
location using a fully qualified URL using the format http://www.microsoft.com/ApplicationName, or a
UNC path using the format \\Server\ApplicationName.
Check Bring back the basic setup and deployment project type Visual Studio Installer.
<html>
<head>
<title>IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>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.
<br><br>
<b> Exception Details: </b>System.InvalidOperationException: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
</td>
</tr>
</table>
<br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[InvalidOperationException: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.]
System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint, AuthenticationSchemes supportedSchemes) +346523
System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage, String standardEndpointKind) +804
System.ServiceModel.Web.WebServiceHost.OnOpening() +244
System.ServiceModel.DomainServices.Hosting.WebServiceHostInspector.OnOpening() +13
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +274
System.ServiceModel.Channels.CommunicationObject.Open() +36
System.ServiceModel.DomainServices.Hosting.WebServiceHostInspector.Inspect() +39
System.ServiceModel.DomainServices.Hosting.ServiceUtility.VerifyAuthenticationMode() +128
System.ServiceModel.DomainServices.Hosting.PoxBinaryEndpointFactory.CreateEndpointForAddress(ContractDescription contract, Uri address) +191
System.ServiceModel.DomainServices.Hosting.PoxBinaryEndpointFactory.CreateEndpoints(DomainServiceDescription description, DomainServiceHost serviceHost) +145
System.ServiceModel.DomainServices.Hosting.DomainServiceHost.CreateDescription(IDictionary`2& implementedContracts) +630
System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +154
System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses) +49
System.ServiceModel.DomainServices.Hosting.DomainServiceHost..ctor(Type domainServiceType, Uri[] baseAddresses) +309
System.ServiceModel.DomainServices.Hosting.DomainServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +28
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +420
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1440
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615
[ServiceActivationException: The service '/Services/hosttest2-DomainService1.svc' cannot be activated due to an exception during compilation. The exception message is: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used..]
System.Runtime.AsyncResult.End(IAsyncResult result) +679246
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
System.ServiceModel.Activation.ServiceHttpHandler.EndProcessRequest(IAsyncResult result) +6
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +96
</pre></code>
</td>
</tr>
</table>
<br>
<hr width=100% size=1 color=silver>
<b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
</font>
</body>
</html>
<!--
[InvalidOperationException]: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.
at System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint, AuthenticationSchemes supportedSchemes)
at System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage, String standardEndpointKind)
at System.ServiceModel.Web.WebServiceHost.OnOpening()
at System.ServiceModel.DomainServices.Hosting.ServiceUtility.WebServiceHostInspector.OnOpening()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at System.ServiceModel.DomainServices.Hosting.ServiceUtility.WebServiceHostInspector.Inspect()
at System.ServiceModel.DomainServices.Hosting.ServiceUtility.VerifyAuthenticationMode()
at System.ServiceModel.DomainServices.Hosting.PoxBinaryEndpointFactory.CreateEndpointForAddress(ContractDescription contract, Uri address)
at System.ServiceModel.DomainServices.Hosting.PoxBinaryEndpointFactory.CreateEndpoints(DomainServiceDescription description, DomainServiceHost serviceHost)
at System.ServiceModel.DomainServices.Hosting.DomainServiceHost.CreateDescription(IDictionary`2& implementedContracts)
at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.DomainServices.Hosting.DomainServiceHost..ctor(Type domainServiceType, Uri[] baseAddresses)
at System.ServiceModel.DomainServices.Hosting.DomainServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
[ServiceActivationException]: The service '/Services/hosttest2-DomainService1.svc' cannot be activated due to an exception during compilation. The exception message is: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used..
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
at System.ServiceModel.Activation.ServiceHttpHandlerFactory.ServiceHttpHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
--><!--
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Your host has IIS setup for basic and Anonymous access. But your authentication scheme only allows for one. either you have to adjust your authentication scheme or you have to have your host change their scheme.
I dont know if you can have multiple authentication schemes for a domain service.
Hi I am attempting to use Castle windsor Nhibernate Facility with fluent Nhibernate and Im getting the error above, as far as Im aware , I have followed the instructions on setting this up. Has anyone else seen this issue and maybe offer some advice? Thanks
Value cannot be null.
Parameter name: classType
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.ArgumentNullException: Value cannot be null.
Parameter name: classType
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: classType]
Castle.MicroKernel.DefaultKernel.AddComponent(String key, Type serviceType, Type classType, LifestyleType lifestyle, Boolean overwriteLifestyle) +191
Castle.MicroKernel.DefaultKernel.AddComponent(String key, Type serviceType, Type classType, LifestyleType lifestyle) +48
Castle.MicroKernel.DefaultKernel.AddComponent(String key, Type serviceType, Type classType) +45
Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterDefaultConfigurationBuilder() +154
Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterComponents() +29
Castle.Facilities.NHibernateIntegration.NHibernateFacility.Init() +196
Castle.MicroKernel.Facilities.AbstractFacility.Init(IKernel kernel, IConfiguration facilityConfig) +61
Castle.MicroKernel.DefaultKernel.AddFacility(String key, IFacility facility) +182
Castle.Windsor.WindsorContainer.AddFacility(String key, IFacility facility) +49
Castle.Windsor.Installer.DefaultComponentInstaller.SetUpFacilities(IConfiguration[] configurations, IWindsorContainer container) +242
Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store) +89
Castle.Windsor.WindsorContainer.RunInstaller() +76
Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter interpreter) +144
KingMaker.Web.Windsor.ContainerBuilder.Build(String config) +90
KingMaker.Web.MvcApplication.InitializeWindsor() +74
KingMaker.Web.MvcApplication.Application_Start() +55
Here is the facility xml facility
<facility
id="nhibernatefacility"
type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"
isWeb="true"
configurationBuilder="App.Web.Maps.FluentNHibernateConfigurationBuilder, App.Web">
<!-- configuration here is overriden by the FluentNHibernateConfigurationBuilder -->
<factory id="sessionFactory1">
<settings>
<item key="connection.provider">NHibernate.Connection.DriverConnectionProvider</item>
<item key="connection.driver_class">NHibernate.Driver.SqlClientDriver</item>
<item key="connection.connection_string">Data Source=localhost\sqlexpress;Initial Catalog=FIDPortal;Integrated Security=SSPI</item>
<item key="dialect">NHibernate.Dialect.MsSql2005Dialect</item>
<item key="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</item>
</settings>
<!-- <assemblies>-->
<!-- <assembly>Castle.Facilities.NHibernateIntegration.Tests</assembly>-->
<!-- </assemblies>-->
</factory>
</facility>
The stack trace says the type defined in the configurationBuilder attribute (FluentNHibernateConfigurationBuilder) is invalid or not found. Double-check the namespace and assembly name.