I tried using a data URI with this CSS property:
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9JREFUeNpiYGBg8AUIMAAAUgBOUWVeTwAAAABJRU5ErkJggg==");
And locally it works great. However, when I debug the file, chrome is missing. If I try to go to it, I get: a potentially dangerous Request.Path value was detected on the client (:).
Thus, it is obvious that my application considers the URIs for this image to be suspicious.
How can I show it? I tried to mitigate the validation using:
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" /> <pages validateRequest="false"></pages>
Ideally, I would not want to loosen the rules too much, just enough to load these images with data URIs.
security asp.net-mvc-3 data-uri
Nick Apr 16 '13 at 16:50 2013-04-16 16:50
source share