在终端服务器上安装.net 应用程序时, 启动应用程序时会丢弃此例外 :
System.Configuration.ConfigurationErrorsExceptionMessage = Index 1 is out of range.FullText=
System.Configuration.ConfigurationErrorsException: Index 1 is out of range.
at System.Configuration.ConfigurationElementCollection.BaseGet(Int32 index)
at System.Configuration.ConnectionStringSettingsCollection.get_Item(Int32 index)
The connection string, which is in AppName.exe.config, can not be found. However, the config file is placed at the correct location, next to the .exe file, and the connection string is present in the .config file. This error only happens on terminal server, on XP, Vista, win7 everything runs fine ...
Appname.exe. config :
<?xml version="1.0"?>
<configuration>
<configSections>
...
</configSections>
<connectionStrings>
<add name="..."
connectionString="..." />
<add name="..."
connectionString="..." />
</connectionStrings>
...
发生什么事了?