Quantcast
Channel: Active questions tagged asp.net-mvc - Stack Overflow

Attach JWT Token to ASP.NET MVC controller actions

I am busy testing solutions for a integration between multiple projects where a JWT token is stored in session storage for an ASP.NET MVC application. I am in need of the next steps I need to take as...

View Article



Didn't find Login page without declaration of _Layout in asp.net core mvc 6,7

I've a fully custom _Layout page in location "~/Views/Shared/".@if(User.Identity.IsAuthenticated){<!-- dashbaord layout --><!-- dashboard side bar --><!-- dashboard header --><!--...

View Article

Image may be NSFW.
Clik here to view.

Constant errors with .cshtml files, but project builds successfully

My project is a solution with ASP.NET MVC Visual studio 2019.I have quite a weird deal, I have a fully buildable and runnable project, but in visual studio I get constant errors especially in my...

View Article

In Program.cs Uri is empty while is running

When I startup the application everything is okay.But sometime while the application is running this error appearce after an api call,it look like the problem appearce not during some call but after...

View Article

Convert string to PDF ASP.NET MVC

I use these two functions to convert the string I pass into a PDF file and then download it. However, when I download a large string, the web crashes immediately, so how do I fix my code? to convert...

View Article


Table header shifting the right after clicking button

I have a table that works beautifullly but for some reason when I click on my testing button the table headers shift to the right. I tried using `style="position:fixed" and I tried taking out the thead...

View Article

Unable to create a 'DbContext' of type ''.The exception'Unable to resolve...

Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[Magazin_Online.Data.AppDbContext]' while attempting to...

View Article

How to load partial view in Bootstrap Modal Popup and pass parameter to...

There is a problem to load partial view in Bootstrap Modal popup. Can I pass prodId as parameter to modal popup as well?Controller Action :[AcceptVerbs(HttpVerbs.Get)]public ActionResult Details(string...

View Article


Using Jwt and cookies together for authentication

I have managed to create the jwt token, but I am not sure where should I store it. I have seen many online websites talking about storing the jwt token in the cookie, but I not sure if it is the right...

View Article


How to combine two query results together in C# & ASP.NET MVC controller

I have a table called Complaint_Log and the relevant column names in it are CompanyName and ContactPerson.What I'm trying to do is generate a partial view for my dash page of a table that loops through...

View Article

How can add drop-down from other table in my kendo grid

So I want to drop-down of the items that are present in other table and I want them in my kendo grid using asp.net Mvc so how can I do that ?I tried to take 2 columns name in my main model from the...

View Article

i dont know how can i add dropdown , image ,checkbox and also radio button in...

I'm working on an ASP.NET MVC application and I'm looking to enhance the user experience by adding image upload functionality to store images in my database table. Additionally, I want to incorporate...

View Article

ASP.NET Core 8 : Type on ViewDataDictionary

I have this problem : InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'System.Collections.Generic.List`1[BookingPortal.Models.ViewModels.WarehouseViewModel]',...

View Article


ASP.NET MVC 4 Cannot access Resource files

I have a resource file Res.en-US.resx with:Build Action: Embedded Resource Custom Tool:PublicResXFileCodeGenerator and Custom Tool Namespace: Resources.BlahWhen I try to include them in a .cs page or a...

View Article

HTTP GET controller actions and ModelState.IsValid

Pretty much all literature I've read on ASP.NET MVC over the years describes ModelState.IsValid as something that comes into play only with HTTP POST action methods. I understand this is the...

View Article


How can i fix Visual Studio RZ1024 error* [closed]

i am trying to learn Asp.net .Everything was okey then I was trying foreach my ViewData list.This is my code.(https://i.stack.imgur.com/eNGMu.png)Then I faced with this problem. The problemI tried to...

View Article

MVC- How to get parameter value from get request which has parameter names...

In MVC, I know we can get parameters from a get request like this:Request:http://www.example.com/method?param1=good&param2=badAnd in controllerpublic ActionResult method(string param1, string...

View Article


When I try to access IIS as localhost, I get not found

I am running a web application on IIS 10.0 + ASP.NET + azureVM.When I type the IP address assigned to the VM in the address bar, it works fine,However, when I specify localhost and 127.0.0.1, I get a...

View Article

Multiple key value pairs for select and onchange

Currently I have a select with a list set in the model and an onchange to display the information according to that value. An update has been requested to have another section of the Model added. I...

View Article

Partial View .Net MVC render javascript file

I have an error when loading a partial view in the following way, the problem is that when loading a second time the modal window tries to load the javascript file, therefore it gives an error in the...

View Article

How to add project reference to ASP.NET Core 1.0 MVC project

I have a ASP.NET Core 1.0 MVC app in solution X and I have some common projects (.net 4.5.2 class libs) in solution Y.I want to reference the projects in solution Y from my app, when I do so via add...

View Article


each JS file has 3 files js es5js and es5minjs why

Haven't too much experience withfileName1.jsfileName1.es5.jsfileName1.es5.min.js so please bear withI need to make changes to a number of js files on our mvc project.So each JS file has the 3 files...

View Article


ASP.NET Web API - How to include / as part of parameter value in URL?

In ASP.NET Web API project, the route is [Route("api/itemSoldPrice/{words}/")]. It is working fine if using path http://xxx/api/itemSoldPrice/book.But if the URL is http://xxx/api/itemSoldPrice/1/2L,...

View Article

IIS 6 and script execution timeout not updating

I have an ASP.NET application, .NET version 4.8 running on IIS version 6. One page is timing out occasionally returning the message ERR_EMPTY_RESPONSEI am attempting to increase the script execution...

View Article

The model item passed into the dictionary is of type, but this dictionary...

Here is what I am trying to do. I don't understand Why it is expecting an enumerable list.AddressController.cspublic ActionResult ShowAddresses(List<Address> ReturnAddresses) {...

View Article


Store Azure AzureADB2C object in ASP .NET MVC application as a Key Vault secret

I have AzureADB2C object in my ASP.NET MVC application stored in the appsettings.json file.I want to store Azure AzureADB2C object as a Key Vault secret and then access it from Program.cs like...

View Article

Access nested objects in C#

I am trying to access specific properties from my object via Google Books API. The content is deserialized into two POCOs to access the nested object. I am stuck on is accessing the properties of...

View Article

Google Api For No. Of Downloads in ASP .NET CORE MVC

is there google api to fetch no of downloads in asp .net core mvc?provide the class or library which returns the count for both Ios and androidI have tried chatGPT but it is giving me the way which...

View Article

Server-Side-Blazor with login through Controller

I have a blazor app and want to create a login procedure for it. Therefore I know that I could scaffold and dedit the default MVC-pages to achive this.On the other hand I have once read that it should...

View Article



Image may be NSFW.
Clik here to view.

FluentValidation AbstractValidator how to access object that is being validated?

Please have a look at the following image as it will explain my problem :)Is there a way to have the PlantProcessSetting entity fetched in a better way?The first problem now is that I cannot access the...

View Article




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>