May i am wrong, but as far as i know are mapped network drives only visible for the current which created it and not for the entry system. UNC Pathes are the most common way to access a network share.
Steve Paul Franklin schrieb: > > > I am trying to log to a Network Drive using a RollingFileAppender but am > having problems. When I set the file parameter value to a UNC value > (\\servername\sharename\Alert.txt) it works fine However, when I try to set > it to a mapped drive value which refers to the same path it fails. The > internal debug is showing this: log4net:ERROR [RollingFileAppender] No output > stream or file set for the appender named [TDALog].log4net: FileAppender: > Opening file for writing [T:\Alert.txt] append [True]log4net:ERROR > [RollingFileAppender] Unable to acquire lock on file T:\Alert.txt. Could not > find a part of the path 'T:\'.log4net:ERROR [RollingFileAppender] > OpenFile(T:\Alert.txt,True) call > failed.log4net.Appender.FileAppender+LockingStream+LockStateException: The > file is not currently locked at > log4net.Appender.FileAppender.LockingStream.get_CanWrite() at > System.IO.StreamWriter..ctor(Stream stream, Encoding encoding, Int32 > bufferSize) at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding) at log4net.Appender.FileAppender.OpenFile(String fileName, Boolean append) at log4net.Appender.RollingFileAppender.OpenFile(String fileName, Boolean append) at log4net.Appender.FileAppender.SafeOpenFile(String fileName, Boolean append)log4net:ERROR [RollingFileAppender] No output stream or file set for the appender named [TDALog]. When I use UNC for the same file it works okay: log4net: FileAppender: Opening file for writing [\\uncdrive\share\Alert.txt] append [True]log4net: XmlHierarchyConfigurator: Created Appender [TDALog]log4net: XmlHierarchyConfigurator: Adding appender named [TDALog] to logger [root].log4net: XmlHierarchyConfigurator: Retrieving an instance of log4net.Repository.Logger for logger [tda].log4net: XmlHierarchyConfigurator: Setting [trustda] additivity to [True].log4net: XmlHierarchyConfigurator: Logger [trustda] Level string is [DEBUG].log4net: XmlHierarchyConfigurator: Logger [trustda] level set to [name="DEBUG",value=30000].log4n et: XmlHierarchyConfigurator: Adding appender named [TDALog] to logger [tda]. Any ideas? We would only use UNC as a last resort because the application is going to be distributed to multiple sites which all use a common drive mapping letter > > Click here for FREE customisable desktop wallpapers. Get them Now! > _________________________________________________________________ > See the most popular videos on the web > http://clk.atdmt.com/GBL/go/115454061/direct/01/
