Authentication Question

Discussion in 'ASP General' started by Dvand, Mar 17, 2005.

  1. Dvand

    Dvand Guest

    I am attempting to access WMI data on a remote machine. I have been able to
    get this to work, but there has got to be a better way, I hope.

    set wmiLocator = CreateObject("WbemScripting.SWbemLocator")
    Set WMIServices = GetObject("winmgmts://" & cn & "")
    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
    WMIServices.Security_.ImpersonationLevel = 3

    Then in my IIS snapin, Directory Security, and then Edit

    I have this set
    Anon Access with my username and password as well as Windows Integrated
    Authentication checked.

    It does the job, I can pull the data, but it poses a security risk. I don't
    want to have my password and username as the authentication options.
     
    Dvand, Mar 17, 2005
    #1
    1. Advertising

  2. Dvand

    Dvand Guest

    I think I got it where I want. I now just need a input box for the password

    When the page is loaded (schWS.ASP), it will ask for your password, accept
    the password and use the password on the schWS.ASP page. I don't need it
    validated. It will be validated when the WMI data is accessed.

    I think this is easy, but my brain is dead from spending a couple of days
    trying to get to my current point.



    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > turn off anonymous and integrated and leave basic on, then you will have

    to
    > pass in your credentials. See what that gives ya once.
    >
    > --
    > Curt Christianson
    > Site & Scripts: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "Dvand" <> wrote in message
    > news:%...
    > >I am attempting to access WMI data on a remote machine. I have been able
    > >to
    > > get this to work, but there has got to be a better way, I hope.
    > >
    > > set wmiLocator = CreateObject("WbemScripting.SWbemLocator")
    > > Set WMIServices = GetObject("winmgmts://" & cn & "")
    > > Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
    > > WMIServices.Security_.ImpersonationLevel = 3
    > >
    > > Then in my IIS snapin, Directory Security, and then Edit
    > >
    > > I have this set
    > > Anon Access with my username and password as well as Windows Integrated
    > > Authentication checked.
    > >
    > > It does the job, I can pull the data, but it poses a security risk. I
    > > don't
    > > want to have my password and username as the authentication options.
    > >
    > >
    > >

    >
    >
     
    Dvand, Mar 17, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Connell
    Replies:
    1
    Views:
    549
    Natty Gur
    Oct 21, 2003
  2. raj mandadi
    Replies:
    0
    Views:
    433
    raj mandadi
    Dec 22, 2003
  3. Brett Porter
    Replies:
    2
    Views:
    772
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  4. Mark
    Replies:
    0
    Views:
    677
  5. Eric
    Replies:
    2
    Views:
    1,497
    Tommy
    Feb 13, 2004
Loading...

Share This Page