When I am using the Managemnetscope.Connect() to connect to a server, it returns Specified cast is not valid. Please help.

Thanks in advance