PRB: Application Configuration File on Web Server Is Not Accessible When You Run Executable File in Internet Explorer (322086)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
This article was previously published under Q322086 SYMPTOMSIn Microsoft Internet Explorer, if you run an executable file (EXE) that is located on a
Web server, the EXE file cannot read the
information from the associated application configuration file (.exe.config),
although the configuration file is also located on the Web
server.CAUSEWhen you have ASP.NET installed on your computer, ASP.NET handles all HTTP
requests for configuration files. By default, ASP.NET is
configured not to permit access to configuration files. Therefore, your EXE file is
not permitted to gain access to the corresponding application configuration
file. Note The default configuration settings for your computer are stored
in the machine
configuration file (Machine.config). Machine.config is located in the following folder: Windows Folder\Microsoft.NET\Framework\v1.1.4322\Config RESOLUTIONTo resolve this problem, change your configuration settings
so that your EXE file is permitted to gain access to the application configuration file. To
do this, follow these steps:
- In a text editor (such as Notepad), paste the following code:
<configuration>
<system.web>
<httpHandlers>
<remove verb="*" path="*.config"/>
<add verb="*" path="Web.config" type="System.Web.HttpForbiddenHandler"/>
</httpHandlers>
</system.web>
</configuration> - Name the file Web.config, and then save it in the same folder as your EXE file.
Important If the Web.config file
already exists, add only the <httpHandlers> section to the existing Web.config
file. - In Internet Explorer, run your EXE file.
- Notice that the settings from the application configuration
file are also used. For example, if you run MyApp.exe (you can create MyApp.exe by following the
steps in the "More Information" section of this article), the following text appears in Internet Explorer:
STATUS This
behavior is by design.REFERENCESFor more information, visit the following Microsoft Web
site:
Modification Type: | Major | Last Reviewed: | 5/20/2003 |
---|
Keywords: | KbhttpHandlers kbDownload kbConfig kbprb kbDeployment kbSecurity KB322086 kbAudDeveloper |
---|
|