![]() |
web deployment project, web.config section replacement is not work
While debugging why a web.config section replacement was not happening in the
real web application, I tried a simplified case, no replacement is enabled and the connection string is not showing up? Suggestions about what could be happening? The code: Dim rootWebConfig As System.Configuration.Configuration rootWebConfig = System.Web.Configuration.WebConfigurationManager.O penWebConfiguration(Nothing) For Each objConnectionString As System.Configuration.ConnectionStringSettings In _ rootWebConfig.ConnectionStrings.ConnectionStrings lstCS.Items.Add(objConnectionString.Name & "|" & objConnectionString.ConnectionString) Next Puts "LocalSqlServer|data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User Instance=true " into the listbox. The web.config is: <?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings> <add name="test" connectionString="placeholder"/> </connectionStrings> <system.web> <compilation defaultLanguage="vb" debug="true"/> </system.web> </configuration> Thanks, Ira Also posted in ASP.NET forum without response |
| All times are GMT. The time now is 09:56 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.