that looks promising but might require consuming applications to write binders for everything
https://duck.com?id=help&subject=me
That's a string not a context, is there a simple way to convert it to something so I can just go Query["id"] or something similar?
nevermind, typing it out I remember about HttpUtlity ... duh, thanks for being my rubber duck guys
https://docs.microsoft.com/en-us/dotnet/api/system.web.httputility.parsequerystring?view=net-6.0
Hello, I have an asp.net core web application hosted on an azure app service. Is it possible to remote debug this application from visual studio ? I have tried to remote debug an asp.net core web application hosted on an IIS web server. It works fine. But azure app service does not work with IIS. It seems to run dotnet run command. So i don't know how can i remote debug this app. Thanks
i think what you need can be inferred from here https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh?view=vs-2022
nevermind, typing it out I remember about HttpUtlity ... duh, thanks for being my rubber duck guys
https://docs.microsoft.com/en-us/dotnet/api/system.web.httputility.parsequerystring?view=net-6.0
you can also try json to split queries and remake them, i use this approach when i dont have access to httputility
wondering if there's something I could get from dependency injection and give it the request object from the HttpContext and the desired type, and it'd give me a populated instance
so if i understand correctly, you want to DI specific HTTPContext Request query param & get the output based on that? can you put a example request i think what you need is already available using controller conventions and route sniffing
T
and a HttpContext
, I'd like to be able to use some kind of BindToNewInstance<T>()
method that'll give me an instance of T
populated the way it would have been via model binding
so given the argument
T
and aHttpContext
, I'd like to be able to use some kind ofBindToNewInstance<T>()
method that'll give me an instance ofT
populated the way it would have been via model binding
i dont think you can hit HTTPContext or similar pipeline without a proper request route
Hi guys, I am stuck on a unique issue for quite some time. I have a blazor server application and if I change the folder name of default webroot folder and even if specify the new folder using UseWebRoot method, css and js file inside the new webroot folder does not get publised when I do dotnet publish. Have tried quite a lot of things but havent been able to solve it yet. Will appreciate any help
if you are using visual studio (not code) then you can do this using folder property and include as content
Hi guys,
here is some t-sql query i have:
declare @dmin datetime = cast('2022-05-01' as datetime);
declare @dmax datetime = cast('2022-06-01' as datetime);
with core as (
select
productid, AmountInStoreBefore, AmountInStoreAfter
, ROW_NUMBER() over (partition by productid order by created asc) rn
from ProductBatchTransfers
where
created between @dmin and @dmax
)
select
core.productid, core.AmountInStoreBefore,
core2.AmountInStoreAfter
from core
inner join (
select
productid, max(rn) edgern
from core
group by productid
) grp
on core.productid = grp.productid
inner join core core2
on core.productid = core2.productid and grp.edgern = core2.rn
where
core.rn = 1
i think its prety self explanatory, so, the questions are:
1) is there a way to create something similar with entityframework ?
we are talking about .net462
2) Is query good enough or i can improve it somehow (i am realy not enough good in t-sql)
who can tell me what workaround may be for publlicating .net6 project in docker?
i have this structure of folders
dotnet/
--shared-solutions/
----common-solution/
------shared-project-a/
------shared-project-b/
--client-a/
-----project-solution/
-------shared
---------shared-project-a
-------web-api/
---------Docker.file
i am trying to publish web-api
project from project-solution
the project-solution
has reference to common-solution/shared-project-a
and web-api
has reference to shared/shared-project-a
debugging in docker works like a charm but publishing fails with error: the imported project was not found '/shared-solutions/common-solution/shared-project-a' confirm that the expression in the import declaration '../../../shared-solutions/common-solution/shared-project-a' is correct
i think this is because of docker context does not have shared-solutions/**/*
but i am not sure. it strange that debugging works. i thought that docker context builded with respect to shared projects out of solution.
does vs2022 can handle such scenarios? i mean when you build something with links to shared projects laying out of solution folder?
A contributor from the AspNetCore Docs pointed me here, and I hope I might shed some light on a problem I've encountered.
AspNetCore 7 will embrace the ProblemDetails usage (which is good).
But there's no guidance about using the ProblemDetails class in client code.
Referencing the Http.Abstractions DLL in e.g. a Blazor-WASM project seems odd.
Implementing a "copy-cat" class seems unneccesary.
What's the approach people are using? (Perhaps even in combination with nswag client generation and shared Models)