ASP and ASP.NET

  • Thread starter Thread starter borko
  • Start date Start date
B

borko

Hi,
Is there any way to use ASP.NET functions (specifically image operations)
from regular ASP.

Thanks,
B.
 
Borko,

What is the reason for this question. Going from ASP to ASPX (scripting) is
a piece of cake when the framework is installed on the server.

Cor
 
sounds liek he wants to use ASP.NET controls and such within his ASP
application. At this point you might just want to redo the asp app into
asp.net
 
¤ Hi,
¤ Is there any way to use ASP.NET functions (specifically image operations)
¤ from regular ASP.

Only through COM wrappers. However, .NET web controls are not available to ASP.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
You can expose ASP.NET objects as COM objects (see the doc for the regasm
command line tool).
I've done this to create thumbnails in one of our "ASP classic"
application...

Patrice
 
Did you have to do any additional coding to make this work? I am a classic
ASP developer, and don't have the time to learn .net right now :(, but I
work with a .net developer who is going nuts trying to figure this out. He
has a .net based DLL that he has updated/modified after referring to the
standard docs on msdn for exposing .net to com and the regasm tool, but is
not able to get the required object to properly create in std asp.

most of the time it appears the registration cant be found, but looking at
the registry, we can see it, so we must be doing something wrong in the com
setup/interop configuration.

Any help/code samples are greatly appreciated.

Carlin
 
No special programming. I don't remember we had a problem.
I would try to instantiate this object using an interactive VBS file. If it
works it would likely confirm a permission problem. Check then the account
under which your ASP.NET application runs...

Patrice

--
 
I checked the doc. If I remember I had to use the /codebase option but I
don't remember to have strongly named the assembly...

Good luck. Let us know.

Patrice

--
 
We did get this to work by building an install package, and we had to update
some authorities for the iwam account.

My only problem now is I can create the object, but the methods & properties
are not visible to me. How can I make them visible?

Thanks

Carlin
 
I have between 50 and 70 asp pages ... not really enough time

Reason for this is that ISP (that my client chose) does not allow me to use
components that I wrote and they are not willing to install anything.

B.
 
Try something like :

Public Class Thumbnail
Public Sub CreateThumbnail(ByVal FromFile As String, ByVal ToFile As
String)
Dim Bitmap As New Bitmap(FromFile)
Dim Image As Image = Bitmap.GetThumbnailImage(Bitmap.Width /
(Bitmap.Height / 40), 40, Nothing, IntPtr.Zero)
Image.Save(ToFile)
Image.Dispose()
Bitmap.Dispose()
End Sub
End Class


Then in the ASP page (once registered) :

Set obj=CreateObject("ProjectName.Thumbnail")
obj.CreateThumbnail
Server.MapPath("/somewhere/myfile.jpg"),Server.MapPath("/somewhere/myfile_th
umb.jpg")
Set obj=Nothing

Patrice
--
 
Back
Top