Category "asp.net-mvc"

How to generate heap overflow error using c#

I want generate a heap overflow error and slow down the system, however I have created alot of objects on class level, later on creating that class object milli

ASP.NET MVC 5 Cache CSS and JS Files

I am using ASP.NET MVC 5. My goal is to cache CSS and JS files for at least 24 hours. I tried this code with no luck: https://docs.microsoft.com/en-us/iis/con

ASP.NET Core 3.1 MVC Routing issue with IIS Default Web Site

New information: After much messing around with trying to manipulate the URL I almost got it working but not quite. Then I discovered that it works without any

ASP.NET Core 5 MVC localization query string working but routing not working

In trying to localize my application, the query string localization has worked and accept language header also working, but routing is not working. Here is my c

Minimum Google Chrome and Microsoft Edge Version for stable running ASP.NET MVC, Vue.js application

We use latest ASP.NET MVC, Vue.js at company. Is there a version for chrome and Microsoft edge that you can say that it should be above the following version in

ASP.NET MVC (Razor) vs Angular 5

We are currently considering moving from ASP.NET MVC to Angular 5, mostly because it seems like the best and latest framework. However none of us seems to be ab

ASP.NET MVC Core API Serialize Enums to String

How to serialize Enum fields to String instead of an Int in ASP.NET MVC Core 3.0? I'm not able to do it the old way. services.AddMvc().AddJsonOptions(opts =&g

Best practice to handle concurrency in EF Core and ASP.NET Core?

Currently I'm doing the following when inserting/updating and entity: public async Task<IdentityResult> UpdateAsync(Model model, CancellationToken ct = de

Abort form submission on AJAX beginform with JavaScript

I am working with .NET MVC. My problem is that I need to abort an AJAX call if a JavaScript statement is true. <div class="Filter_inner_title white_unifrom o

Google Chrome is showing the date format yyyy-MM-dd instead of dd/MM/yyyy

The specified value "18/08/2017" does not conform to the required format, yyyy-MM-dd Google Chrome doesn't load date in dd/MM/yyyy format from the controller m

How to avoid login with an empty password field in ASP.NET MVC 5?

I'm working on an ASP.NET MVC 5 project where I have created a customized login and registration page. The application is working fine, but the problem is I am

Calling Another Project's Controller From A Project In The Same Solution (.NET Core )

There are 2 projects in the same solution. First project is a .NET Core project and it has all the codes(controllers, models etc.) related to packages. I need t

How to add auto-increment column in aspnetuser table while implementing asp.net identity?

How to add auto-increment column in AspNetUsers table while implementing asp.net identity? I do not prefer to change much the existing code and any simple worka

Data changes during fetch on a service on IIS

I am facing quite an interesting error. I have services hosted on IIS, on a server which is an application server. I have two services in focus. 1 - One is a pu

jsTree: Uncaught TypeError: $(...).jstree is not a function when .jstree functions are called

Good day, I know this question has been asked multiple times before, and I have tried all the suggestions on those posts (this includes the ones in jsTree Githu

Cant Host .net application to iis server

I was trying to publish dotnet MVC application to IIS .I created a site in that and opened in the browser .but it looks like this how to run my app on IIS.

Why Highlight Menu Item Doesn't Work in ASP.NET MVC?

Why Highlight Menu Item Doesn't Work in ASP.NET MVC? I am testing the method for highlighting the selected menu item in a MVC program. The test environment incl

The auto generated error message shows the date format as 'yyyyy/mm/dd' instead of 'mm/dd/yyyyy in ASP.Net MVC application

I am working on ASP.Net MVC 4.7.2 app. It has a date field where user can select or type the date. If user enter the date with year yyyyy (the length of year is

ampersand symbol in url param, after encoding also throwing an error - MVC

In one of my action methods , I do have a parameter "filename", which some times can be a string with ampersand symbol. The problem is when ever we have an ampe

How to render and preserve <br> tags as line breaks using @Html.TextAreaFor

I'm migrating an ASP Classic app to ASP.Net MVC 5. The legacy data contains <BR> tags in the text. In the old application (still in use) the tags are rend