Foros del Web » Programación para mayores de 30 ;) » Programación General »

ActiveX y ASP

Estas en el tema de ActiveX y ASP en el foro de Programación General en Foros del Web. Buenas. Expongo mi problema aqui ya que tiene relacion con programacion en Visual Basic, espero q me podais ayudar... Estoy empezando a aprender como se ...
  #1 (permalink)  
Antiguo 26/01/2004, 08:10
 
Fecha de Ingreso: noviembre-2003
Ubicación: Murcia
Mensajes: 34
Antigüedad: 20 años, 5 meses
Puntos: 0
ActiveX y ASP

Buenas. Expongo mi problema aqui ya que tiene relacion con programacion en Visual Basic, espero q me podais ayudar...

Estoy empezando a aprender como se utilizan los controles ActiveX con ASP. He hecho una prueba pero no consigo que me funcione. He creado una DLL con el Visual Basic, el codigo es el siguiente:

Option Explicit

Private ScriptingContext As ScriptingContext
Private Application As Application
Private Request As Request
Private Response As Response
Private Server As Server
Private Session As Session

Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set ScriptingContext = PassedScriptingContext
Set Application = ScriptingContext.Application
Set Request = ScriptingContext.Request
Set Response = ScriptingContext.Response
Set Server = ScriptingContext.Server
Set Session = ScriptingContext.Session
End Sub

Public Sub OnEndPage()
Set ScriptingContext = Nothing
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
End Sub

Public Sub Mensaje(Texto As String)
Response.Write "<b><font color='red'>" & Texto & "</font></b>"
End Sub

He generado la dll correspondiente.
Y tb he creado una pagina ASP que llama a esta dll:

<html>
<body>
<%
Dim Test

Set Test = Server.CreateObject("ASPTest.Test")

Test.Mensaje "Hola, esta es una prueba."

Set Test = Nothing

%>
</body>
</html>

Me da un error en la linea
Set Test = Server.CreateObject("ASPTest.Test")
Objeto Server, ASP 0177 (0x800401F3)
Cadena clase no válida


Estoy usando IIS con WindowsXP. Las paginas en ASP me funcionan, pero cuando le añado controles ACTIVEX, no. ¿Q puede pasar? aparte del problema de mi ignorancia...

GRACIAS
  #2 (permalink)  
Antiguo 10/02/2004, 09:50
 
Fecha de Ingreso: enero-2004
Ubicación: Antofagasta
Mensajes: 40
Antigüedad: 20 años, 3 meses
Puntos: 0
primero el nombre de tu dll tiene que ser igual al nombre de tu proyecto, incluyendo minisculas y mayusculas, etc, de igual manera el nombre de tu clase Test, tiene que ser escrita tal cual..
ahora, no te olvides de agregar las correspondientes referencias, en el menú proyecto de VB, si haz agregado las referencias de Microsoft Active Server Page Object Library, y también Microsoft ActiveX Dato objects 2.1 Library. A la vez tienes que volver a generar la DLL.
Ahora si no te deja generar la dll, tienes que bajar el servidor
si no me equivoco el servidor se puede bajar con:
iisreset /restart
si aún te sigue dando problemas, luego me avisas y te podré ayudar. ya que yo estoy haciendo todo un proyecto con ASP y DLL
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:11.