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

Error al usar una clase

Estas en el tema de Error al usar una clase en el foro de .NET en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 05/08/2008, 12:54
 
Fecha de Ingreso: diciembre-2006
Mensajes: 63
Antigüedad: 17 años, 4 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???
  #2 (permalink)  
Antiguo 05/08/2008, 14:59
 
Fecha de Ingreso: diciembre-2006
Mensajes: 63
Antigüedad: 17 años, 4 meses
Puntos: 0
Respuesta: Error al usar una clase

Solucionado era asi:
Cita:
<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 FormsAuth.LdapAuthentication(adPath)
Try
que simple o no???
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 06:47.