Groups | Blog | Home
all groups > iis security > january 2007 >

iis security : .net application cannot access metabase.xml iis6


Tessa
1/29/2007 8:22:20 AM
Hi,

I have to modify an existing .net windows application that directly edits
the IIS6 metabase.
(I don't have the option of deciding to use ADSI/WMI in a Script because
it's an existing application).

It's been working fine for a long time up to now on our test servers and our
customers' servers (Windows 2003), but now when I've been testing recently
it I get the error
"Could not find file 'C:\WINDOWS\system32\inetsrv\MetaBase.xml'" when the
application tries to read from or write to the metabase.

I have checked - the file is present in the expected location, the Enable
edit while running flag is on in IIS manager,
the ntfs permissions on the file are for Administrators and SYSTEM to have
full control to metabase.xml, and I am running our .net application while
logged in to the server via remote desktop as an administrator, so I would
expect the application to be running with administrative privileges and
therefore be able to read/write to metabase.xml.

Why is this happening and what do I need to do to fix it?

Thanks for any help

Tessa

Tessa
1/29/2007 4:08:55 PM
Hi,

Thanks for the response,
However, this is an existing .net Windows application that is editing the
metabase.xml, it's not an asp.net application.

I have checked by getting it to write to a log file at runtime the value of
System.Environment.UserDomainName: OURDOMAIN
System.Environment.UserDomainNameUserName: Administrator
so from this I'm concluding that it is running as an administrator (ie. it's
running as the domain admin, which is a member of the administrators group
on the server)

For a windows app, how would you tell if it is actually running with any
lesser privileges than the account specified in system.environment?
I'm not sure how you would see if it's impersonating something else.

It is a 64-bit machine, but it is not configured to run in 32-bit mode as
far as I can tell
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET
W3SVC/AppPools/Enable32bitAppOnWin64 0
has been run on it so according to http://support.microsoft.com/kb/894435 it
ought to be in 64-bit mode ?

How can you tell (e.g. in IIS manager) if IIS is configured to run as
32-bit? In any case, it's not an asp.net application that's trying to edit
metabase.xml , so would that still be significant ?

Thanks for any ideas

Tessa


[quoted text, click to view]

AddThis Social Bookmark Button