473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

.NET Class and Classic ASP

I am in the process of creating a security control object in VB.NET. This
object will be utilized from classic ASP (Asp 2.0) applications that reside
on our Intranet (as well as ASP.NET pages as they are developed). What is
the best way to access this object from my classic ASP pages? Based on this,
what is the Visual Studio 2005 project type that I want to select?

With VB 6, I would create .dll and register it on the web server. Is this
still the case with .NET? I am unsure if I just compile the application on
the web server if I will be able to access the classes from my classic ASP
pages. Any examples our links to demonstrations would help.

Thank you in advance.
May 3 '06 #1
4 1340
In VS.NET, you can 'expose' .NET objects as COM components to COM
clients, by checking the "make assembly COM-visible" option in Assembly
information dialog (Project Properties). Here is a sample to create a COM+
component in VB.NET, which can be used in both of ASP.NET and ASP:

http://support.microsoft.com/default...b;en-us;315707

Also, you can register a .NET component for COM client usage by a tool
named "regasm.exe":

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfassemblyregistrationtoolregasmexe.asp

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 4 '06 #2
Thank you Luke. Your responses are always much appreciated.
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> wrote in message
news:aw**************@TK2MSFTNGXA01.phx.gbl...
In VS.NET, you can 'expose' .NET objects as COM components to COM
clients, by checking the "make assembly COM-visible" option in Assembly
information dialog (Project Properties). Here is a sample to create a COM+
component in VB.NET, which can be used in both of ASP.NET and ASP:

http://support.microsoft.com/default...b;en-us;315707

Also, you can register a .NET component for COM client usage by a tool
named "regasm.exe":

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfassemblyregistrationtoolregasmexe.asp

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 4 '06 #3
As a follow up to this, I had to place the dll into the Windows\system32
folder on the server and run regasm with the /codebase switch in order to
access the object from an ASP page. When I placed the dll anywhere else and
registered it I could not create the object with Server.CreateObject from my
ASP page.

regasm C:\Windows\System32\mnaSecurityControl.dll /codebase

"Matt" <ma******@newsgroups.nospam> wrote in message
news:OR*************@TK2MSFTNGP04.phx.gbl...
Thank you Luke. Your responses are always much appreciated.
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> wrote in message
news:aw**************@TK2MSFTNGXA01.phx.gbl...
In VS.NET, you can 'expose' .NET objects as COM components to COM
clients, by checking the "make assembly COM-visible" option in Assembly
information dialog (Project Properties). Here is a sample to create a
COM+
component in VB.NET, which can be used in both of ASP.NET and ASP:

http://support.microsoft.com/default...b;en-us;315707

Also, you can register a .NET component for COM client usage by a tool
named "regasm.exe":

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfassemblyregistrationtoolregasmexe.asp

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)


May 4 '06 #4
You also can create a .NET assemmbly with strong name, and put it in GAC.
And then register it with regasm.exe.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Samuel Kleiner | last post by:
Is there a builtin way of making making another instance of your own class? I really expected type(self)(*args, **keywords) to work this way. Currently i'm doing this: def...
20
by: syd | last post by:
In my project, I've got dozens of similar classes with hundreds of description variables in each. In my illustrative example below, I have a Library class that contains a list of Nation classes. ...
6
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at...
5
by: venk | last post by:
Hi, can some one properly explain the differences between class types and classic classes? ... Still face problems in identifying what is what.
7
by: TJ | last post by:
In C# how do you achieve pass-by-reference property declarations in the Type Library? I am writing a COM Class Library that must mimick an existing library for which the only information is the...
6
by: Dica | last post by:
i've been asked to write an app making use of reports.vb class, but i can't seem to find it..
38
by: looping | last post by:
For Python developers around. >From Python 2.5 doc: The list of base classes in a class definition can now be empty. As an example, this is now legal: class C(): pass nice but why this...
9
by: Rudy | last post by:
Hello All! I'm a little confused on Public Class or Modules. Say I have a this on form "A" Public Sub Subtract() Dim Invoice As Decimal Dim Wage As Decimal Static PO As Decimal Invoice =...
29
by: Brad Pears | last post by:
Here is a simple OO design question... I have a Contract class. The user can either save an existing contract or they start off fresh with a blank contract, fill in the data and then save a...
21
by: Nikolaus Rath | last post by:
Hello, Can someone explain to me the difference between a type and a class? After reading http://www.cafepy.com/article/python_types_and_objects/ it seems to me that classes and types are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.