All Questions
36
questions
0
votes
1
answer
1k
views
How to post List of Dictionary
I have a client ( in this case POSTMAN) that is posting collection of object. The properties of the object are not known in advance so I cannot use concrete C# model.
So I am using Dictionary<...
0
votes
1
answer
1k
views
How to make IMemoryCache available in all controllers?
I have followed this tutorial https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory?view=aspnetcore-2.2
It is using Dependency Injection to make IMemoryCache available in specific ...
1
vote
3
answers
3k
views
How do you change the default AntiForgeryToken identifier in asp.net core mvc?
Im trying to use AWS Cognito for my auth in a .Net Core MVC-app.
The login works fine, but none of my forms in the views work, they all give an error about my claims not containing "Name"-Claim.
I ...
2
votes
3
answers
4k
views
Parse Html string with Razor
I have an application which generates dynamic html code with asp.net core tag helpers like
<input type="hidden" asp-for="Id" />
<input asp-for="Name" />
<input asp-for="...
0
votes
2
answers
7k
views
How can I redirect to the View which called another action in .net-core MVC
Im developing a project with ASP.NET Core 2.2 MVC. Here is a view named MyView in which there is a link which calls MyAction action.
<div>
<a asp-controller="Home" asp-action="MyAction"&...
2
votes
1
answer
70
views
Is it inelegant or a bad practice to use <a href in a view in asp.net mvc?
In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.
I have more affinity with pure html than taghelpers or htmlhelpers.
I'd like to ...
0
votes
0
answers
108
views
How to add User Custom Control (.dll develeoped in Net 2.0) in ASP.NET CORE project?
How to add User Custom Control (.dll developed in Net 2.0) in ASP.NET CORE project?
I have added .dlls in assembly under dependencies. I can able to access the properties and methods of dll. but I ...
0
votes
1
answer
2k
views
How to pass model list to controller [duplicate]
I am trying to post a list of objects from View to controller.
Below is my code:
View :
@using Models
@model IList<Add>
@{
ViewData["Title"] = "AddNewFields";
}
&...
2
votes
1
answer
344
views
<asp:PlaceHolder> alternate in mvc Razor page?
I am using razor page in .net core 2.1. In .aspx we can use <asp:PlaceHolder> and write some logic inside it and we can hide or show this placeholder in our .cs class but I wonder how can we ...
0
votes
1
answer
519
views
ASP.Net Core: keep windows authentication
I'm actually working on an website where users login via windows authentication.
My problem is, that actually all users have to login whenever they open our webpage.
I wonder if it is possible to ...
6
votes
2
answers
7k
views
Antiforgery cookie in ASP.NET Core 2.0
I've been trying to understand exactly how the antiforgery works. What confuses me are the cookies which are created. To my understanding, you include the antiforgery token in your form and then you ...
1
vote
1
answer
1k
views
Asp.net core MVC two lists, same model, same controller, two partial views with same model issue
I have two razor page partial views inside of another view. Both are using the same model.
What I'm doing now after a query is:
// get tour data to list to render in _TourenAngebotenPartial.cshtml
...
2
votes
2
answers
1k
views
Mvc Core Dynamically bind Configuration
I am wondering if it is possible to bind a configuration section to an object dynamically. Normally to bind a configuration section we would write code like this:
var section = Configuration....
1
vote
0
answers
4k
views
.NET Core Custom Authorize Filter
I'm developing a new application in MVC .NET Core 2 but I have to use the existing Authentication and Authorization that's used in another application developed in MVC5. It calls a webservice with the ...
2
votes
1
answer
2k
views
Set up limit of Max allowed content length in startup/program settings not working
I want upload more than default ~30MB file on my website app
HTTP Error 404.13 - Not Found The request filtering module is
configured to deny a request that exceeds the request content length.
...