title: Need to call a .Net Class library dll from a Classic ASP Page
body: <p>I need to call a .Net Class Library from a vbscript application<br>
  I have written a C# class library and created a COM DLL component and a type library file<br>
  I have successfully registered the dll and tlb on my local computer using </p>
  
  <pre><code>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe 
    "C:\user\Visual Studio 2008\Projects\[Sample]\[Sample]\bin\Debug\[Sample].dll" 
    /tlb "C:\user\Visual Studio 2008\Projects\[Sample]\[Sample]\bin\Debug\[Sample].tlb"
  </code></pre>
  
  <p>The dll and the type library file are registered successfully<br>
  I can see them in the windows registry</p>
  
  <p>Now the issue is accessing it in an asp page:</p>
  
  <pre><code>&lt;%@  Language=VBScript %&gt;
  &lt;html&gt; 
  &lt;body&gt;
  &lt;%
  
  
  dim cls
  dim myDevelopmentDBConn
  
  Set myDevelopmentDBConn = Server.CreateObject("ADODB.Connection")
  With myDevelopmentDBConn
  .Provider = "SQLNCLI"
  .ConnectionString = "user ID=abc;password=abc;Initial Catalog=TestLdb;Data         
   Source=sqlservername"
  .ConnectionTimeout = 600
  .CommandTimeout = 600
  .Open
   End With
  Response.Write  myDevelopmentDBConn
  Set myDevelopmentDBConn =nothing
  Set cls = Server.CreateObject("Sample.SqlJobs") 'SqlJobs is the name of the class 
  Response.Write cls
  
  'Response.Write "&lt;b&gt;" &amp; cls.UpdateSqlJob("Test1","sqlservername", "abc", "abc" ) &amp; "&lt;/b&gt;"
  
  'Test1=sqlserverjob name
  'abc-username
  'abc-password
  Set cls =nothing
  %&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run this file I got the following error</p>
  
  <blockquote>
    <p>The page cannot be displayed</p>
  </blockquote>
  
  <p>I am getting an error </p>
  
  <blockquote>
    <p>Error Type:<br>
    Server object, ASP 0177 (0x80131522)<br>
    80131522<br>
    /testdll.asp, line 25<br>
    Set cls = Server.CreateObject("Sample.SqlJobs") //SqlJobs is the name of the class<br>
    This will be the line 25<br>
    The server Instance is not getting created  </p>
  </blockquote>
  
  <p>Can anyone please help me figure out where I am going wrong and suggest me possible ways of fixing this issue?</p>