Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ASP.NET and Server.CreateObject

Posted on 2003-03-27
10
Medium Priority
?
1,294 Views
Last Modified: 2013-11-25
I understand that Server.CreateObject has been replaced in ASP.NET. My problem is that I run a login/user management system with a third party object called ASPCrypt like this:
Set Cryptor = Server.CreateObject ("AspCrypt.Crypt")

In .NET, I have tried:
<%@ Import Namespace="AspCrypt" %>

but I keep getting errors like:
BC30466: Namespace or type 'AspCrypt' for the Imports 'AspCrypt' cannot be found.

The Server.CreateObject method works perfectly on the same machine using classic ASP. What do I have to do to get the AspCrypt object to work/import with .NET?

-Whatsit2002
0
Comment
Question by:whatsit2002
  • 6
  • 2
  • 2
10 Comments
 
LVL 23

Accepted Solution

by:
naveenkohli earned 300 total points
ID: 8219993
You will have to use tlbimp on that COM object. And simplest way to do is from IDE, add refrence to that DLL.
0
 
LVL 7

Author Comment

by:whatsit2002
ID: 8220018
I'm not using an IDE... I'm writing asp.net code in Homesite 4.5x

Also, could you give an example of tlbimp?
0
 
LVL 6

Expert Comment

by:thomasdodds
ID: 8226675
"I'm writing asp.net code in Homesite 4.5x" - then you've cut yourself off from the benefits of using the tool created for the feature rich framework you've decided to use for development ...
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 7

Author Comment

by:whatsit2002
ID: 8226805
Well, if I could afford a multi-hundred dollar development environment, I might think about it, but I have had great success building classic asp with Homesite ($50 US).

Anyway, that's off topic.

I ran tlbimp on my AspCrypt.dll, created my RCW dll file and got the message:
AspCrypt imported

--- but, I still can't access the namespace. I keep getting the same errors. Can anyone help?

-Whatsit2002
0
 
LVL 6

Expert Comment

by:thomasdodds
ID: 8226833
"but I have had great success building classic asp with Homesite ($50 US)." - classic ASP and ASP.NET are so different; don't be fooled by the name ... either get VS.NET (if you have a student ID get the acedemic version) or get the free WebMatrix ... the framework is too rich to not use the proper tool ... if you are going to use Homesite, then write your project in classic ASP and forget .NET for now
0
 
LVL 7

Author Comment

by:whatsit2002
ID: 8226912
Okay, so I didn't know about Web Matrix. I downloaded it, it look pretty usefull.

That's out of the way. Could someone please tell me how I might get my COM object working? (Either with Web Matrix or manually?)

I don't mean to come off as a stuck-up, but my concern is not my development environment. I have ported a lot of my asp to asp.net already. My one problem is this AspCrypt COM object and getting it to work with ASP.Net.

I would use ASP.Net's built-in crypto/MD5 stuff, but it is not compatible with the user info I already have since AspCrypt spits out a string and ASP.Net's md5 namespace spits back a binary chunk of data.

I'll bump the points if someone can give a usefull answer.
-Whatsit2002
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 8226965
use ILDASM to open the assembly that you crated using tlbimp and check what is the namespace that is created. It may not be AspCrypt
0
 
LVL 7

Author Comment

by:whatsit2002
ID: 8227035
The rcw dll's tree looks like this:

aspcrypt_rcw.dll
|
|-->M A N I F E S T
|
|--^AspCrypt
   |
   |-I Crypt
   |
   |-_ CryptClass
   |
   |-I ICrypt

There are a couple things under each of the items under AspCrypt, but I think you get the idea. I believe this indicates that the namespace is actually AspCrypt which is what I am trying to import, right?
0
 
LVL 7

Author Comment

by:whatsit2002
ID: 8227047
Note: the ^ before the name "AspCrypt" is my poor ascii art representation of a shield icon.
-Whatsit2002
0
 
LVL 7

Author Comment

by:whatsit2002
ID: 8227148
I figured it out! I dumped the AspCrypt_RCW.dll file into the %root%\bin\ of my .NET application and it works spledidly. naveenkohli, you get the points for, at least, pointing me in the right directions.

-Whatsit2002
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

578 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