Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Testing a dll in an ASP page

Posted on 2002-05-30
7
Medium Priority
?
219 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 600 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

704 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