Microsoft KB Archive/815188

= PRB: WebForm in the Bin Folder of an ASP.NET Application Is Accessible in Windows Server 2003 =

Article ID: 815188

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft ASP.NET 1.1
 * Microsoft ASP.NET 1.0
 * Microsoft Visual Basic .NET 2003 Standard Edition
 * Microsoft Visual Basic .NET 2002 Standard Edition
 * Microsoft Visual C# .NET 2003 Standard Edition
 * Microsoft Visual C# .NET 2002 Standard Edition
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Web Edition
 * Microsoft Windows Small Business Server 2003 Premium Edition
 * Microsoft Windows Small Business Server 2003 Standard Edition
 * Microsoft Windows XP Professional for Itanium-based systems

-



SYMPTOMS
When you request a WebForm in Internet Explorer from the Bin folder of an ASP.NET Web application, and your computer is running Windows Server 2003, the WebForm appears successfully (you do not receive an error message). However, when you request the WebForm from an application that is hosted on a computer running Windows 2000 or Windows XP, you receive one of the following error messages:

The page cannot be displayed

-or-

HTTP 403.1 Forbidden: Execute Access Forbidden



CAUSE
By default, when you create an ASP.NET application on a computer running Microsoft Internet Information Server 5.0 (IIS 5.0), the Execute permissions for the Bin folder in IIS are set to None. Also, the Bin folder does not have Read permissions in IIS. Because of these settings, you receive an error message when you try to gain access to a WebForm in the Bin folder.

By default in IIS 6.0, the Execute permissions of the Bin folder are set to Scripts only. Therefore, you can gain access to the WebForm that is located in the Bin folder of your Web application.



WORKAROUND
To work around this problem, set the Execute permissions of the Bin folder in IIS 6.0 to None. To do this, follow these steps:
 * 1) Click start, and then click Run.
 * 2) In the Open text box, type inetmgr, and then click OK.
 * 3) Expand (local computer), and then expand Web Sites.
 * 4) Expand Default Web Site. Locate your Web application, and then expand it.
 * 5) Right-click bin, and then click Properties.
 * 6) Click the Directory tab. In the Execute permissions drop-down list box, click None.
 * 7) Verify that the Read check box is not selected.
 * 8) Click OK to save the settings.

Note Microsoft does not recommend that you use the Bin folder to store uncompelled ASPX pages. The Bin folder stores the binary files that are not included in the global assembly cache.



STATUS
This behavior is by design.



Steps to Reproduce the Behavior

 * 1) On a computer running Windows Server 2003, start Microsoft Visual Studio .NET.
 * 2) Create a new ASP.NET Web Application by using Visual Basic .NET or Visual C# .NET. By default, WebForm1 is created.
 * 3) Drag a Button control from the Toolbox to WebForm1.
 * 4) On the View menu, click Solution Explorer.
 * 5) On Project menu, click Show All Files.
 * 6) In Solution Explorer, move WebForm1.aspx to the bin folder.
 * 7) Right-click WebForm1.aspx, and then click Set As Start Page.
 * 8) On the Debug menu, click Start.

