Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Testing a dll in an ASP page

I have created a com object that I have been testing in vb and all is going great.
I haven't registered the dll yet and don't want to until it is complete.

I am now wanting to test the dll in an ASP page - and was hoping to not have to register it! (as i am developing it as i go)

How can i make the dll available to my ASP page without registering it?

Thanks




0
little2do
Asked:
little2do
  • 3
  • 3
1 Solution
 
AzraSoundCommented:
I recommend testing the ASP page locally by installing IIS or PWS on your development machine.  If that is the case already, then you are set.
0
 
MCummings111400Commented:
You can test the Com component in a local ASP page if you put the component into run mode within the VB IDE. Set your COM Project as Startup and then run it. It will wait for components to be created.

VB will create temp registrations for the objects so you can now use

Set obj = Server.CreateObject("MyServer.MyObject")

In your ASP page.

This will only work if you are doing everything locally.
0
 
little2doAuthor Commented:
Thank you for your comments.

I have VB installed locally on the testing server which is running IIS.

I created an activeX.dll project called TrainingCOM and have a class called Training.

So I Run the VB Project (There is only one, so it is set as the start up project)

In my asp code i have:
Set Train = Server.CreateObject("TrainingCOM.Training")

And my page returns:
Error Type:
Microsoft VBScript runtime (0x800A01AD)
ActiveX component can't create object
/costcentres.asp, line 125

If the VB project isn't running i get this error:
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
/costcentres.asp, line 125

Any thoughts?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AzraSoundCommented:
You have to compile the component (that will automatically register the component on the test server).

In your VB project, go to Project -> Project Properties and select the Debugging Tab.  Ensure the option "Wait for components to be created" is selected.  Then press F5 to put the DLL in run mode, then open your ASP page in your browser pointing to it locally (e.g., http://localhost/mypage.asp).  You should then be able to step through your code, set breakpoints, etc., in your DLL as needed.

Things to note, when you need to recompile, you have to release the hold IIS has on the component in memory.  This can be done by shutting down IIS and restarting, or setting some properties via Internet Services Manager (so long as you run IIS 5.0).  If you are interested in the latter, let me know and I can offer details.
0
 
little2doAuthor Commented:
AzraSound,

Yes I am interested in being able to re-compile the dll at will so would like those IIS settings please.
I tried restarting the default web site but was unable to recompile.
Looks like i have to reboot each time to re-compile the Dll?

Thanks



0
 
AzraSoundCommented:
Another thing to check is if you are developing using Interdev, and you have recenly utilized an ASP page that references your DLL, sometimes Interdev will hold a reference to your component in memory and it, too, must be shut down to recompile.  The settings to allow for recompile w/o restarting IIS:


1) Open up Internet Services Manager
2) Go to Properties for your web application
3) Click on Home Directory tab
4) Set "Execution Permissions" to "Scripts and Executables"
5) Set "Application Protection" to "High (Isolated)"
6) Debug your component as needed
7) When you need to recompile, return to that Home Directory tab and click the "Unload" button to free the component from memory
0
 
little2doAuthor Commented:
AzraSound,

Well done, I have just made 3 changes to my dll, and recomiled each time. (But could do so only after I 'Unloaded' the Dll in IIS)

Thanks
Rgds
Paul
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now