Category "asp.net-mvc"

The type 'Expression<>' is defined in an assembly that is not referenced

In ASP.NET MVC 4.5.2 Framework, after typing @Html.LabelFor() or @Html.EditorFor() in a view, I'm getting this error: The type 'Expression<>' is defined

Compiling scss files in ASP.NET MVC action

are any alternatives for compile .scss files in action in ASP.NET MVC controller? I have /Content folder with two files: main.scss and external.scss. In my con

Force MVC CookieAuthentication to timeout prematurely, then setup combination of sliding and absolute expiration

I am maintaining a website that using cookie authentication in a ASP.NET MVC5 application. When the application went live the cookie time out is set to a very l

Return response with errors instead of throwing exception in validation pipeline mediatr 3

I am currently working with Pipeline behavior in Mediatr 3 for request validation. All the examples that I came across were throwing ValidationException if any

Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID

I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without https. With Https it's giving e

How to Download log files generated from log4Net

I'm using log4net in a ASP.NET MVC 4 application and I'm trying to download the generated log file from log4Net. I have in mind to download the log file with a

Handling Deadlocks via, RESTFUL API?

Goal is to improve code. The ASP.NET MVC client Application makes the HTTP request to the service Layer. This is a C# REST API, where we are transferring larg

How to deploy an ASP.NET MVC application on build using MSBuild in Visual Studio 2015?

I want the application to be deployed to a local folder when I build the project. This should produce a zip file that I can use to import in IIS. How can I achi

Passing @Html.DisplayFor() - values from view to controller

I'm having these classes: public class ProductViewModel { public IEnumerable<Product> Products { get; set; } } public class Product { public in

How do you escape a '@' symbol within in a url with razor

I know this is probably going to be something very simple and it is like just a 'gotcha' that I have yet to get; however, I have been struggling with escaping t

Kendo MVC Grid paging buttons not changing results displayed

I have a Kendo Grid. The paging numbers are ok, items per page is ok, but when I press on page number the results in grid isn't changing, all results are shown

How can i save a file that i create into a path

I´m developing a school project where i need to export a html table into a csv file, and when i click in a button i need to save that file into a path lik

Serving static file on ASP.NET MVC (C#)

I am completely new to .NET framework and i would like to know what is the best way to serve static content and to access user generated content. Suppose i hav

Serving static file on ASP.NET MVC (C#)

I am completely new to .NET framework and i would like to know what is the best way to serve static content and to access user generated content. Suppose i hav

Unable to update database to match the current model because there are pending changes

I have a project built in visual studio 2013 environment with the Db built using EF 5 code first. I have had my APIs working fine for a long time but all of a

How to avoid InvalidModelStateResponseFactory to interfere with an error response already generated in FluentValidation

I am working on a .NET Core 3.0 MVC project using FluentValidation, for validating input from the front end made in React. I can't rely on that the input is val

Importing excel table to ASP.NET C# MVC

I have table in a excel sheet called ListProduct.xls. When I import the excel file I want it to print the table in success page. The index page works fine I can

asp.net mvc @ put out wrong unicode string

<meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <meta name="description" content="@("Du lịch chữa bệnh ở

Not allowed to load local resource:

i want to stream online videos ..but i am facing j query error Not allowed to load local resource: ...i find many solution but that all did not work for me. he

localhost refused to connect Error in visual studio

I have copied my solution file from another system and tried to run it on my machine: For this, I have gone to the project folder and deleted the previous solut