seahood
❔ ClickOnce install URL that uses query string parameters
Hey! I'm trying to deploy a NET6 WPF ClickOnce application to an Azure blob storage, my issue is, I want the installer to be only available for people who are authorised to access the storage. This is done with query string parameters on the URL (i.e. https://foo.blob.core.windows.net/bar?a=few&security=params).
If i try to plug this URL into the ClickOnce publish profile, once I publish and attempt to run the application, it fails to install because it appears to construct the path to the application file wrong: https://foo.blob.core.windows.net/bar?a=few&security=params/My.application, with the querystring being treated as part of the main URL, instead of the correct URL: https://foo.blob.core.windows.net/bar/My.application?a=few&security=params
Is there any way to resolve this? I feel like i've exhausted all avenues
2 replies
Mapping outgoing enums to a specific shape in Asp.net Core [Answered]
Hello!
I'm trying to find a way to take any outgoing enums in DTOs from an ASP.NET Core API, and map them into a specific shape before they head down the wire. I have an
Enumeration
class that's used by an existing mapper to map enum values to.
I'm using
I've tried looking at implementing a JsonConverter
and it almost works, but falls down when it encounters a nullable enum. There's a built in JsonEnumStringConverter
but that only maps the enum to it's corresponding string.
Current output example from an API endpoint:
Expected output example:
I hope that makes sense? I think I need to find a way to handle the nullable enum situation (or there's an easier way and i'm just going about this all wrong). It's an annoying requirement of this API migration that i'm doing8 replies