Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/08/2008, 12:54
hasan
 
Fecha de Ingreso: diciembre-2006
Mensajes: 63
Antigüedad: 18 años, 2 meses
Puntos: 0
Error al usar una clase

Hola

Tengo esta clase
Código:
Imports System.Text
Imports System.Collections
Imports System.DirectoryServices

Namespace FormsAuth
    Public Class LdapAuthentication

        Dim _path As String
        Dim _filterAttribute
...
Posteriormente pretendo llamarla desde mi pagina logon.aspx, y pongo la sigueinte directiva de pagina:
Código:
<%@ Page Language="VB" AutoEventWireup="true"%>
<%@ import Namespace="FormsAuth.LdapAuthentication" %>
y mas abajo hago la instancia a mi clase de la siguiente manera:

Código:
<script runat="server">
    Protected Sub Login_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim adPath As String = "LDAP://DC=..,DC=.." 'Path to your LDAP directory server
        Dim adAuth As New LdapAuthentication(adPath)
        Try
...
Pero me subraya con azul LdapAuthentication, y me muetra el mensaje "El tipo 'LdapAuthentication' no está definido.". La clase se encuentra en la carpeta App_Code.

Alguien sabe a que pueda deberse???