Re: Connect on ManagementScope throws: BadImageFormatException
From: Chung-Wei Foong [MSFT] (chungwf_at_online.microsoft.com)
Date: 03/16/04
- Next message: Torgeir Bakken (MVP): "Re: Set DNS Suffix Search Order - vbscript?"
- Previous message: Otto: "No Dredge to Run"
- In reply to: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Next in thread: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Reply: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 15:02:38 -0800
Just to isolate the problem even further between managed code and unmanaged
code, do you get this exception with wbemtest?
Thanks
-- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Steen Tøttrup" <never@mind.com> wrote in message news:eyIubB4CEHA.2556@TK2MSFTNGP12.phx.gbl... > It's a local connection, so the username/password is never set (I only set > it when it's a remote connection). > > > > > "Chung-Wei Foong [MSFT]" <chungwf@online.microsoft.com> wrote in message > news:uxH5fs3CEHA.1588@tk2msftngp13.phx.gbl... > > Is this a local or remote connection? Does this work if you explicitly > > specify the password and username instead of going through > > System.Configuration.ConfigurationSettings? > > > > -- > > This posting is provided "AS IS" with no warranties, and confers no > rights. > > Use of any included script samples are subject to the terms specified at > > http://www.microsoft.com/info/cpyright.htm > > > > > > "Steen Tøttrup" <never@mind.com> wrote in message > > news:eqGmt92CEHA.684@tk2msftngp13.phx.gbl... > > > > > > Didn't help.! > > > > > > Still same exception, I'm without a clue, but thanks anyway! > > > > > > best regards, > > > Steen > > > > > > > > > "Chung-Wei Foong [MSFT]" <chungwf@online.microsoft.com> wrote in message > > > news:ufGdierCEHA.3928@TK2MSFTNGP09.phx.gbl... > > > > Set AuthenticationLevel to Packet instead of Call to see if it will > work > > > for > > > > you. > > > > > > > > -- > > > > This posting is provided "AS IS" with no warranties, and confers no > > > rights. > > > > Use of any included script samples are subject to the terms specified > at > > > > http://www.microsoft.com/info/cpyright.htm > > > > > > > > "Steen Tøttrup" <never@mind.com> wrote in message > > > > news:u5BOBTfCEHA.1688@TK2MSFTNGP12.phx.gbl... > > > > > > > > > > This is what I'm doing: > > > > > > > > > > ConnectionOptions conOptions = new ConnectionOptions(); > > > > > conOptions.Authentication = AuthenticationLevel.Call; > > > > > conOptions.Impersonation = ImpersonationLevel.Impersonate; > > > > > conOptions.Username = > > > > > > System.Configuration.ConfigurationSettings.AppSettings["DnsUserName"]; > > > > > conOptions.Password = > > > > > > System.Configuration.ConfigurationSettings.AppSettings["DnsPassword"]; > > > > > > > > > > string sServerPath = \\\\myserver\\root\\microsoftdns"; > > > > > ManagementScope oScope = new ManagementScope(sServerPath, > conOptions); > > > > > oScope.Connect(); > > > > > > > > > > and BANG!, a BadImageFormatException is thrown!! > > > > > > > > > > "System.BadImageFormatException: Exception from HRESULT: 0x800700C1. > > > > > at System.Management.ManagementScope.Initialize() > > > > > at System.Management.ManagementScope.Connect()" > > > > > > > > > > > > > > > The "funny" thing is that it works fine when run on the machine I'm > > > > > developing on (Windows 2000 Server), but when moved to the server > it's > > > > meant > > > > > to run on (Windows 2003 Standard), I get the exception. > > > > > > > > > > Please help me, I've got no ideas!! > > > > > > > > > > best regards, > > > > > Steen > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: Torgeir Bakken (MVP): "Re: Set DNS Suffix Search Order - vbscript?"
- Previous message: Otto: "No Dredge to Run"
- In reply to: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Next in thread: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Reply: Steen Tøttrup: "Re: Connect on ManagementScope throws: BadImageFormatException"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|