This documentation is archived and is not being maintained.

IsolatedStorageFilePermission Class

Specifies the allowed usage of a private virtual file system. This class cannot be inherited.

Namespace:  System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class IsolatedStorageFilePermission _
	Inherits IsolatedStoragePermission
'Usage
Dim instance As IsolatedStorageFilePermission

The common language runtime (CLR) uses this class to control access to isolated storage.

Isolated storage creates a unique storage area for use by an application or component. It provides true isolation in that the identity of an application uniquely determines the root of a virtual file system, which only that application can access. Thus, each application has its own file area automatically assigned to it. This file area is fully isolated from other applications, making it private to that application.

NoteNote:

There is no effect if you use Assert, PermitOnly, or Deny to add stack modifiers for usage or quota. Usage and quota are determined from evidence and a stack walk is not performed for demands, making the above operations ineffective.

The following example shows the use of members of the IsolatedStorageFilePermission class.

Imports System
Imports System.Security
Imports System.IO
Imports System.IO.IsolatedStorage
Imports System.Security.Permissions
Imports System.Diagnostics

Public Class Demo

    ' Main method. 
    Public Sub Run()
        Try
            Copy_EqualsDemo()
            To_FromXmlDemo()
            GetTypeDemo()
            IntersectDemo()
            UnionDemo()
            ToStringDemo()
            Demand_DenyDemo()
            PermitOnlyDemo()
            UserQuota_UsageDemo()
            IsSubsetOfDemo()
            IsUnrestrictedDemo()
        Catch e As Exception

            Console.WriteLine((ControlChars.Cr + ControlChars.Lf + ControlChars.Lf + "The demo failed due to an unexpected exception" + ControlChars.Cr + ControlChars.Lf + e.ToString()))
        End Try 
    End Sub 'Run

    ' IsUnrestrictedDemo demonstrates the IsolatedStorageFilePermission.IsUnrestricted method. 
    ' IsUnrestrictedDemo displays a comment indicating whether the current permission is unrestricted. 
    Private Sub IsUnrestrictedDemo()
        Console.WriteLine("IsUnrestricted demo.")
        Try 
            Dim isfp As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
            isfp.Demand() ' The permission should be unrestricted.
            Console.WriteLine("Created and demanded the IsolatedStorageFilePermission(PermissionState.Unrestricted)permission.")
            If True <> isfp.IsUnrestricted() Then
                Console.WriteLine("IsUnrestricted demo failed. The IsUnrestricted property value should be 'true'")
            End If

            isfp = New IsolatedStorageFilePermission(PermissionState.None)
            isfp.Demand() ' The permission should not be unrestricted.
            Console.WriteLine("Created and demanded the IsolatedStorageFilePermission(PermissionState.None)permission.")
            If False <> isfp.IsUnrestricted() Then
                Console.WriteLine("IsUnrestricted demo failed. The IsUnrestricted property value should be 'false'")
            End If 
        Catch e As Exception
            Console.WriteLine(("Unexpected exception: " + e.Message))
        End Try 
    End Sub 'IsUnrestrictedDemo

    ' Copy_EqualsDemo demonstrates the Copy and Equals methods. 
    ' Copy creates and returns an identical copy of the current permission. 
    ' Equals compares two permissions and determines whether they are equal. 
    Private Sub Copy_EqualsDemo()
        Console.WriteLine(ControlChars.Lf + "Copy_Equals demo.")
        Console.WriteLine("Creating the first IsolatedStorageFilePermission(PermissionState.Unrestricted) permission.")
        Dim first As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Console.WriteLine(("Hashcode for the first permission : " + first.GetHashCode().ToString()))
        Console.WriteLine("Copying the first permission.")
        Dim copyOfFirst As IsolatedStorageFilePermission = CType(first.Copy(), IsolatedStorageFilePermission)
        Console.WriteLine(("Hashcode for copy of the first permission: " + copyOfFirst.GetHashCode().ToString()))
        If False = copyOfFirst.Equals(first) Then ' This should be false, because the object references are different.
            Console.WriteLine(("The copy and the first permission should not be equal because they have " + ControlChars.Lf + ControlChars.Tab + "different object references."))
        Else
            Console.WriteLine(("Error: the copy and the first permission should not be equal because they have " + ControlChars.Lf + ControlChars.Tab + "different object references."))
        End If

        Console.WriteLine(("Does a comparison of copy of first permission to itself test equal??: " + IIf(copyOfFirst.Equals(copyOfFirst), "true", "false")))
        If False = copyOfFirst.Equals(copyOfFirst) Then
            Console.WriteLine("Copy_Equals demo failed because Equals returns false on two object.Equals(itself).")
        End If

        Console.WriteLine(("Does a comparison of first permission to itself test equal?: " + IIf(first.Equals(first), "true", "false")))
        If False = first.Equals(first) Then
            Console.WriteLine("Copy_Equals demo failed, because Equals returns false on two object.Equals(itself).")
        End If
        Console.WriteLine("Creating a second permission with PermissionState.None.")
        Dim second As New IsolatedStorageFilePermission(PermissionState.None)

        Console.WriteLine(("Does the first permission equal the second permission?: " + IIf(first.Equals(second), "true", "false")))
        If True = first.Equals(second) Then
            Console.WriteLine("Copy_Equals demo failed because Equals returns false on two object.Equals(itself).")
        End If 
    End Sub 'Copy_EqualsDemo

    ' To_FromXmlDemo demonstrates ToXml and FromXml. 
    ' ToXml creates an XML encoding of the permission and its current state. 
    ' FromXml reconstructs a permission with a specified state from an XML encoding. 
    Private Sub To_FromXmlDemo()
        Console.WriteLine(ControlChars.Lf + "To_FromXML demo.")
        Dim firstPermission As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Console.WriteLine(("First permission: " + firstPermission.ToString()))
        Dim se As SecurityElement = firstPermission.ToXml()
        Dim secondPermission As New IsolatedStorageFilePermission(PermissionState.None)
        Console.WriteLine(("Second permission: " + secondPermission.ToString()))
        secondPermission.FromXml(se)
        Dim thirdPermission As IsolatedStorageFilePermission = CType(secondPermission.Intersect(firstPermission), IsolatedStorageFilePermission)
        Console.WriteLine(("Intersection of first permission and second permission: " + thirdPermission.ToString()))

        Try 
            If False = thirdPermission.IsUnrestricted() Then
                Console.WriteLine("To_FromXml demo failed: The ToXml, FromXml roundtrip did not succeed.")
            End If 
        Catch e As Exception
            Console.WriteLine("To_FromXml demo failed: An exception was thrown when checking the intersection")
            Console.WriteLine("of the permissions after the XML roundtrip.")
            Console.WriteLine(e.ToString())

            Console.WriteLine(e.ToString())
        End Try 
    End Sub 'To_FromXmlDemo

    ' GetType demonstrates the GetType method. 
    ' This method returns the type of the current instance. 
    Private Sub GetTypeDemo()
        Console.WriteLine(ControlChars.Lf + "GetType demo.")
        Dim isfp As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp1 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)

        If 0 <> isfp.GetType().ToString().CompareTo("System.Security.Permissions.IsolatedStorageFilePermission") Then
            Console.WriteLine(("GetType returned the wrong value: " + isfp.GetType().ToString()))
        Else
            Console.WriteLine(("GetType returned: " + isfp.GetType().ToString()))
        End If 
    End Sub 'GetTypeDemo

    ' IntersectDemo demonstrates the Intersect method. 
    ' CIntersect creates and returns a permission that is the intersection of the current permission 
    ' and the specified permission. 
    ' Note  The intersection of two PermissionState.None permissions *IS* null.  
    Private Sub IntersectDemo()
        Console.WriteLine(ControlChars.Lf + "Intersect demo.")
        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp1 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp2 As New IsolatedStorageFilePermission(PermissionState.None)
        Dim isfp3 As New IsolatedStorageFilePermission(PermissionState.None)

        Dim t As IsolatedStorageFilePermission = CType(isfp0.Intersect(isfp1), IsolatedStorageFilePermission)
        If True = t.IsUnrestricted() Then
            Console.WriteLine("The intersection of two PermissionState.Unrestricted permissions is unrestricted.")
        Else
            Console.WriteLine(("Intersect demo failed because the intersection of two unrestricted permissions " + ControlChars.Lf + ControlChars.Tab + "should be unrestricted."))
        End If

        t = CType(isfp0.Intersect(isfp2), IsolatedStorageFilePermission)
        If False = t.IsUnrestricted() Then
            Console.WriteLine(("The intersection of a PermissionState.Unrestricted and " + ControlChars.Lf + ControlChars.Tab + "PermissionState.None permission is not unrestricted."))
        Else
            Console.WriteLine(("Intersect demo failed because the intersection of a unrestricted and " + ControlChars.Lf + ControlChars.Tab + "none permission should be none."))
        End If 


        ' The permission set that comes back from this intersection is null.
        t = CType(isfp2.Intersect(isfp3), IsolatedStorageFilePermission)
        If Nothing Is t Then
            Console.WriteLine("The intersection of two PermissionState.None permissions is null.")
        Else
            Console.WriteLine(("Intersect failed because the intersection of two PermissionState.None permissions " + ControlChars.Lf + ControlChars.Tab + "should be null."))
        End If 
    End Sub 'IntersectDemo

    ' UnionDemo demonstrates the Union method. 
    ' Union creates a permission that is the union of the current permission and the specified permission. 
    ' Note: The union of two PermissionState.None permissions is *NOT* null. 
    Private Sub UnionDemo()
        Console.WriteLine(ControlChars.Lf + "Union demo.")
        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp1 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp2 As New IsolatedStorageFilePermission(PermissionState.None)
        Dim isfp3 As New IsolatedStorageFilePermission(PermissionState.None)

        Dim t As IsolatedStorageFilePermission = CType(isfp0.Union(isfp1), IsolatedStorageFilePermission)
        If True = t.IsUnrestricted() Then
            Console.WriteLine("The union of two PermissionState.Unrestricted permissions is unrestricted.")
        Else
            Console.WriteLine(("Union demo failed because the union of two PermissionState.Unrestricted permissions " + ControlChars.Lf + ControlChars.Tab + "should be unrestricted"))
        End If

        t = CType(isfp0.Union(isfp2), IsolatedStorageFilePermission)
        If True = t.IsUnrestricted() Then
            Console.WriteLine(("The union of a PermissionState.Unrestricted and a PermissionState.None " + ControlChars.Lf + ControlChars.Tab + "permission is unrestricted."))
        Else
            Console.WriteLine(("Union demo failed because the union of a PermissionState.Unrestricted and a " + ControlChars.Lf + ControlChars.Tab + "PermissionState.None permission should be unrestricted."))
        End If


        t = CType(isfp2.Union(isfp3), IsolatedStorageFilePermission)
        If Nothing Is t Then
            Console.WriteLine("Union failed because the union of two PermissionState.None permissions should not be null.")
            Console.WriteLine(t.ToString())
        Else
            Console.WriteLine("The union of two PermissionState.None permissions is none.")
        End If 
    End Sub 'UnionDemo

    ' ToStringDemo demonstrates the ToString method. 
    ' ToString creates and returns a string representation of the current permission object. 
    Private Sub ToStringDemo()
        Console.WriteLine(ControlChars.Lf + "ToString demo.")
        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim PermString As [String] = isfp0.ToString()

        Dim PermStringParts As [String]() = {"class=", "mscorlib", "Version=", "Culture=", "PublicKeyToken=", "version=", "Unrestricted="}


        Dim part As [String]
        For Each part In PermStringParts
            If PermString.IndexOf(part) >= 0 Then
                Console.WriteLine((part + " found in the string."))
            Else
                Console.WriteLine("ToString demo failed because [{0}] was not found.", part)
            End If 
        Next part
    End Sub 'ToStringDemo

    ' Demand_Deny demonstrates Demand and Deny. 
    ' Demand forces a SecurityException at run time if all callers higher in the call stack  
    ' have not been granted the permission specified by the current instance. 
    ' Deny prevents callers higher in the call stack from using the code that calls this method to  
    ' access the resource specified by the current instance. 
    Private Sub Demand_DenyDemo()
        Console.WriteLine(ControlChars.Lf + "Demand_Deny demo.")
        Console.WriteLine("Denying a permission with PermissionState.Unrestricted.")
        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        isfp0.Deny()
        Try
            Console.WriteLine("Denying permission a second time.")
            isfp0.Deny()
        Catch e As SecurityException
            Console.WriteLine("SecurityException was thrown as expected.")
        Catch e As Exception
            Console.WriteLine(("Demand_Deny demo failed because an unexpected exception was thrown" + ControlChars.Lf + ControlChars.Tab + "when making a second call to Deny()" + ControlChars.Cr + ControlChars.Lf + e.ToString()))
        End Try
        Console.WriteLine("Reverting the deny.")
        IsolatedStorageFilePermission.RevertDeny()

        If 0 <> DoDemand() Then
            Console.WriteLine("Demand_Deny demo failed because an unexpected exception was thrown during a demand.")
        End If

        isfp0.Deny()
        If 1 <> DoDemand() Then
            Console.WriteLine("Demand_Deny demo failed because the expected SecurityException was not thrown during a demand.")
        End If

        IsolatedStorageFilePermission.RevertDeny()
        If 0 <> DoDemand() Then
            Console.WriteLine("Demand_Deny demo failed because an unexpected exception was thrown during a demand.")
        End If 
    End Sub 'Demand_DenyDemo

    ' PermitOnly demonstrates the PermitOnly method. 
    ' PermitOnly prevents callers higher in the call stack from using the code that calls this method to  
    ' access all resources except for the resource specified by the current instance. 
    Private Sub PermitOnlyDemo()
        Console.WriteLine(ControlChars.Lf + "PermitOnly demo.")

        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        isfp0.Demand()
        isfp0.PermitOnly()
        Try
            isfp0.PermitOnly()
        Catch e As SecurityException
            Console.WriteLine("The second call to PermitOnly caused an exception as expected.")
        Catch e As Exception
            Console.WriteLine(("PermitOnly demo failed because an unexpected exception was thrown" + ControlChars.Lf + ControlChars.Tab + "when making a second call to PermitOnly()" + ControlChars.Cr + ControlChars.Lf + e.ToString()))
        End Try

        IsolatedStorageFilePermission.RevertPermitOnly()
        If 0 <> DemandUI() Then
            Console.WriteLine("PermitOnly demo failed because an exception was thrown during a demand for UI permissions.")
            Console.WriteLine("We weren't expecting this.")
        End If

        isfp0.PermitOnly()
        If 1 <> DemandUI() Then
            Console.WriteLine(("PermitOnly demo failed because a SecurityException was not thrown, " + ControlChars.Lf + ControlChars.Tab + "during a demand for UI permissions.  A SecurityException was expected."))
        End If


        IsolatedStorageFilePermission.RevertPermitOnly()
        If 0 <> DoDemand() Then
            Console.WriteLine("PermitOnly failed because an exception was thrown during a demand for UI permissions.")
            Console.WriteLine("We weren't expecting this.")
        End If 
    End Sub 'PermitOnlyDemo

    ' UserQuota_UsageDemo demonstrates UserQuota and UsageAllowed properties. 
    ' UserQuota gets or sets the quota on the overall size of each user's total store.   
    ' This property is inherited from IsolatedStoragePermission.UserQuota. 
    ' UsageAllowed gets or sets the type of isolated storage containment allowed.   
    ' This property is inherited from IsolatedStoragePermission.UsageAllowed. 
    ' Note  You can set UsageAllowed to None, but you cannot set UserQuota to 0. 
    ' Also note that trying to set UsageAllowed or UserQuota to values that are currently set 
    ' will throw an exception.  
    <IsolatedStorageFilePermissionAttribute(SecurityAction.Deny, _
    UsageAllowed:=IsolatedStorageContainment.DomainIsolationByRoamingUser, UserQuota:=100)> _
   Private Sub UserQuota_UsageDemo()
        Console.WriteLine(ControlChars.Lf + "UserQuota_Usage demo.")
        Dim returnValue As Boolean = False 

        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.None)

        Console.WriteLine("Checking UsageAllowed for IsolatedStorageContainment.None")
        returnValue = UsageAllowed(isfp0, IsolatedStorageContainment.None, False)
        If Not returnValue Then
            Console.WriteLine("IsolatedStorageContainment.None demo failed")
        End If

        Console.WriteLine("Checking UsageAllowed for IsolatedStorageContainment.DomainIsolationByRoamingUser.")
        returnValue = UsageAllowed(isfp0, IsolatedStorageContainment.DomainIsolationByRoamingUser, True)
        If Not returnValue Then
            Console.WriteLine("IsolatedStorageContainment.DomainIsolationByRoamingUser failed")
        End If

        Console.WriteLine("Checking UsageAllowed for IsolatedStorageContainment.AssemblyIsolationByUser.")
        returnValue = UsageAllowed(isfp0, IsolatedStorageContainment.AssemblyIsolationByUser, True)
        If Not returnValue Then
            Console.WriteLine("IsolatedStorageContainment.AssemblyIsolationByUse failed")
        End If

        Console.WriteLine("Requesting UserQuota of 0.")
        returnValue = UserQuota(isfp0, 0, True)
        If Not returnValue Then
            Console.WriteLine("UserQuota 0 failed")
        End If

        Console.WriteLine("Requesting UserQuota of 100.")
        returnValue = UserQuota(isfp0, 100, True)
        If Not returnValue Then
            Console.WriteLine("UserQuota 100 failed")
        End If

        Console.WriteLine("Requesting UserQuota of -2147483648.")
        returnValue = UserQuota(isfp0, -2147483648, True)

        If Not returnValue Then
            Console.WriteLine("UserQuota -214748364 failed")
        End If 
    End Sub 'UserQuota_UsageDemo

    ' IsSubsetOfDemo demonstrates the IsSubsetOf method. 
    ' IsSubsetOf determines whether the current permission is a subset of the specified permission. 
    Private Sub IsSubsetOfDemo()
        Console.WriteLine(ControlChars.Lf + "IsSubsetOf demo.")

        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.None)
        Dim isfp1 As New IsolatedStorageFilePermission(PermissionState.None)
        Dim isfp2 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Dim isfp3 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)

        If isfp0.IsSubsetOf(isfp1) Then
            Console.WriteLine("PermissionState.None is a subset of PermissionState.None.")
        Else
            Console.WriteLine("IsSubsetOfDemo failed: PermissionState.None should be a subset of PermissionState.None")
        End If 

        If isfp0.IsSubsetOf(isfp2) Then
            Console.WriteLine("PermissionState.None is a subset of PermissionState.Unrestricted.")
        Else
            Console.WriteLine("IsSubsetOfDemo failed: PermissionState.None should be a subset of PermissionState.Unrestricted")
        End If 

        If Not isfp2.IsSubsetOf(isfp0) Then
            Console.WriteLine("PermissionState.Unrestricted is not a subset of PermissionState.None.")
        Else
            Console.WriteLine(("IsSubsetOfDemo failed: PermissionState.Unrestricted should not be a subset " + ControlChars.Lf + ControlChars.Tab + "of PermissionState.None"))
        End If 

        If isfp2.IsSubsetOf(isfp3) Then
            Console.WriteLine("PermissionState.Unrestricted is a subset of PermissionState.Unrestricted.")
        Else
            Console.WriteLine(("IsSubsetOfDemo failed: Permissionstate.Unrestricted should be a subset of " + ControlChars.Lf + ControlChars.Tab + "PermissionState.Unrestricted"))
        End If 
    End Sub 'IsSubsetOfDemo

    ' ********************************************************************** 
    ' The following methods are simple helper functions. 
    ' ********************************************************************** 
    ' ********************************************************************** 
    ' UserQuota 
    ' Sets UserQuota to the value that was passed in. 
    
    Private Function UserQuota(ByVal isfp As IsolatedStorageFilePermission, ByVal user_quota As Integer, ByVal exception_expected As Boolean) As Boolean 
        Dim ExceptionCaught As Boolean = False
        isfp.UserQuota = user_quota

        Try
            isfp.Demand()
        Catch e As Exception
            ExceptionCaught = True 
            If Not exception_expected Then
                Console.WriteLine("An unexpected exception was thrown when setting UserQuota value [{0}]", user_quota.ToString())
                Console.WriteLine(("Exception: " + ControlChars.Cr + ControlChars.Lf + e.ToString()))
            End If 
        End Try 

        If Not ExceptionCaught AndAlso exception_expected Then
            Console.WriteLine("An expected exception not thrown when setting UserQuota value [{0}]", user_quota.ToString())
        End If 

        Return True 
    End Function 'UserQuota


    ' ********************************************************************** 
    ' UsageAllowed 
    ' This method sets UsageAllowed to the value that was passed in. 
    
    Private Function UsageAllowed(ByVal isfp As IsolatedStorageFilePermission, ByVal isc As IsolatedStorageContainment, ByVal exception_expected As Boolean) As Boolean 
        Dim ExceptionCaught As Boolean = False
        isfp.UsageAllowed = isc
        Try
            isfp.Demand()
        Catch e As Exception
            ExceptionCaught = True 
            If Not exception_expected Then

                Console.WriteLine("An unexpected exception was thrown when setting IsolatedStorageContainment value [{0}]", isc.ToString())
                Console.WriteLine(("Exception: " + ControlChars.Cr + ControlChars.Lf + e.ToString()))
            End If 
        End Try 

        If Not ExceptionCaught AndAlso exception_expected Then
            Console.WriteLine("An expected exception was not thrown when setting IsolatedStorageContainment value [{0}]", isc.ToString())
        End If 

        Return True 
    End Function 'UsageAllowed



    ' ********************************************************************** 
    ' DoDemand() 
    ' This method demands an IsolatedStorageFilePermission. 
    Private Function DoDemand() As Integer 
        Dim ReturnValue As Integer = 0
        Dim isfp0 As New IsolatedStorageFilePermission(PermissionState.Unrestricted)
        Try
            isfp0.Demand()
        Catch e As SecurityException
            ReturnValue = 1
        Catch e As Exception
            Console.WriteLine(("An unexpected exception was thrown in DoDemand" + ControlChars.Cr + ControlChars.Lf + e.ToString()))
            ReturnValue = -1
        End Try 

        Return ReturnValue
    End Function 'DoDemand


    ' ********************************************************************** 
    ' DemandUI() 
    ' This method demands a UIPermission 
    ' Returns: 
    '    0 if the demand was successful. 
    '    1 if a SecurityException was thrown. 
    '    -1 if an unexpected exception was thrown. 
    
    Private Function DemandUI() As Integer 
        Dim ReturnValue As Integer = 0
        Dim MyPermission As New UIPermission(PermissionState.Unrestricted)
        Try
            MyPermission.Demand()
        Catch e As SecurityException
            ReturnValue = 1
        Catch e As Exception
            Console.WriteLine(("An unexpected exception was thrown in DemandUI" + ControlChars.Cr + ControlChars.Lf + e.ToString()))
        End Try 

        Return ReturnValue
    End Function 'DemandUI

    Public Overloads Shared Function Main(ByVal args() As [String]) As Integer 
        Dim MyDemo As New Demo

        MyDemo.Run()
        Return 0
    End Function 'Main
End Class 'Demo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: