For existing ASP.NET Core MVC project on Windows build server, how to target a Docker container without disturbing earlier build pipeline stages?

Can we add two extra steps at the end of the existing build pipeline? It would be a step to publish to an OS independent binary format and a step to run “docker build” to put the published app into a container. We still need to deploy to a non-container IIS web site. We’d rather…

Get Added Entity State Primary Key Asp.Net Entity Framework

I am trying to create Change Tracker by overriding dbcontext SaveChanges() method. I couldnt get primary key for entity when state of added. How can we get added entity state when try to save ChangeLog. DbContext overrided SaveChanges is like this: public override int SaveChanges() { var adddedEntites = ChangeTracker.Entries().Where(p => p.State == EntityState.Added).ToList(); var…

ASP.NET MVC5: JQuery client formular validation for single components loaded by AJAX

I have an ASP.NET MVC5 project formular with dynamic textboxes. This means that the user should be able to add several textboxes to the formular over AJAX at runtime. The model structure: public class TextboxFormModel { public IList<SingleTextboxModel> Textboxes { get; set; } } public class SingleTextboxModel { [StringLength(100, ErrorMessage = “Maximum 100 characters”)] [RegularExpression(@”^[a-zA-Z0-9]{0,100}$”,…

Razor Pages/ ASP.NET CORE Routing Issue on Deployed Site (404 Error)

When I deploy my site it changes the generated anchor link for certain items. On my local server the link turns out to be http://localhost:49377/Recipe/1 and it works when I click it. On my deployed server it shows thedeployedsserver.net/Home/Index/1?page=%2FRecipe . It’s this link in the Menu.cshtml that changes: <h3><a asp-page=”/Recipe” asp-route-id=”@recipe.Id”>@recipe.Name</a></h3> I think it’s maybe…