New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HtmlWeb.GetExtensionForContentType throws an exception on .NET Framework 4.5.2 #294
Comments
Hello @alex-jitbit , A runnable project/solution or Fiddle is now required if you would like we look at it. We now always ask for a project sample even if the issue is easy to reproduce. As a free product, we must find some way to save time to offer an overall better experience for everyone and release fixes faster. You can send it to: info@zzzprojects.com if you need to keep the source private Jonathan Performance Libraries Runtime Evaluation |
@JonathanMagnan here's a dotnetfiddle |
Hello @alex-jitbit , Thank you, my developer looked at it but there is not so much we can do. This method requires additional permission to check in the key registry available mime type: html-agility-pack/src/HtmlAgilityPack.Shared/HtmlWeb.cs Lines 992 to 1017 in 3a6f0d2
Honestly, I'm not really sure why it has been done like that as using registry key is mostly always a bad idea for a third party library. What we could do on our side is doing a try/catch and in the catch using a dictionary of all common mime know mime type. Is it something that will work for your scenario? |
I'm not heavily dependent on this bug, just something I stumbled upon. You can simply steal code from MS https://github.com/Microsoft/referencesource/blob/master/System.Web/MimeMapping.cs Or even simply call their method (not sure its good idea since it would add |
Hello @VBWebprofi , The v1.11.4 has been released. Could you try it and let me know if everything is now working as expected? |
Exception
The text was updated successfully, but these errors were encountered: