
Browser Definition File Security
All browser capability features, including the .NET Framework classes and the browser definition files, require partial trust at the application level, and require full trust at the global level. The global browser definition assembly is signed with a unique machine key before placement in the global assembly cache and cannot be tampered with. The browser definition files in the %SystemRoot%\Microsoft.NET\Framework\version\CONFIG\Browsers directory are protected by access control lists (ACLs) and require administrative privileges to modify.
Browser Definition File Directories
The global Browser directory and the application-level App_Browsers subdirectory should contain only files with the file name extension .browser. Only .browser files are compiled by the ASP.NET browser capabilities feature. Additionally, ASP.NET protects the files in these directories from being served by the Web server and from being accessed by code in other applications.
Browser Definition Files ACLs
The following table lists the ACLs that are set by default on the .browser files located in the %SystemRoot%\Microsoft.NET\Framework\version\CONFIG\Browsers directory. These ACLs are also set on the directory itself, but they include Modify permissions for the CREATOR OWNER group. The directory is read only.
Windows account
|
Permissions
|
|---|
Administrators
|
Full control
|
ASP.NET Machine Account (<server>\ASPNET)
|
Read and Execute
|
CREATOR OWNER
|
Full control
|
IIS_WPG (<server>\IIS_WPG)
|
Read and Execute
|
LOCAL SERVICE
|
Read and Execute
|
NETWORK SERVICE
|
Read and Execute
|
Power Users (<server>\Power Users)
|
Modify
|
SYSTEM
|
Full control
|
Users (<server>\Users)
|
Read and Execute
|
The following table lists the ACLs that should be set on application-level .browser files in the App_Browsers subdirectory.
Windows account
|
Permissions
|
|---|
Administrators
|
Full control
|
IIS_WPG (<server>\IIS_WPG)
|
Read and Execute
|
INTERACTIVE
|
Read
|
Internet Guest Account (<server>\IUSR_<server>)
|
Read
|
NETWORK
|
Read
|
NETWORK SERVICE
|
Read
|
SYSTEM
|
Full control
|
Users (<server>\Users)
|
Read and Execute
|
ASP.NET Web Site Administration Tool account
|
Special
|
Adding Browser Definition Files
Do not download or install browser definition files unless you trust their source. For example, examine a new browser definition file to see if any unfamiliar namespaces are referenced in any of the following attributes:
The markupTextWriterType attribute of the controlAdapters element.
The value attribute of the capability element.
The controlType and adapterType attributes of the adapter element.
For information about valid elements and attributes, see Browser Definition File Schema (browsers Element).
Changing Browser Definition Files
If you add new browser definition files to the global directory or if you make changes to global browser definition files, those changes have no effect until you manually recompile the browser capabilities collection using the Aspnet_regbrowsers.exe tool, available in the %SystemRoot%\Microsoft.NET\Framework\version folder, or programmatically cause recompilation by using the BrowserCapabilitiesCodeGenerator class.
However, you do not need to recompile changes to application-level browser definitions. Changes to those definitions are recompiled and reapplied dynamically.