Enjoy Every Sandwich

Thoughts on SQL, XML, .NET and sometimes beer.

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

Tools

List O'Links

Kent's Other Stuff

Subscriptions

News

Please read these
Notices and Disclamiers

Post Categories

Article Categories



Right Rights still ain't Right?

I'm perplexed, puzzled and pooped. I'm writing a class that is instantiated in Global.ASAX (FX 1.1) which needs to read in both a schema and an XML file when the application starts. Sounds easy enough, right?

Not so fast!

Consider this line of seemingly innocent code (where name = “d:\inetpub\***\rules.xsd”):

fileStream = New IO.FileStream(name, IO.FileMode.Open)

That line generates:

Access to the path "D:\inetpub\***\Rules.xsd" is denied

Okay, sure, I could buy that. So let's so see. I'm not running in an impersonation context, so the context for accessing the file is NT Authority\Network Service...

Problem: Network Service has read permissions on that file... Hrmmm, I say. Hrmmmm. We then, let's try that with Impersonation turned on even though for the scope of Global.ASAX it shouldn't make a difference. Well with that turned on, I don't get the exception even though I should have. Its as if Global.ASAX just said “duhhh...“ The OnStart event dies and default.aspx's page_load fires. Nice.

I'm doing this on IIS6 in an MS Virtual Server 2005 session. This works on IIS5.1, of course. That's gotta mean its CAS that for IIS6 that's given me the problem, right? FX 1.1 and 2.0 are installed, the site is setup for ASP.NET 1.1

Any thoughts on this one?

posted on Tuesday, August 24, 2004 4:16 PM by ktegels





Powered by Dot Net Junkies, by Telligent Systems