Solved

Testing a dll in an ASP page

Posted on 2002-05-30
7
209 Views
Last Modified: 2010-05-02
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
Comment
Question by:little2do
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 7044992
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
 
LVL 3

Expert Comment

by:MCummings111400
ID: 7045537
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
 

Author Comment

by:little2do
ID: 7046440
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!

 
LVL 28

Expert Comment

by:AzraSound
ID: 7046743
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
 

Author Comment

by:little2do
ID: 7047424
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
 
LVL 28

Accepted Solution

by:
AzraSound earned 150 total points
ID: 7047596
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
 

Author Comment

by:little2do
ID: 7048469
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 connector to SQL Server 2 42
TT Auto Dashboard 13 104
How to read File Date Created using VB6 8 73
Sub or Function is not defined 6 59
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question