MIPs 23.2.1 runtime error while domain login

Using the MIPs 23.2.1 (not with older MIPs) I’ll get while trying fullfil a domain login this error:

System.IO.FileLoadException: Die Datei oder Assembly “System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)

Dateiname: “System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”

Server stack trace:

bei VideoOS.IdentityServer.Common.Handlers.TokenCache.d__21.MoveNext()

-– Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —

bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)

bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

bei VideoOS.IdentityServer.Common.Handlers.TokenCache.d__21.MoveNext()

-– Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —

bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)

bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [1]:

bei VideoOS.IdentityServer.Common.Handlers.TokenCache.d__21.MoveNext()

-– Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —

bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()

bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)

bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)

bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [2]:

bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

bei VideoOS.Common.Proxy.Server.WCF.IServerCommandService.Logout(Guid instanceId, String currentToken)

bei VideoOS.Platform.SDK.Config.Shared.LoginServerSvc.LogoutService(Guid instanceGuid, String token)

=== Zustandsinformationen vor Bindung ===

LOG: DisplayName = System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

(Fully-specified)

LOG: Appbase = file:///C:/PsmDriver/MilestoneDriver/

LOG: Ursprünglicher PrivatePath = NULL

Aufruf von Assembly : VideoOS.IdentityServer.Common, Version=23.2.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89.

===

LOG: Diese Bindung startet im default-Load-Kontext.

LOG: Es wurde keine Anwendungskonfigurationsdatei gefunden.

LOG: Die Hostkonfigurationsdatei wird verwendet:

LOG: Die Computerkonfigurationsdatei von [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config](file:C:/Windows/Microsoft.NET/Framework64/v4.0.30319/config/machine.config) wird verwendet.

LOG: Verweis nach der Richtlinie: System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

LOG: Download von neuem URL file:///C:/PsmDriver/MilestoneDriver/System.Net.Http.Formatting.DLL.

WRN: Der Vergleich des Assemblynamens führte zum Konflikt: Buildnummer.

ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.

I see, that 23.2.1 uses Microsoft.AspNet.WebApi.Client and Microsoft.AspNet.WebApi.Core in the versions 5.2.7, which I’d updated to 5.2.9. Otherwise I’ll get while compiling:

Neuerstellen gestartet…

------ Neues Erstellen gestartet: Projekt: MilestoneDriver_CS, Konfiguration: Release Any CPU ------

warning MSB3277: Es wurden Konflikte zwischen verschiedenen Versionen von “System.Net.Http.Formatting” gefunden, die nicht aufgelöst werden konnten.

warning MSB3277: Konflikt zwischen System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 und System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

warning MSB3277: System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 wurde aufgrund der primären Eigenschaft System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 vorgezogen.

warning MSB3277: Verweise, die von “System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” abhängig sind [[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll].](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Client.5.2.7/lib/net45/System.Net.Http.Formatting.dll].)

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Client.5.2.7/lib/net45/System.Net.Http.Formatting.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Client.5.2.7/lib/net45/System.Net.Http.Formatting.dll)” verursacht haben.

warning MSB3277: System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

warning MSB3277: Verweise, die von “System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” abhängig sind [].

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Core.5.2.7/lib/net45/System.Web.Http.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Core.5.2.7/lib/net45/System.Web.Http.dll)” verursacht haben.

warning MSB3277: System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Owin.5.2.7/lib/net45/System.Web.Http.Owin.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Owin.5.2.7/lib/net45/System.Web.Http.Owin.dll)” verursacht haben.

warning MSB3277: System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\MilestoneSystems.VideoOS.Platform.SDK.23.2.1\dependencies\VideoOS.IdentityServer.Common.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/MilestoneSystems.VideoOS.Platform.SDK.23.2.1/dependencies/VideoOS.IdentityServer.Common.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\MilestoneSystems.VideoOS.Platform.SDK.23.2.1\dependencies\VideoOS.IdentityServer.Common.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/MilestoneSystems.VideoOS.Platform.SDK.23.2.1/dependencies/VideoOS.IdentityServer.Common.dll)” verursacht haben.

warning MSB3277: VideoOS.Platform.SDK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=MSIL

warning MSB3277: VideoOS.Platform.SDK.Export, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.Log, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.RemoteRetrievalTasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=MSIL

warning MSB3277: VideoOS.Platform.SDK.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\MilestoneSystems.VideoOS.Platform.SDK.23.2.1\dependencies\VideoOS.Common.EnvironmentServices.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/MilestoneSystems.VideoOS.Platform.SDK.23.2.1/dependencies/VideoOS.Common.EnvironmentServices.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\MilestoneSystems.VideoOS.Platform.SDK.23.2.1\dependencies\VideoOS.Common.EnvironmentServices.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/MilestoneSystems.VideoOS.Platform.SDK.23.2.1/dependencies/VideoOS.Common.EnvironmentServices.dll)” verursacht haben.

warning MSB3277: VideoOS.Platform.SDK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=MSIL

warning MSB3277: VideoOS.Platform.SDK.Export, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.Log, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: VideoOS.Platform.SDK.RemoteRetrievalTasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=MSIL

