Closed as duplicate of#109846
Description
I have Mounted Network Drive called 'U:' in my Windows 10 (version 22H2).
My web project is into U:\Project\UI2\CloudApi
folder and use NLog 5.3.15
for loggin.
I used .NET 8.0 and everything was fine..
After update to .NET 9.0 and run project in my visual studio (2202), Throw exception The specified path is invalid.
because my folder in Network Drive!
Exception is in System.Private.CoreLib
and type is System.IO.IOException
like:
The specified path is invalid. : '\\?\UNC\WinSrv\User-Data\AAAAAAAAAAAAAAAA\Project\UI2\CloudApi\src\bin\Debug\net9.0\.\Logs\nlog-all-2024-12-16.log'.
and detail of exception is:
Data Count = 0 System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
HResult -2147024735 int
HasBeenThrown true bool
HelpLink null string
InnerException null System.Exception
Static members
Message "The specified path is invalid. : '\\\\?\\UNC\\WinSrv\\User-Data\\AAAAAAAAAAAAAAAA\\Project\\UI2\\CloudApi\\src\\bin\\Debug\\net9.0\\.\\Logs\\nlog-all-2024-12-16.log'." string
SerializationStackTraceString " at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)" string
SerializationWatsonBuckets null object
Source "System.Private.CoreLib" string
StackTrace " at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)" string
TargetSite {Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
_HResult -2147024735 int
_data Count = 0 System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
_exceptionMethod null System.Reflection.MethodBase
_helpURL null string
_innerException null System.Exception
_ipForWatsonBuckets 0x00007fff4f272872 System.UIntPtr
_message "The specified path is invalid. : '\\\\?\\UNC\\WinSrv\\User-Data\\AAAAAAAAAAAAAAAA\\Project\\UI2\\CloudApi\\src\\bin\\Debug\\net9.0\\.\\Logs\\nlog-all-2024-12-16.log'." string
_remoteStackTraceString null string
_source null string
_stackTrace {sbyte[48]} object {sbyte[]}
_stackTraceString null string
_watsonBuckets null byte[]
_xcode -532462766 int
_xptrs 0x0000000000000000 System.IntPtr
Static members