Going to close this thread - after a late hour deep device it came down to a Filter that was attached to the controller which did http/cookie/error handling and Windows didn't like it.
Windows 10 MDM - Personalization-csp, DesktopImageUrl setting failing.
Hey all.
I'm currently writing an MDM and I'm trying to send down a URL for the desktop image, but it keeps failing on the download.
I know why - but I'm curious if there's a workaround for this.
The issue is I'm using an MVC project and the file is being returned as a 'FileStreamResult'. Any permanent URLs I use work fine, but if I try to do anything where I'm returning the file via an action if fails to download. I should point out browsing to the image via a browser works fine.
Anyone know how to get this to work without needed a permanent URL?
Example:
This works, because the file is in the root directory:
https://daniel.local.mdm/Background.png
This fails because Homescreens is the controller and the 'GetWallpaperFile' is the action. (I'm using a Route Map to get background.png to point to it)
https://daniel.local.mdm/HomeScreens/GetWallpaperFile/Background.png
The code in the action is:
public ActionResult GetWallpaperFile()
{
return new FileStreamResult(new System.IO.MemoryStream(Convert.FromBase64String(source_of_image)), "image/jpeg");
}
(Using return File(ResponseStream, ContentType) fails as well.)
Now, when I browse to "https://daniel.local.mdm/HomeScreens/GetWallpaperFile/Background.png" on the machine, it loads perfectly fine. But Windows MDM just refuses to accept it as the desktop image URL.
Any help is much appreciated.
2 additional answers
Sort by: Most helpful
-
Rahul Jindal [MVP] 9,141 Reputation points MVP
2021-11-10T22:31:15.807+00:00 What edition of Windows 10 are you working against? Pro or Ent?
-
Dan Meier-Conroy 121 Reputation points
2021-11-10T22:31:51.227+00:00 Currently working with PRO.