Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:32:10+00:00 2026-05-16T22:32:10+00:00

I’m writing some code to permit users to remotely manage IIS7. Under the bonnet

  • 0

I’m writing some code to permit users to remotely manage IIS7. Under the bonnet this adds authorisation rules to c:\windows\system32\inetsrv\config\administration.config under the following config section:

system.webServer/management/authorization/authorizationRules

I’m using the Microsoft.Web.Administration assembly and namespace with code similar to the following:

using Microsoft.Web.Management.Server;
...
ManagementAuthorization.Grant("MySiteUser, "My Web Site", false);

This code throws an exception if run in a 32 bit process, if built as 64 bit it runs fine:

System.Runtime.InteropServices.COMException was unhandled
  Message=Filename: \\?\C:\Windows\system32\inetsrv\config\administration.config
Error: The configuration section 'system.webServer/management/authorization' cannot be read because it is missing a section declaration`

However other server management tasks performed using the Microsoft.Web.Administration assembly and namespace work just fine in a 32 bit process, for example:

using Microsoft.Web.Administration;
....
int iisNumber = 60000;
using (ServerManager serverManager = new ServerManager())
{
  var site = serverManager.Sites.Where(s => s.Id == iisNumber).SingleOrDefault();
  if (site != null)
  {
    site.Stop();
  }
}

Both these assemblies appear in the GAC and are pure MSIL (even though there is a COM interop layer to talk directly to IIS7’s underlying management mechanisms).

The underlying configuration files applicationHost.config and administration.config are only visible to 64 bit editors (e.g. notepad.exe or NotePad2.exe) and I suspect that this is why my code can’t modify administration.config via the Microsoft.Web.Management

Why does the Microsoft.Web.Administration allow me to read/modify applicationHost.config in a 32 bit process but Microsoft.Web.Management can only read/modify administration.config if run in a 64 bit process?

I am unable to recompile my project to target x64 because there is a dependency on a 32bit COM library that we don’t have source for. I can build a work around which would involve making calls to an out of process 64 bit WCF app (or some such similar thing) but would prefer not to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:32:11+00:00Added an answer on May 16, 2026 at 10:32 pm

    After some digging it looks like this is a bug:

    This forum thread and a post by Carlos Aguilar explains all:

    http://forums.iis.net/p/1157779/1956471.aspx

    Now I understand the issue, what is
    happening is that Cassini is a 32 bit
    process and that in conjunction of a
    bug in our configuration makes us try
    to load the “redirected” syswow
    (instead of system32) which is the
    reason why we cannot find
    administration.config. Running in 64
    bit process alleviates the problem
    cause there is no “magic” redirection
    and we go to the right folder.

    Any 32 bit process is going to encounter this roadhump.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.