title: Error in C# application . System.ArgumentException: The path is not of a legal form?
body: <p>I am not getting why this error is coming i serach in net and not able to get answer .
  Technologies using : C#<br>
  Visual Studio for debugging the project</p>
  
  <p><strong>I have a code</strong>  </p>
  
  <pre><code> private void InitializeWatcher(string sourceDirectoryPath, string watcherFilter, bool isWatcherIncludeSubdirectories)
          {
              objWatcher = new FileSystemWatcher();
              objWatcher.IncludeSubdirectories =isWatcherIncludeSubdirectories;
              objWatcher.InternalBufferSize = 16384;
  
              if (Utilities.LogLevel &gt;= Utilities.Informational)
              {
                  Utilities.LogMessage("InitializeWatcher: " + sourceDirectoryPath, EventLogEntryType.Information);
              }
              System.Console.WriteLine( "sjdakdjasdhas ");
              System.Console.WriteLine( sourceDirectoryPath);
              objWatcher.Path = sourceDirectoryPath;
              objWatcher.Filter = watcherFilter;
              objWatcher.Created += new FileSystemEventHandler(objWatcher_FileSystemEvent);
              objWatcher.Changed += new FileSystemEventHandler(objWatcher_FileSystemEvent);
              objWatcher.Deleted += new FileSystemEventHandler(objWatcher_FileSystemEvent);
              objWatcher.Error += new ErrorEventHandler(objWatcher_Error);
              try
              {
                  objWatcher.EnableRaisingEvents = true;
              }
              catch (Exception camp)
              {
                  System.Console.WriteLine("camp --&gt;");
                  System.Console.WriteLine(camp);
              }
              FileSystemEventArgs objFileSystemEventArgs = new FileSystemEventArgs(WatcherChangeTypes.Changed, objWatcher.Path+"\\","\\");
              objWatcher_FileSystemEvent(objWatcher, objFileSystemEventArgs);
              watcherQueue.Add(objWatcher);
          }
  </code></pre>
  
  <p><strong>When have run the code and it gives error like this.</strong></p>
  
  <pre><code>sjdakdjasdhas 
  \\10.197.132.58\share1
  camp --&gt;
  System.ArgumentException: The path is not of a legal form.
     at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
     at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
     at System.IO.Path.GetFullPathInternal(String path)
     at System.IO.Path.GetFullPath(String path)
     at System.IO.FileSystemWatcher.StartRaisingEvents()
     at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
     at xyzprojectpath.FileSystemWatcherWrapper.InitializeWatcher(String sourceDirectoryPath, String watcherFilter, Boolean isWatcherIncludeSubdirectories) in xyzpath\FileSystemWatcherWrapper.cs:line 123
  </code></pre>
  
  <p>Any help? I don't know about .NET to much . If needed more code please let me know .</p>
  
  <p>Error is coming on this line</p>
  
  <p><strong>objWatcher.EnableRaisingEvents = true;</strong></p>