warning MSB3277: VideoOS.Platform.SDK.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89, processorArchitecture=AMD64

warning MSB3277: Es wurden Konflikte zwischen verschiedenen Versionen von “System.Web.Http” gefunden, die nicht aufgelöst werden konnten.

warning MSB3277: Konflikt zwischen System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 und System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

warning MSB3277: System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 wurde aufgrund der primären Eigenschaft System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 vorgezogen.

warning MSB3277: Verweise, die von “System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” abhängig sind [[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll].](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Core.5.2.7/lib/net45/System.Web.Http.dll].)

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Core.5.2.7/lib/net45/System.Web.Http.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Core.5.2.7/lib/net45/System.Web.Http.dll)” verursacht haben.

warning MSB3277: System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

warning MSB3277: Verweise, die von “System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” abhängig sind [].

warning MSB3277: [D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Owin.5.2.7/lib/net45/System.Web.Http.Owin.dll)

warning MSB3277: Elementincludes einer Projektdatei, die den Verweis “[D:\GitProjects\driver\MilestoneDriver_New_Mips\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll](file:D:/GitProjects/driver/MilestoneDriver_New_Mips/packages/Microsoft.AspNet.WebApi.Owin.5.2.7/lib/net45/System.Web.Http.Owin.dll)” verursacht haben.

warning MSB3277: System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

It sounds familiar. What version of .Net Framework are you using?

If you use 4.7 could you please try with 4.7.2?

I’ve to use 4.8.

When building in Visual Studio using the Milestone NuGets do you have “Auto generate binding redirects” enabled?

If you download a new sample from Milestone and build it using the same new NuGet, do you see the same issue?

https://github.com/milestonesys

Yes, I’ve “Auto generate binding redirects” enabled (tested also without and manually resolving).

Tried now for example the LogOnServer sample and it’s running after building against .Net 4.7.

Here I get the warning:

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand

Warnung Es wurden Konflikte zwischen verschiedenen Versionen von “System.Net.Http” gefunden, die nicht aufgelöst werden konnten.

Konflikt zwischen System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a und System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a wurde aufgrund der primären Eigenschaft System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a vorgezogen.

Verweise, die von “System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” abhängig sind [[C:\Program](file:C:/Program) Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\System.Net.Http.dll].

   [C:\\Program](file:C:/Program) Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7\\System.Net.Http.dll

     Elementincludes einer Projektdatei, die den Verweis "[C:\\Program](file:C:/Program) Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7\\System.Net.Http.dll" verursacht haben.

       System.Net.Http

Verweise, die von “System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” abhängig sind [].

   [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.client\\5.2.7\\lib\\net45\\System.Net.Http.Formatting.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.client/5.2.7/lib/net45/System.Net.Http.Formatting.dll)

     Elementincludes einer Projektdatei, die den Verweis "[C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.client\\5.2.7\\lib\\net45\\System.Net.Http.Formatting.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.client/5.2.7/lib/net45/System.Net.Http.Formatting.dll)" verursacht haben.

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.client\\5.2.7\\lib\\net45\\System.Net.Http.Formatting.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.client/5.2.7/lib/net45/System.Net.Http.Formatting.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.core\\5.2.7\\lib\\net45\\System.Web.Http.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.core/5.2.7/lib/net45/System.Web.Http.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.owin\\5.2.7\\lib\\net45\\System.Web.Http.Owin.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.owin/5.2.7/lib/net45/System.Web.Http.Owin.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.RemoteRetrievalTasks.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.RemoteRetrievalTasks.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.UI.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.UI.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.Export.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.Export.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.Log.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.Log.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\milestonesystems.videoos.platform.sdk\\23.2.1\\lib\\net47\\VideoOS.Platform.SDK.Media.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/milestonesystems.videoos.platform.sdk/23.2.1/lib/net47/VideoOS.Platform.SDK.Media.dll)

   [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.core\\5.2.7\\lib\\net45\\System.Web.Http.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.core/5.2.7/lib/net45/System.Web.Http.dll)

     Elementincludes einer Projektdatei, die den Verweis "[C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.core\\5.2.7\\lib\\net45\\System.Web.Http.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.core/5.2.7/lib/net45/System.Web.Http.dll)" verursacht haben.

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.core\\5.2.7\\lib\\net45\\System.Web.Http.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.core/5.2.7/lib/net45/System.Web.Http.dll)

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.owin\\5.2.7\\lib\\net45\\System.Web.Http.Owin.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.owin/5.2.7/lib/net45/System.Web.Http.Owin.dll)

   [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.owin\\5.2.7\\lib\\net45\\System.Web.Http.Owin.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.owin/5.2.7/lib/net45/System.Web.Http.Owin.dll)

     Elementincludes einer Projektdatei, die den Verweis "[C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.owin\\5.2.7\\lib\\net45\\System.Web.Http.Owin.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.owin/5.2.7/lib/net45/System.Web.Http.Owin.dll)" verursacht haben.

       [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.aspnet.webapi.owin\\5.2.7\\lib\\net45\\System.Web.Http.Owin.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.aspnet.webapi.owin/5.2.7/lib/net45/System.Web.Http.Owin.dll)

   [C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.identitymodel.logging\\6.21.0\\lib\\net461\\Microsoft.IdentityModel.Logging.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.identitymodel.logging/6.21.0/lib/net461/Microsoft.IdentityModel.Logging.dll)

     Elementincludes einer Projektdatei, die den Verweis "[C:\\Users\\burkhardt.petermann\\.nuget\\packages\\microsoft.identitymodel.logging\\6.21.0\\lib\\net461\\Microsoft.IdentityModel.Logging.dll](file:C:/Users/burkhardt.petermann/.nuget/packages/microsoft.identitymodel.logging/6.21.0/lib/net461/Microsoft.IdentityModel.Logging.dll)" verursacht haben.

