Category "asp.net"

A second operation started on this context, Domain Event EF Core 3.1

I'm using Domain Event to update some tables. I have created a class that inherits INotificationHandlers like this: public class DamageTypeEvents:INotificatio

Xunit in asp.net core

I'm new at asp.net and moq and xunit test, I want to create a test case for my asp.net project. I have the service file that is CRUD action, I have been written

Xunit integration test dotnet 6 System.Net.Http.HttpRequestException : Response status code does not indicate success: 415 (Unsupported Media Type)

Hello I'm learning integration testing and I want to test a 'POST' method from my controller using xunit and WebApplicationFactory But I'm getting this exceptio

Duplicate keystrokes on cshtml editor

I'm having a strange problem in Visual Studio 2022, and would like to know if someone else faced it. It only happens when editting .cshtml files, on Asp.net MVC

Link the selected item of drop down list to sql script with an on change event

I have been battling this for some time now without success. So Your help is extremely appreciated. I have created a dropdown list from sql database. What I wan

How to correctly update database when users session expires for ASP.NET web application using the new .NET 6 format?

When a users session expires I want to update the database to switch their status to offline but I cannot find the right way to do this as I know that they can

Site can't be reached when redirecting to crystal report page in IIS

I am new to web application development to host in IIS. I have developed a web application (ASP.Net Core Web App & .net 5.0 framework) using VS2019 which sh

Unable to load DLL 'CpuMathNative' on published website

I just deployed my ASP.net website which uses ML.net on a free web host called Somee. Before deploying the solution, everything was working fine and all was pub

How to view System.Diagnostics.Trace.WriteLine output in DbgView?

I have an ASP.net web-site hosted on IIS, and the code calls: System.Diagnostics.Trace.WriteLine("test"); Reminder: You use Trace, rather than Debug, because D

Microsoft.Owin.Security.OpenIdConnect AuthenticationTicket is null on AuthorizationCodeReceived

I'm using OpenIdConnectAuthentication with code flow to implement the OpenIdConnect login. But on the AuthorizationCodeReceived, the property notification.Authe

Pass multiple parameter to Ajax from link in MVC Core

I have this link <a asp-action="goPay" asp-route-id="@item.Appid" asp-route-mem="@item.Memid" asp-route-amt="@item.Areq" asp-controller="Withdraw" class="btn

Postgresql error 53300 even though there are fewer connections than maximum allowed

I'm using npgsql on my ASP.NET application to connect to a postgres database. On trying to open a connection, I get the following error: 53300: remaining connec

How to send form-encoded List<long> from SwaggerUI?

I'm getting 400 Bad Request on sending List<long> from SwaggerUI to .net application Swagger Response : {"statusCode":400,"message":["The value '"1","2",

asp.net 6 EF using MySql Database not working

I am trying to connect my Web API build in asp.net 6 with MySql and I am having a lot of trouble My Service looks like this builder.Services.AddDbContext<Tic

ASP.NET and Spring - Singleton or Scoped/Prototype

Im really confused, Daily I work with java and spring and in Spring-community it is almost obvious that Repositorium/DAO and Services are Singletons (which is d

How to automatically add a name from selected id in View page from controller ASP.NET MVC

I want to get a name from selected id in my view page First Model public class Transaction { [Key] public int Id { get; set; } [Required] public

PDF.JS in ASP- How to Open PDF in Viewer located in a folder different than viewer.js

In PDF.js, using viewer.js and viewer.html, I can specify a PDF by assigning the filename in defaultURL.value, but the PDF must exist in the same folder as view

How to position the image at the side edges of the screen?

I want to place the image at the edges of the page so that it perfectly touches the left and right sides with the edges. that's what it looks like now: https://

How to position the image at the side edges of the screen?

I want to place the image at the edges of the page so that it perfectly touches the left and right sides with the edges. that's what it looks like now: https://

How to position the image at the side edges of the screen?

I want to place the image at the edges of the page so that it perfectly touches the left and right sides with the edges. that's what it looks like now: https://