Category "asp.net-mvc"

Bootbox does the same for "ok" and "cancel" callback. It does the same for prompt as well

Bootbox closes and stays on the same page. It should redirect to a different page onClick and "ok" after that. It is an MVC application and redirects to Index a

Can't Add View from Controller in VS 2015 : "There was an error running the selected code generator"

I'm following a video tutorial where I'm required to create an empty ASP.NET Web Application with MVC, using Visual Studio 2015, being new to ASP.NET world, I'm

OpenIdConnectProtocolValidator - nonce error

I'm using OpenIdConnect authentication on my azure website (azure active directory, c#, MVC) and I'm randomly getting this error IDX10311: requireNonce is t

Do not add to list if it is null c#

I am trying to create a list from anonymous function. I want the list to be created if request model properties are not null. Currently, it is adding null to th

Swagger not loading - Failed to load API definition: Fetch error undefined

Trying to setup swagger in conjunction with a web application hosted on IIS express. API is built using ASP Net Core. I have followed the instructions prescribe

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