Monday, April 10, 2006 11:33 AM
I have a simple page which displays the current users active roles. Silly me, I thought a good name would be 'Roles'.
Turns out, this caused a namespace collision, I think, with the static class System.Web.Security.Roles. The namespace 'System.Web.Security' is included by default with ASP.NET 2.0 code-behinds. Also of interest, by default there are no namespace regions with code-behinds. Not wanting to stray from the typified lazy developer, I left this as-is. Hey, Microsoft knows best.
This error only appeared on the release to production, as I chose the 'Publish Web Site' deployment method, where I was using the 'Copy Web Site' deployment method to our QA server. For some reason, only the former method yields this error.
The fix? Changed 'Roles' to '_Roles'. Alternatively, I could have enclosed the class in a namespace.