Skip to Content
.NET Framework Security
book

.NET Framework Security

by Brian A. LaMacchia, Sebastian Lange, Matthew Lyons, Rudi Martin, Kevin T. Price
April 2002
Intermediate to advanced
816 pages
20h 56m
English
Addison-Wesley Professional
Content preview from .NET Framework Security

The Security Stack Walk

The type of stack walk that concerns us here is, of course, the security stack walk. Why would the security system need to walk the stack at all?

Let's take a simple example. Given the following code snippet from assembly MyDatabase,

public class MyDatabase
{
    public void BackupDatabase(String filename)
    {
        FileStream stream = new FileStream(filename, FileMode.Create);
        // Code to save database to newly created file...
    }
}

when the BackupDatabase method calls the constructor for FileStream, a security demand will be initiated to ensure that the caller has sufficient privilege to create the named file. Recall that the .NET Framework security system is primarily based on code access security. In other words, the security demand ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming .NET Security

Programming .NET Security

Adam Freeman, Allen Jones
Pro C# 7: With .NET and .NET Core

Pro C# 7: With .NET and .NET Core

Andrew Troelsen, Philip Japikse
.Net Framework Essentials

.Net Framework Essentials

Thuan L. Thai, Hoang Lam

Publisher Resources

ISBN: 067232184XPurchase book