While creating against 4.8 I’ll get no warning and it’s running without erros.

We can’t really make a fit of this information. For us to get a deeper understanding could you upload the project file so that we can see the exact references you use?

Hello Bo,

here our current login attached.

We do not suspect anything wrong in code but need to understand references. We want to see a list of references, including NuGet packages references, the project is using - it all is most likely in the file with extension .csproj.

We think this file will enable us to understand. Please find the other file, the project file and let us see it.

Ok, here (I’m using Visual Stdio 2022) the config files

Sorry, it seem’s that the upload not working as expected.

and..

And now the whole poject

Originally you said: “I see, that 23.2.1 uses Microsoft.AspNet.WebApi.Client and Microsoft.AspNet.WebApi.Core in the versions 5.2.7, which I’d updated to 5.2.9”

What if you do not update and then ignore the warning, does it run or do you see the exception at runtime?

Also then I get the runtime exception:

18.07.2023 13:25:27 ERROR [18] PsmDriverSDKLog: Milestone connection failed
System.IO.FileLoadException: Die Datei oder Assembly "System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
Dateiname: "System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
 
Server stack trace: 
   bei VideoOS.IdentityServer.Common.Handlers.TokenCache.<RefreshToken>d__21.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)
   bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
Exception rethrown at [0]: 
   bei VideoOS.IdentityServer.Common.Handlers.TokenCache.<RefreshToken>d__21.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)
   bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
Exception rethrown at [1]: 
   bei VideoOS.IdentityServer.Common.Handlers.TokenCache.<RefreshToken>d__21.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.FormatToken()
   bei VideoOS.IdentityServer.Common.ServiceModel.BearerAuthorizationHeaderInspector.BeforeSendRequest(Message& request, IClientChannel channel)
   bei System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
   bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
 
Exception rethrown at [2]: 
   bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   bei VideoOS.Common.Proxy.Server.WCF.IServerCommandService.Logout(Guid instanceId, String currentToken)
   bei VideoOS.Platform.SDK.Config.Shared.LoginServerSvc.LogoutService(Guid instanceGuid, String token)
 
=== Zustandsinformationen vor Bindung ===
LOG: DisplayName = System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/PsmDriver/MilestoneDriver/
LOG: Ursprünglicher PrivatePath = NULL
Aufruf von Assembly : VideoOS.IdentityServer.Common, Version=23.2.0.0, Culture=neutral, PublicKeyToken=bc60fba4a7969f89.
===
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Es wurde keine Anwendungskonfigurationsdatei gefunden.
LOG: Die Hostkonfigurationsdatei wird verwendet: 
LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config wird verwendet.
LOG: Verweis nach der Richtlinie: System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Download von neuem URL file:///C:/PsmDriver/MilestoneDriver/System.Net.Http.Formatting.DLL.
WRN: Der Vergleich des Assemblynamens führte zum Konflikt: Buildnummer.
ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.

Hi Burkhardt,

I looked into your project file MilestoneDriver_CS.csproj and I can see that you don’t have a reference to System.Web.Http.Formatting.dll there. As a result, the dll is not copied to the output folder and hence the error during runtime.

In general, we recommend to reference NuGet packages in the project file instead of using packages.config to avoid issues like this.

Hello Paulina,

doesn’t solve the issue.

Take a look into the project file in using references into it and you’ll see, that only MilestoneSystems.VideoOS.Platform and MilestoneSystems.VideoOS.Platform.SDK are included (not the depencies) and so the runtime error occures again.

Is System.Web.Http.Formatting.dll present in the output folder when you build the project? If so, which version of the dll it has?

Sure and it’s in the version

I made an application tageting .NET Framework 4.8 which is referencing MilestoneSystems.VideoOS.Platform.SDK NuGet package in the newest version and I had no error when running it.

As the next step, I would suggest that you take a look at the dlls being loaded in your application using Process Explorer. Here you can check not only if System.Net.Http.Formatting.dll is loaded from the correct location but also if its dependencies are being loaded correctly. System.Net.Http.Formatting.dll depends only on mscoree.dll.

If the above won’t help, we might have a hard time investigating the issue further without not being able to reproduce it. Therefore we have created a support case for you (MSC1749031), where we kindly ask you to upload your whole solution so that we can compile, run and hopefully reproduce the issue.