Problem with Directory Services

G

Guest

The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code

objeto.Invoke("SetPassword", new object[] {contraseña});

The error is
"The filename, directory name, or volume label syntax is incorrect"
Exception Detail : System.IO.FileNotFoundException:The filename, directory
name, or volume label syntax is incorrect
 
W

Willy Denoyette [MVP]

Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.
 
G

Guest

Hi
The server it`s a Windows 2003 Std, pls review this trace ----------------
[FileNotFoundException: The filename, directory name, or volume label syntax
is incorrect.]
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(String methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:932
[DirectorioActivoException: Ocurrio un error estableciendo la contraseña
para el objeto.]

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:939
Intelecto.Utilidades.DirectorioActivo.CrearObjeto(String nombre,
Hashtable propiedades, enm_TipoObjeto tipoobjeto) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:273
[DirectorioActivoException: Se presento un error al crear el objeto en el
Directorio Activo.]

CFV.CFVWeb.Reglas.SolicitudServicio.clsSolicitudServicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServicioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatural.VisorHojaVidaPersonaNatural.btnAceptar_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudservicio\personanatural\visorhojavidapersonanatural.aspx.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia


Willy Denoyette said:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

Diego Valencia said:
The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code

objeto.Invoke("SetPassword", new object[] {contraseña});

The error is
"The filename, directory name, or volume label syntax is incorrect"
Exception Detail : System.IO.FileNotFoundException:The filename, directory
name, or volume label syntax is incorrect
 
M

Marc Scheuner [MVP ADSI]

The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code
objeto.Invoke("SetPassword", new object[] {contraseña});

What is "objeto" ? How do you create it ?

You need to show a bit more of your code in order to enable others to
help you.....

Marcd
 
W

Willy Denoyette [MVP]

He, you have two exceptions on the call stack (FileNotFoundException and a
TargetInvocationException).
The TargetInvocationException comes from the SetPassword call, probably you
are calling this from an unsecured environment like a web application.
If you need more help, you will have to show us some code.

Willy.

Diego Valencia said:
Hi
The server it`s a Windows 2003 Std, pls review this trace ----------------
[FileNotFoundException: The filename, directory name, or volume label
syntax
is incorrect.]
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(String methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:932
[DirectorioActivoException: Ocurrio un error estableciendo la contraseña
para el objeto.]

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:939
Intelecto.Utilidades.DirectorioActivo.CrearObjeto(String nombre,
Hashtable propiedades, enm_TipoObjeto tipoobjeto) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:273
[DirectorioActivoException: Se presento un error al crear el objeto en el
Directorio Activo.]

CFV.CFVWeb.Reglas.SolicitudServicio.clsSolicitudServicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServicioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatural.VisorHojaVidaPersonaNatural.btnAceptar_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudservicio\personanatural\visorhojavidapersonanatural.aspx.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia


Willy Denoyette said:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

message
The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code

objeto.Invoke("SetPassword", new object[] {contraseña});

The error is
"The filename, directory name, or volume label syntax is incorrect"
Exception Detail : System.IO.FileNotFoundException:The filename,
directory
name, or volume label syntax is incorrect
 
G

Guest

Hi Willy,
I´ll apreciatte your comments about my code; my scenario is :
Web Application
AD Directoty over Windows 2003
Thks 4 your help


public bool Conectar(string ruta,string usuario,string contraseña)
{
try
{
strUsuario=usuario;
strContraseña=contraseña;

ADSObjeto=new
System.DirectoryServices.DirectoryEntry(ruta,usuario,contraseña,System.DirectoryServices.AuthenticationTypes.Secure);
ADSObjeto.RefreshCache();

return true;
}
catch(System.Exception Exc)
{
ADSObjeto.Dispose();

Intelecto.Utilidades.DirectorioActivoException ADExc=new
DirectorioActivoException ("No fue posible conectarse al Directorio
Activo.",Exc);
ADExc.Source=this.GetType().ToString()+"_Conectar(string,string,string)";
throw(ADExc);
}
}


private bool EstablecerContraseña(ref
System.DirectoryServices.DirectoryEntry objeto,string contraseña)
{
try
{
objeto.Invoke("SetPassword", new object[] {contraseña});
objeto.CommitChanges();
return true;
}
catch(System.Exception Exc)
{
Intelecto.Utilidades.DirectorioActivoException ADExc=new
DirectorioActivoException("Ocurrio un error estableciendo la contraseña para
el objeto.",Exc);
throw(ADExc);
}
}

--
Diego Valencia


Willy Denoyette said:
He, you have two exceptions on the call stack (FileNotFoundException and a
TargetInvocationException).
The TargetInvocationException comes from the SetPassword call, probably you
are calling this from an unsecured environment like a web application.
If you need more help, you will have to show us some code.

Willy.

Diego Valencia said:
Hi
The server it`s a Windows 2003 Std, pls review this trace ----------------
[FileNotFoundException: The filename, directory name, or volume label
syntax
is incorrect.]
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(String methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:932
[DirectorioActivoException: Ocurrio un error estableciendo la contraseña
para el objeto.]

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:939
Intelecto.Utilidades.DirectorioActivo.CrearObjeto(String nombre,
Hashtable propiedades, enm_TipoObjeto tipoobjeto) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:273
[DirectorioActivoException: Se presento un error al crear el objeto en el
Directorio Activo.]

CFV.CFVWeb.Reglas.SolicitudServicio.clsSolicitudServicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServicioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatural.VisorHojaVidaPersonaNatural.btnAceptar_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudservicio\personanatural\visorhojavidapersonanatural.aspx.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia


Willy Denoyette said:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

message
The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code

objeto.Invoke("SetPassword", new object[] {contraseña});

The error is
"The filename, directory name, or volume label syntax is incorrect"
Exception Detail : System.IO.FileNotFoundException:The filename,
directory
name, or volume label syntax is incorrect
 
W

Willy Denoyette [MVP]

I don't see the call to the method EstablecerContraseña(...

Willy.


Diego Valencia said:
Hi Willy,
I´ll apreciatte your comments about my code; my scenario is :
Web Application
AD Directoty over Windows 2003
Thks 4 your help


public bool Conectar(string ruta,string usuario,string contraseña)
{
try
{
strUsuario=usuario;
strContraseña=contraseña;

ADSObjeto=new
System.DirectoryServices.DirectoryEntry(ruta,usuario,contraseña,System.DirectoryServices.AuthenticationTypes.Secure);
ADSObjeto.RefreshCache();

return true;
}
catch(System.Exception Exc)
{
ADSObjeto.Dispose();

Intelecto.Utilidades.DirectorioActivoException ADExc=new
DirectorioActivoException ("No fue posible conectarse al Directorio
Activo.",Exc);
ADExc.Source=this.GetType().ToString()+"_Conectar(string,string,string)";
throw(ADExc);
}
}


private bool EstablecerContraseña(ref
System.DirectoryServices.DirectoryEntry objeto,string contraseña)
{
try
{
objeto.Invoke("SetPassword", new object[] {contraseña});
objeto.CommitChanges();
return true;
}
catch(System.Exception Exc)
{
Intelecto.Utilidades.DirectorioActivoException ADExc=new
DirectorioActivoException("Ocurrio un error estableciendo la contraseña
para
el objeto.",Exc);
throw(ADExc);
}
}

--
Diego Valencia


Willy Denoyette said:
He, you have two exceptions on the call stack (FileNotFoundException and
a
TargetInvocationException).
The TargetInvocationException comes from the SetPassword call, probably
you
are calling this from an unsecured environment like a web application.
If you need more help, you will have to show us some code.

Willy.

message
Hi
The server it`s a Windows 2003 Std, pls review this
trace ----------------
[FileNotFoundException: The filename, directory name, or volume label
syntax
is incorrect.]
[TargetInvocationException: Exception has been thrown by the target of
an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(String methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:932
[DirectorioActivoException: Ocurrio un error estableciendo la
contraseña
para el objeto.]

Intelecto.Utilidades.DirectorioActivo.EstablecerContraseña(DirectoryEntry&
objeto, String contraseña) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:939
Intelecto.Utilidades.DirectorioActivo.CrearObjeto(String nombre,
Hashtable propiedades, enm_TipoObjeto tipoobjeto) in
C:\jsalcedo\Intelecto\Utilidades\DirectorioActivo\DirectorioActivo.cs:273
[DirectorioActivoException: Se presento un error al crear el objeto en
el
Directorio Activo.]

CFV.CFVWeb.Reglas.SolicitudServicio.clsSolicitudServicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServicioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatural.VisorHojaVidaPersonaNatural.btnAceptar_Click(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudservicio\personanatural\visorhojavidapersonanatural.aspx.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia


:

Not possible to get such error when executing
Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

message
The attach error was generate when I tried to use invoke method
"setpassword"

this is mi code

objeto.Invoke("SetPassword", new object[] {contraseña});

The error is
"The filename, directory name, or volume label syntax is incorrect"
Exception Detail : System.IO.FileNotFoundException:The filename,
directory
name, or volume label syntax is incorrect
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top