Implementing mTLS Between Two Apps Using ASP.NET
Guidance is requested on implementing mTLS between two applications using ASP.NET MVC in C#. or any .net code. The setup will involve a handshake between the server app and client app, developed in a localhost environment, utilizing OpenSSL or another…
I am migrating application from dot net 4.8 to dot net core 8. facing error Project ..\folder\folder.csproj targets net8.0. It cannot be referenced by a project that targets .NETFramework,Version=v4.8.
I am migrating application from dot net 4.8 to dot net core 8. facing error Project ..\folder\folder.csproj targets net8.0. It cannot be referenced by a project that targets .NETFramework,Version=v4.8. Project ..\folder1\folder1.csproj targets…
Validate file content type for txt, log, JSON file in C#
public static bool IsFileValid(IFormFile file) { using (var reader = new BinaryReader(file.OpenReadStream())) { var signatures = _fileSignatures.Values.SelectMany(x => x).ToList(); // flatten all signatures to single list var headerBytes =…
Not getting any results...
I'm trying to create a website using ASP.Net and a SQL server connection to retrieve data which is all of data type "nvarchar" and not null. My code is as follows: (Database connection here) using (SqlConnection connection =…
How to load dropdown values inside gridview or Listview using DataTable
i'm using dropdown values inside modal popup. whenever i am selecting some values in dropdown, i want to assign those values in datatable. Finally, i want to assign datatable values into either gridview or Listview. Is it possible to load values in…
Server connection problem on a blazor site
Hi, I have made this app in blazor: Index Occasionally, I encounter this error: "Attempting to connect to the server." Do you know how to solve it? regards, Saeed
Blazor and ValidationGroups
I am in ASP.NET since the first version of .NET Framework and I am used to some features that are missing now. Please notice that I've just recently moved to Blazor. Currently, I am wondering why the ValidationGroups are not part of it. I have a kind…
Use signalR with Client in .netcore and server in .net framework(4.6.2)
Hello, I am trying to open a communication channel using SignalR between a client written in c# with .netcore and a server with .net framework 4.6.2 also written in c#. Is it posible? If the answer is no, what can I do to be able to communicate between…
Blazor adds random attributes
Hello guys and all the best for the new year I am struggling with these strange attributes that Blazor keeps adding to all elements. I tried to find more about this behavior but none of the proposed solutions worked for me. For instance, MS suggests…
pass the selected value in a drop down to the controller
hi all, I am having difficulties in understanding how to pass the selected value in a drop down list to the controller. I have only seen examples that use the model object and the selected value is just some attribute that is being referenced when…
How do I save file on form submit
Hello, As mentioned in the title, I want to save the file to the server. In the past, we were using SaveAs but in Blazor I can't get a reference of PostedFile directly. <div class="row pb-3"> <div class="col"> …
how is way to create menus on a aspx page
i am using vb.net 2022 and renamed the extantion of a form to aspx now how is posible to create menus on this page
How to share "System.Web.HttpContext.Current.Session" between ASP.NET and .NET CORE application
Dear All, I would like to share session values between ASP.NET and ASP.NET CORE application. It is working fine only when the session value is set inside "Session_Start() method in Global.asax.cs. When I try to set session value in an other action…
How to run asp.net web application using visual studio code ?
I work on .NET 4.7. I have an issue: I can't run applications in Visual Studio Code. I don't know how to run it. Startup page is http://localhost:22851/WebPages/loginT.aspx This page opens in Visual Studio 2019, but how to open the page logint.aspx in…
Fix the error "Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified"
I am using "Asp.net Web Application (.net framework ver 4.8)" and Class Library .net8 but when I reference it I get an error. Server Error in '/' Application. Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral,…
adding model based controller gives me an error in MVC 5
I am trying to add model based controller, according to a tutorial: https://video2.skills-academy.com/en-us/aspnet/mvc/overview/getting-started/introduction/accessing-your-models-data-from-a-controller I tried reinstalling Visual studio, tried deleting…
Share data between domains using ASP.NET C#
We have a shared state management server and aim to transfer session values between two domains: modern.com and 111A Both domains redirect to a common page, freelogin.aspx, which is hosted exclusively on modern.com. On this page, I need to retrieve the…
Detailed Help Needed for Azure AD B2C JIT Migration Password Reset Flow: Claims Transformation Issue
Context and Use Case I’m setting up an Azure AD B2C custom policy for a Just-In-Time (JIT) migration password reset scenario, and I’m encountering persistent issues that I cannot resolve. My scenario is as follows: A user from a legacy Identity…
Are navigation added automatically to the dbSet?
I have a question Dbset public class Question { public int Id {get; set;} public string Text {get; set;} public virtual ICollection<Choice> Choices {get; set;} = [] Choice DbSet/Model public class Choice { public int Id { get; set; } …
Performance issues in Session State
Hi. We are running a .Net Framework 4.8 mvc web application with redis session state setup. We are experiencing performance issues and the profiling we have done indicates that session state, specifically GetSessionStateItemAsync, is waiting for long…