Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 37125 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
1. Add <machineKey validation="SHA1" /> to web.config under <configuration>/<system.web>
2. Create sample asp application that queries MachineKeySection as ConfigurationManager.GetSection("system.web/machineKey");
3. Examine Validation property of above section. You will see HMACSHA256 (the default) and not SHA1 as expected.
4. Examine ValidationAlgorithm property. You will see it is properly set as SHA1.
I think this bug has been introduced by commit a22389fde254675e52a9da9c9bcd18afdec29d33 but I haven't verified.
Debugging through the code, it is doing puzzling things, such as Config.AutoGenerate in the static constructor recursively calling back to ConfigurationManager.GetSection which is in the process of creating the instance in the first place. Things somehow get messed up and we end up with a half-parsed instance, even though no less than 4 (four!) constructors have been called. Overkill when we only really want a single instance.
Created attachment 14339 [details]
This seems to work around the issue.