Category "asp.net-mvc-4"

Creating dropdowns according to the database

There are different properties for 3 (x,y,z) properties in my database. I created a dropdown and according to the selection I will make in the dropdown, I want

Http 403 server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature

I generated SAS url with below code var blobBuilder = new BlobSasBuilder() { ExpiresOn = DateTimeOffset.UtcNow.AddDays(2),

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

After upgrade to asp.net 5.2.3, CORS isn't working for "*" origins

I have a project using web api and one using asp.net mvc. They are configured using CORS module. The project using Web Api is configured to allow any origin be

Sharing common database between .Net core and .Net standard Identity framework

I have old legacy MVC app that uses Identity 2.0. Also recently I have created .Net 6 API with Identity 6.0 (AspNetCore.Identity.EntityFrameworkCore). Note: The

Sharing common database between .Net core and .Net standard Identity framework

I have old legacy MVC app that uses Identity 2.0. Also recently I have created .Net 6 API with Identity 6.0 (AspNetCore.Identity.EntityFrameworkCore). Note: The

HttpContext.User NullReferenceException only on deployed server

I am using formsauthentication on my MVC project and when testing locally using the Visual Studio Development Server everything works as expected. Once deployed

HOW TO FIX: The remote server returned an error: (400) Bad Request

I'm trying to fix this error, I know that there are another similar questions with the same error, but the line: request.ContentLength = 0; it doesn't fix my ex

Unable to create a controller when using asp.net MVC 4/Entity Framework.

I am new to asp.net, and I am now facing a problem. I have created a project using asp.net mvc4, and I have added an entity data model and successfully connect

check the site name hosted on IIS using code

My site name is "Flows" on IIS if i search with the name "FLOWS" its not working so is it possible that i can search it without case sensitive. class Program {

Why is my hidden input writing: value="value" instead of true/false?

I have an MVC4 site, with (as part of a hidden form): <input name="somefield" type="hidden" value="@ViewBag.Test"/> The value of ViewBag.Test is true.

Where to place business logic layer in relation to data access while providing unit testability by dependency injection?

I am looking for a way to have a separate layer of business logic in a MVC4 app with Entity Framework, without having to inject my (real or fake) database conte

HTTP Error 404.15 -Not Found

The request filtering module is configured to deny a request where the query string is too long. I am having above error, and I have been trying almost everyth

Some (official or not) upgrade Mvc3 to Mvc5 guide?

There is a (non-Microsoft) NuGet package that allows upgrading the Mvc3 to Mvc4. There is a (Microsoft) article that explains how to manually migrate from Mvc3

How to render MVC child Action PartialView into Layout @RenderSection()?

In the layout, MVC child actions are called in . However, the the partialView results are not shown in the RenderSection("userProfile", required:false). The Wa

mvc 4 Model is null

i'm using razor's listboxfor for the first time, but my Model is always null. after reading similar posts and tryouts it still won't work. Person.cshtml @mode