![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | exception when calling a method: object is read-only Hello all, What does the error below mean? not sure what why this object would be read-only, or what that has to do with calling a method on it. PS Z:\> $vaultServer = new-object Symyx.Framework.Vault.VaultServer("localhost") PS Z:\> $vaultServer.Logout() Exception calling "Logout" with "0" argument(s): "Object is read-only." At line:1 char:20 + $vaultServer.Logout( <<<< ) |
My System Specs![]() |
| | #2 (permalink) |
| | RE: exception when calling a method: object is read-only It means that the object you obtained cannot be modified. When I've seen this before it usually means that the object doesn't actually do what I thought it did As to why that is - a couple of ideas: 1) does the user account you are using have permissions to whatever the object represents 2) I presume there is a Logout() method 3) put the object through get-member and see what it returns 4) remember psbase and the other object qualifiers - see if using them can help -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Steve" wrote: > Hello all, > > What does the error below mean? not sure what why this object would be > read-only, or what that has to do with calling a method on it. > > PS Z:\> $vaultServer = new-object > Symyx.Framework.Vault.VaultServer("localhost") > PS Z:\> $vaultServer.Logout() > Exception calling "Logout" with "0" argument(s): "Object is read-only." > At line:1 char:20 > + $vaultServer.Logout( <<<< ) |
My System Specs![]() |
| | #3 (permalink) |
| | RE: exception when calling a method: object is read-only Thanks Rich, (1) get-member returns all the properties and methods on this object, no problema, including Login, Logout. (2) i'm signed on to the box as an admin user. This object is simply an object in a library that i've loaded. it doesnt do anything but call a web service to authenticate. (3) is there a way to get better error messages? "RichS" wrote: > It means that the object you obtained cannot be modified. When I've seen > this before it usually means that the object doesn't actually do what I > thought it did > > As to why that is - a couple of ideas: > > 1) does the user account you are using have permissions to whatever the > object represents > > 2) I presume there is a Logout() method > > 3) put the object through get-member and see what it returns > > 4) remember psbase and the other object qualifiers - see if using them can > help > -- > Richard Siddaway > Please note that all scripts are supplied "as is" and with no warranty > Blog: http://richardsiddaway.spaces.live.com/ > PowerShell User Group: http://www.get-psuguk.org.uk > > > "Steve" wrote: > > > Hello all, > > > > What does the error below mean? not sure what why this object would be > > read-only, or what that has to do with calling a method on it. > > > > PS Z:\> $vaultServer = new-object > > Symyx.Framework.Vault.VaultServer("localhost") > > PS Z:\> $vaultServer.Logout() > > Exception calling "Logout" with "0" argument(s): "Object is read-only." > > At line:1 char:20 > > + $vaultServer.Logout( <<<< ) |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Calling a Windows DLL method (C++) from C#, passing a structurereference. | .NET General | |||
| Method '~' of object '~' failed | VB Script | |||
| exception calling .net object | PowerShell | |||