Questions tagged [asp.net-mvc]
The ASP.NET MVC Framework is an open source web application framework and tooling that implements a version of the model-view-controller (MVC) pattern tailored towards web applications and built upon an ASP.NET technology foundation.
asp.net-mvc
201,312
questions
0
votes
0
answers
6
views
How to make a redirect after Login into Account
I use JWT token, send a request to receive a token, receive a token, how can I make a redirection in a convenient form after successfully completing the authentication procedure? I tried to do this ...
-3
votes
0
answers
16
views
how to add authantication in c# mvc? [closed]
how to add authantication in c# mvc?
how to add authantication in c# mvc?how to add authantication in c# mvc?how to add authantication in c# mvc?how to add authantication in c# mvc?how to add ...
0
votes
0
answers
37
views
Array cannot be null. Parameter name: Bytes
I wrote a .NET Console application to migrate some data. Although the migration seems to complete successfully, the migrated data doesn't work as expected in my MVC project, which is also in .NET. The ...
0
votes
0
answers
34
views
i want text of label when it in datalist
in .net , i have a problem . i want the text of label in datalist and i cant use id because its in datalist and its id is not available in c# or js .i don't can use for to find lable in datalist my ...
0
votes
0
answers
11
views
ASP.NET MVC (blocked:csp) error when running in local
I am getting the (blocked:csp) error in my Chrome browser when my app.
I have the headers set up like this:
HttpContext.Current.Response.Headers.Add("X-Content-Security-Policy",
"...
0
votes
1
answer
45
views
Error during inheritance from RazorPage<TModel>
I want to use localization in AspCore Razor Page.
But, I am encountering the following errors:
CS0108: 'Pages_Index.ViewData' hides inherited member 'RazorPage<IndexModel>.ViewData'. Use the new ...
0
votes
0
answers
36
views
Downloading a zipped version of a folder
I am trying to download a zipped version of a folder by the name XSLT. This is a code that I've written, however the downloaded xslt.zip file cannot be unzipped. When I use a third party application(...
0
votes
2
answers
21
views
How to pass a parameter from one partial view to another
I have a partial view of users with a shop details page. I have added a partial modal to mark users as sickness. This is my partial view of the users:
@model Shop
<div class="mb-3 d-flex ...
0
votes
1
answer
18
views
Unable to open Sql Database project in VS 2022 or 2019
I have VS.Net solution in which multiple projects are there, which all are opening fine, but the SQL Project where we have SQL Files is not opening, if I am trying to open it in VS 2022, it is giving ...
0
votes
1
answer
40
views
WCF service throws error in ASP.NET MVC. Could not establish secure channel for SSL/TLS with authority
First of all there is a ton of question with the same title but I believe my problem is little bit different from other questions. I would like to state that everything where perfectly fine about two ...
0
votes
0
answers
19
views
URL rewrite webconfig settings broke iisexpress
I was doing a merge for another devs app. vs2013 wvc web app ,net 4.5.2.
part of the merge was adding this to the config for url rewrite.
<system.webServer>
<caching enabled ="...
0
votes
1
answer
45
views
In ASP.NET Core, Can't create user due to this error. The instance of entity type cannot be tracked because another instance with the same key value
UserController
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(CreateUserDetailsForm createUser)
{
try
{
// Generate a unique UserID
...
1
vote
1
answer
31
views
Is there any httpClient request to cancel order on API?
I want to Cancel (not delete) order on Shopify as API in my application.
Currently I am using this piece of code to cancel order
public IActionResult Cancel(double? id)
{
_httpClient.BaseAddress = ...
0
votes
1
answer
58
views
How to authenticate an ASP.NET Core Web API using Azure AD token and custom claims from ASP.NET MVC app?
I have two applications: one built with ASP.NET MVC and the other an ASP.NET Core Web API. Users log in to the ASP.NET MVC application using Azure Active Directory (Azure AD). Upon successful login, I ...
0
votes
1
answer
31
views
jquery validate make one field required if another field is not empty
I'm having some issues with jQuery.validate 1.11 , with .Net 4.8 and MVC 5 with Razor.
I have these two properties in my class:
[StringLength(500, ErrorMessage = "{0} can have a max of {1} ...