ventaur / securityswitch

Security Switch enables various ASP.NET applications to automatically switch requests for pages/resources between the HTTP and HTTPS protocols without the need to write absolute URLs in HTML markup.
Other
2 stars 0 forks source link

Nuget install inserts redundant code block into web.config #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Visual Studio 2012 Pro, I installed securitySwitch using the NuGet package 
manager.

I already had some httpModules configured in system.web, and I had web.config 
open in VS. NuGet installed securitySwitch and I received a "web.config has 
been changed...reload?" message, which I acknowledged.

When I ran the project I received a compilation error:

"Config section 'system.web/httpModules' already defined. Sections must only 
appear once per config file. See the help topic <location> for exceptions "

When I looked at the web.config closely, I saw that a new httpModules section 
had been added with securitySwitch in it, followed by an 
</system.web><system.web> and a continuation of that section (see attached 
pic). I had to manually move securitySwitch into the existing httpModules 
section and delete the redundant code, and then it worked fine.

Not sure if this is a NuGet package installer issue, or something in the 
securitySwitch package itself...I've never seen this happen before.

Original issue reported on code.google.com by enighost...@gmail.com on 10 Oct 2013 at 8:12

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. I'm not sure what this problem is, but I've had one other person report 
this in the past year or so. I filed a bug with Nuget a while back, but think I 
may just switch to the actual XDT transform method instead to avoid this from 
happening.

Original comment by vent...@gmail.com on 10 Oct 2013 at 8:31

GoogleCodeExporter commented 9 years ago

Original comment by vent...@gmail.com on 24 Aug 2014 at 10:38