OpenRIAServices / OpenRiaServices

The Open RIA Services project continues what was previously known as WCF RIA Services.
https://openriaservices.gitbook.io/openriaservices/
Apache License 2.0
54 stars 47 forks source link

After windows update (KB5031323) we get service activation exception #447

Closed Daniel-Svensson closed 5 months ago

Daniel-Svensson commented 9 months ago

Discussed in https://github.com/OpenRIAServices/OpenRiaServices/discussions/444

Originally posted by **neplan** October 12, 2023 After the following windows update: 2023-10 Kumulatives Update für .NET Framework 3.5 und 4.8.1 für Windows 11, version 22H2 für x64 (KB5031323) System.IO.DirectoryNotFoundException: 'Could not find a part of the path 'Path to analysisdomainservice.svc.compiled'.': > mscorlib.dll!System.IO.FileStream.FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) Line 352 C# System.Web.dll!System.Web.Compilation.PreservationFileWriter.SaveBuildResultToFile(string preservationFile, System.Web.Compilation.BuildResult result, long hashCode) Unknown System.Web.dll!System.Web.Compilation.DiskBuildResultCache.CacheBuildResult(string cacheKey, System.Web.Compilation.BuildResult result, long hashCode, System.DateTime utcStart) Unknown System.Web.dll!System.Web.Compilation.BuildManager.CacheBuildResultInternal(string cacheKey, System.Web.Compilation.BuildResult result, long hashCode, System.DateTime utcStart) Unknown System.Web.dll!System.Web.Compilation.BuildManager.CompileWebFile(System.Web.VirtualPath virtualPath) Unknown System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) Unknown System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(System.Web.HttpContext context, System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) Unknown System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResult(System.Web.HttpContext context, System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool ensureIsUpToDate) Unknown System.Web.dll!System.Web.Compilation.BuildManager.GetCompiledCustomString(string virtualPath) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.ServiceHostingEnvironment.HostingManager.GetCompiledCustomString(string normalizedVirtualPath) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(string normalizedVirtualPath, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(System.ServiceModel.ServiceHostingEnvironment.HostingManager.ServiceActivationInfo serviceActivationInfo, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(string normalizedVirtualPath, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(string relativeVirtualPath, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() Unknown System.ServiceModel.Activation.dll!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() Unknown System.ServiceModel.Activation.dll!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(object state) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(System.Threading.ContextCallback callback, object state) Unknown System.ServiceModel.Activation.dll!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(object state) Unknown System.ServiceModel.Internals.dll!System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Unknown System.ServiceModel.Internals.dll!System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(uint error, uint bytesRead, System.Threading.NativeOverlapped* nativeOverlapped) Unknown mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) Line 63 C# Because of this exception the service is not activated and we get an exception. If we call a second time the service, then the activation is done correctly and we can use the service. We are still using the OpenRiaServices 4.6.0. Any idea what we could do? Best regards, Alessandro
SandstromErik commented 9 months ago

A workaround has been found which makes all tests work locally. https://developercommunity.visualstudio.com/t/October-10-2023-KB5031224-Cumulative-Up/10494223#T-N10496882

The workaround I have just found is to create a folder at the error path. After this the folder fills with .compiled files and the error disappears.

SandstromErik commented 8 months ago

Another solution has been found https://developercommunity.visualstudio.com/t/October-10-2023-KB5031224-Cumulative-Up/10494223#T-N10497099

While we are investigating this issue, could you please try the following workaround, add an appserttings in the web.config file for your application: <add key=“aspnet:FileNameUtilUseLegacyInvalidChars” value=“true”/>

Daniel-Svensson commented 5 months ago

The .NET Framework team will fix it. Cosing since external