title: Could not load file or assembly
body: <p>This is my Errormessage:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'file:///C:\Windows\system32\Rule.dll'.
    The system cannot find the file specified.</p>
  </blockquote>
  
  <p>The problem is that the same exe works in my development environment but not on productive server. The program is a tool that should run as a Scheduled Task on Windows Server 2008. It consists of an exe, one so called Database.dll and the Rule.dll. The exe should load the Rule.dll dynamically in codebehind but it fails with the above error only when started from Task Scheduler. Why is it looking in System32 folder and not in the Application folder? Is it an UAC-issue?</p>
  
  <pre><code>'Load the rule engine into memory
  Dim asmRule As System.Reflection.Assembly = Nothing
  Try
    asmRule = System.Reflection.Assembly.LoadFrom("Rule.dll") 'fails on productive system
  Catch ex As System.Exception
    HistoryLog.writeLog("SysLog", ex, "Cannot find Rule.dll in Application Folder")
  End Try
  </code></pre>