471,349 Members | 1,236 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Problem with Directory Services

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
--
Diego Valencia
Jul 22 '05 #1
6 2357
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

"Diego Valencia" <Di***********@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
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
--
Diego Valencia

Jul 22 '05 #2
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(Str ing methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerCo ntraseñ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.EstablecerCo ntraseñ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.clsSolicitudSe rvicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServ icioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatu ral.VisorHojaVidaPersonaNatural.btnAceptar_Click(O bject
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudserv icio\personanatural\visorhojavidapersonanatural.as px.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia
"Willy Denoyette [MVP]" wrote:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

"Diego Valencia" <Di***********@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
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
--
Diego Valencia


Jul 22 '05 #3
>The attach error was generate when I tried to use invoke method
"setpassword"

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


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

Jul 24 '05 #4
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" <Di***********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com...
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(Str ing methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerCo ntraseñ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.EstablecerCo ntraseñ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.clsSolicitudSe rvicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServ icioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatu ral.VisorHojaVidaPersonaNatural.btnAceptar_Click(O bject
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudserv icio\personanatural\visorhojavidapersonanatural.as px.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia
"Willy Denoyette [MVP]" wrote:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

"Diego Valencia" <Di***********@discussions.microsoft.com> wrote in
message
news:2C**********************************@microsof t.com...
> 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
> --
> Diego Valencia


Jul 24 '05 #5
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,usuar io,contraseña,System.DirectoryServices.Authentica tionTypes.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 [MVP]" wrote:
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" <Di***********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com...
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(Str ing methodName,
Object[] args) +106

Intelecto.Utilidades.DirectorioActivo.EstablecerCo ntraseñ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.EstablecerCo ntraseñ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.clsSolicitudSe rvicio.CrearPersonaNatural(clsPersonaNatural
obPersonaNatural, String stContraseñaPersonaNatural) in
C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServ icioObject\clsSolicitudServicio.cs:376
CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatu ral.VisorHojaVidaPersonaNatural.btnAceptar_Click(O bject
sender, EventArgs e) in
c:\inetpub\wwwroot\solicitudservicio\solicitudserv icio\personanatural\visorhojavidapersonanatural.as px.cs:148
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()
--
Diego Valencia
"Willy Denoyette [MVP]" wrote:
Not possible to get such error when executing Invoke("SetPassword".....
The error must come from another (File IO) statement.

Willy.

"Diego Valencia" <Di***********@discussions.microsoft.com> wrote in
message
news:2C**********************************@microsof t.com...
> 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
> --
> Diego Valencia


Jul 25 '05 #6
I don't see the call to the method EstablecerContraseña(...

Willy.
"Diego Valencia" <Di***********@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
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,usuar io,contraseña,System.DirectoryServices.Authentica tionTypes.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 [MVP]" wrote:
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" <Di***********@discussions.microsoft.com> wrote in
message
news:CE**********************************@microsof t.com...
> 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(Str ing methodName,
> Object[] args) +106
>
> Intelecto.Utilidades.DirectorioActivo.EstablecerCo ntraseñ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.EstablecerCo ntraseñ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.clsSolicitudSe rvicio.CrearPersonaNatural(clsPersonaNatural
> obPersonaNatural, String stContraseñaPersonaNatural) in
> C:\Inetpub\wwwroot\SolicitudServicio\SolicitudServ icioObject\clsSolicitudServicio.cs:376
> CFV.CFVWeb.Web.Sitio.SolicitudServicio.PersonaNatu ral.VisorHojaVidaPersonaNatural.btnAceptar_Click(O bject
> sender, EventArgs e) in
> c:\inetpub\wwwroot\solicitudservicio\solicitudserv icio\personanatural\visorhojavidapersonanatural.as px.cs:148
> System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
> eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
> System.Web.UI.Page.ProcessRequestMain()
> --
> Diego Valencia
>
>
> "Willy Denoyette [MVP]" wrote:
>
>> Not possible to get such error when executing
>> Invoke("SetPassword".....
>> The error must come from another (File IO) statement.
>>
>> Willy.
>>
>> "Diego Valencia" <Di***********@discussions.microsoft.com> wrote in
>> message
>> news:2C**********************************@microsof t.com...
>> > 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
>> > --
>> > Diego Valencia
>>
>>
>>


Jul 25 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andrew | last post: by
6 posts views Thread by Dave | last post: by
1 post views Thread by Chris Love | last post: by
5 posts views Thread by Segfahlt | last post: by
2 posts views Thread by shapper | last post: by
2 posts views Thread by Patrick F | last post: by
reply views Thread by sangkatte | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.