Microsoft KB Archive/816762

= FIX: The application configuration file cannot be downloaded from the Web server when you start a Web-based application that you deployed by using Internet Explorer =

Article ID: 816762

Article Last Modified on 5/12/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.0

-





SYMPTOMS
When you try to start a Web-based application that has an application configuration file in Microsoft Internet Explorer, the application configuration file cannot be downloaded from the Web server.



CAUSE
This problem may occur when anonymous access is turned off on the Web server.



Hotfix information
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites
The .NET Framework 1.0 Service Pack 2 is required before you can apply this hotfix.

To obtain the .NET Framework 1.0 Service Pack 2, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/netframework/aa569276.aspx

Installation information
Install this hotfix on your client computer. Do not install this hotfix on your Web server.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date        Time   Version            Size    File name - 01-May-2003 12:42  1.0.3705.415       20,480  Perfcounter.dll 01-May-2003 12:42  1.0.3705.415    1,175,552  System.dll 01-May-2003 12:42  1.0.3705.415      311,296  System.runtime.remoting.dll 01-May-2003 12:42  1.0.3705.415      503,808  System.web.services.dll 01-May-2003 12:42  1.0.3705.415       61,440  System.web.services.resources.dll



WORKAROUND
Warning This workaround may make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We do not recommend this workaround but are providing this information so that you can implement this workaround at your own discretion. Use this workaround at your own risk.

To work around this problem, manually turn on anonymous access on the Web server.
 * 1) On the Web server, click Start, click Run, type inetmgr, and then click OK.
 * 2) Locate the Web site or the virtual directory, right-click the Web site or the virtual directory, and then click Properties.
 * 3) Click Directory Security, and then click Edit under Authentication and access control.
 * 4) Click to select the Enable anonymous access check box, and then click OK.

Note If you do not want to turn on anonymous access, install the hotfix to resolve this problem.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the problem
To reproduce the problem, you must use a user account that belongs to the Administrators group on your computer.

Step 1: Create a Microsoft Windows-based form application that has an application configuration file
 Start Visual Studio .NET. On the File menu, point to New, and then click Project. Click Visual C# Projects under Project Types, and then click Windows Application under Templates. Name the project Q816762 . In Solution Explorer, right-click the project name, and then click Add New Item.</li> In the Add New Item list, select XML File.</li> In the Name box, type App.config, and then click Open.</li> Double-click the App.config file to open it.</li>  Replace the code in the App.config file with the following code. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?> <appSettings> <add key=&quot;Key0&quot; value=&quot;Hello world!&quot; /> </appSettings> </li> Right-click Form1.cs in Solution Explorer, and then click View Code.</li> Follow these steps: <ol style="list-style-type: lower-alpha;">  Locate the following statement in the code window. using System.Data; </li>  Add the following statement in the code window after the code that is described in step 10a. using System.Configuration; </li></ol> </li> Double-click Form1.cs in Solution Explorer.</li> Add a label control to Form1.</li> Right-click Form1.cs in Solution Explorer, and then click View Code.</li> Follow these steps: <ol style="list-style-type: lower-alpha;">  Locate the following statement in public Form1. InitializeComponent; </li>  Add the following statement in the code window after the statement that you located in step 14a. string sAttr; sAttr = ConfigurationSettings.AppSettings.Get(&quot;Key0&quot;); label1.Text=sAttr; </li></ol> </li> Press F5 to build and to run the application.</li></ol>

Step 2: Disable anonymous access in Microsoft Internet Information Services (IIS) 6.0
<ol> Copy the Q816762.exe file and the Q816762.exe.config file that you created in the &quot;Create a Microsoft Windows-based form application that has an application configuration file&quot; section to the following location:



</li> <li>Click Start, click Run, type inetmgr, and then click OK.</li> <li>Expand  (local computer), expand Web sites, right-click Default Web Site, and then click Properties.</li> <li>Click the Directory Security tab in the Default Web Site Properties dialog box, and then click Edit in the Authentication and access control area.</li> <li>Click to clear the Enable anonymous access check box if it is selected.</li> <li>Click to select the Integrated Windows authentication check box if it is not selected.</li></ol>

Step 3: Run the application in Internet Explorer

 * Click Start, click Run, type http://localhost/q816762.exe, and then click OK.

You expect to see Form1 with the &quot;Hello world!&quot; string in it. However, Form1 does not contain a string.

<div class="references_section">