title: CreateObject("...") in VBScript fails to create a VB.Net class library com object (Windows Server 2000)
body: <p>I am writing a application using ASP and VBScript. There a library I can only find one written for .Net application. So I tried to create a class library wrapper and compiled it to a DLL using VB.Net (Microsoft Visual Basic 2010 Express). </p>
  
  <p><em>The DLL works in my own desktop</em> (Windows 7) but it fails in the server (Server 2000). </p>
  
  <p>Error message is "System cannot find the file specified"</p>
  
  <p><strong>Server config</strong></p>
  
  <p><strong>OS</strong>: Microsoft Windows 2000 Server (SP4)</p>
  
  <p><strong>.Net framework installed</strong>: v2.0.50727</p>
  
  <p>The code I wrote in my testing project is simply a class doing nothing.</p>
  
  <pre><code>Imports System.IO
  Imports System
  
  &lt;ComClass(Object1.ClassId, Object1.InterfaceId, Object1.EventsId)&gt; _
  Public Class Object1
  #Region "COM GUIDs"
      ' These  GUIDs provide the COM identity for this class 
      ' and its COM interfaces. If you change them, existing 
      ' clients will no longer be able to access the class.
      Public Const ClassId As String = "f5dcfb08-7a83-4501-bd89-03e38cad819c"
      Public Const InterfaceId As String = "8a313e0b-60e5-4ff4-8a7d-e7b1582eec71"
      Public Const EventsId As String = "fe55f7d8-691f-4c76-968a-37019fa9bb53"
  #End Region
  
      ' A creatable COM class must have a Public Sub New() 
      ' with no parameters, otherwise, the class will not be 
      ' registered in the COM registry and cannot be created 
      ' via CreateObject.
      Public Sub New()
          MyBase.New()
      End Sub
  
      Public Sub Hello()
          '...
      End Sub
  End Class
  </code></pre>
  
  <p>What I did :</p>
  
  <ul>
  <li><p>Chose ".NET Framework 2.0" in Compile options</p></li>
  <li><p>Compile it on my own desktop</p></li>
  <li><p>Copied all file from the Bin\Release directly to a folder on the server.</p></li>
  <li><p>Successfully registered the DLL on the server using Regasm.exe </p></li>
  </ul>
  
  <p>but Object1 cannot be created using neither VB6 or VBScript.</p>
  
  <p>Here is the script I used in a VBScript:</p>
  
  <pre><code>Option Explicit
  
  Dim TestObject
  Set TestObject = CreateObject("TestComObject.Object1")
  </code></pre>
  
  <p>Any help will be appreciated!</p>
  
  <p>Alex</p>