RMD*_*RMD 7 .net internet-explorer app-config
我需要覆盖Internet Explorer中托管的.NET组件的一些设置.我创建了一个iexplore.exe.config文件并将其放在c:\ program files\internet explorer中.
以下是配置文件:
<configuration>
<system.net>
<webRequestModules>
<remove prefix="http:"/>
<remove prefix="https:"/>
<add prefix="http:" type="MyHttpRequestCreator, MyRequestModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bee8bd1bab54ad99" />
<add prefix="https:" type="MyHttpRequestCreator, MyRequestModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bee8bd1bab54ad99" />
</webRequestModules>
</system.net>
</configuration>
Run Code Online (Sandbox Code Playgroud)
不幸的是,IE似乎完全忽略了这一点.即使我在文件中放入了无效文本,也不会记录任何错误.
如果我将它添加到machine.config,这个相同的配置工作得很好,但我想尽可能将我的覆盖限制为IE.
我尝试启用IEHostLogFile(参见:http://support.microsoft.com/kb/313892),这给了我一些有趣的条目.它表明正在加载远程配置文件:
Microsoft.IE.SecureFactory: Added configuration file: DotNetConfig.xml
Microsoft.IE.SecureFactory: Application base: http://someserver/dotnet/
Microsoft.IE.SecureFactory: Private Bin Path: bin
Microsoft.IE.IDKey: Created key
Microsoft.IE.SecureFactory: Trying to create instance of type http://someserver/dotnet/
SomeApp.DLL#SomeApp.SomeClass
...
Run Code Online (Sandbox Code Playgroud)
我检查了配置文件,并没有覆盖system.net部分,所以我仍然可以提供我的覆盖.我可以尝试修改该文件,但这个解决方案对我不起作用,因为我不希望每个使用此应用程序的人都受到影响,只是特定的机器.
想法?
小智 2
当您将以下内容放入主机网站头部时,也许会有所帮助:
<link rel="Configuration" href="your.config"/>
Run Code Online (Sandbox Code Playgroud)
查看以下链接。你已经很老了,但也许这一点没有改变:
http://msdn.microsoft.com/en-us/library/aa719757(vs.71).aspx
如果这解决了问题,您可以考虑如何仅将其包含在某些机器上。
| 归档时间: |
|
| 查看次数: |
1485 次 |
| 最近记录: |