« Previous Next »

Thread: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

Last post 02-11-2009 1:58 AM by neha.noma. 7 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (8 items)

Sort Posts:

  • 08-08-2008, 5:13 AM

    IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

    Hi,
    I have written one sample program to read Metabase entry on IIS 7.0.
    I am using IMSAdminBase->GetData() to read from LM/W3SVC/* level and it was working fine as stand alone application from any admin users account.
    Now when I try to run this executable as CGI under my site, the IMSAdminBase->GetData() call returns E_ACCESSDENIED.

    I am not sure what settings shall I do to make it run on IIS 7.0.

    Please help.

    Thanks,
    Neha

  • 08-08-2008, 6:17 AM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

    For this to be executed the user must have read and write permission on the resource

    To be honest I dint know that this works with IIS 7 .... Did you try web.management  or web.administration API's ... I find them much easier ..


     

    Regards,
    MA Khan
    http://www.iisworkstation.com

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 08-08-2008, 9:33 AM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

     I tried giving full permission, still it fails.

    I have never worked with web.management  or web.administration API's:( And is there any way to specify the read/write permission on Metabase keys?

  • 08-08-2008, 10:24 AM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

     which user are you giving full permissions??

    web.management and web.administration are extensive API's for IIS 7... check these for a few details...

    http://msdn.microsoft.com/en-us/magazine/cc164241.aspx

    http://msdn.microsoft.com/en-us/magazine/cc163453.aspx
     

    Regards,
    MA Khan
    http://www.iisworkstation.com

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 02-09-2009, 5:09 AM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

    Hi,

    After a long time I am again facing the similar problem. I have IIS filter which reads Metabase entries. When I set the App pool identity of my website to Local System / Administrator, it is able to read the Metabase key LM/W3SVC/1/*. However if I set it to "Network Service", it fails and returns error code E_ACCESSDENIED.

    Using the Metabase explorer I tried giving read permission to everyone, still no success. 

    I am not sure where I am wrong. This reading of key was working fine in IIS 6.0. With addded security in IIS 7.0 it fails. Please guide to resolve this issue.

    Thanks,

    Neha

     

     

  • 02-10-2009, 11:18 PM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

     Still struggling with same issue. Please guide.

  • 02-11-2009, 12:45 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

    What site is the filter running for?  Only the administrators and the worker process running site1 will have access to metabase under /LM/w3svc/1.  For IIS7, you should anyway look at using IAppHostAdminManager.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 02-11-2009, 1:58 AM In reply to

    Re: IMSAdminBase->GetData() returns E_ACCESSDENIED on IIS 7

    Filter is added under /LM/w3svc/1 is running for /LM/w3svc/1 only. Since this is the old code base which was working on IIS 6.0, I do not want to move to IAppHostAdminManage.

    It works with application pool's identity as LOCAL system/ Administrator. Problem comes only when I set the identity as Network Service.

Page 1 of 1 (8 items)
Microsoft Communities