How to use commas after three digits next to numbers using LINQ Query
I want to separate the numeric values in my query with commas for ease of viewing. Is it possible? example 1000.00 I want to see 1,000.00 10000.00 I want to see 10,000.00 100000.00 I want to see 100,000.00 //Query var data = (from a in…
ASP.NET CORE MVC - Shared\Error.cshtml
Hi, I'm really new to ASP.NET Core MVC. I normally use ASP.Net Web forms (.Net Framework). One thing I could not figure out about MVC is the out-of-the box project templage (ASP.Net core mvc with .net 9 template in visual studio) has the Error.cshtml…
Issue with 405 Method Not Allowed instead of 401 Unauthorized in ASP.NET Core with JWT Authentication
Hi everyone, I'm encountering an issue with my ASP.NET Core application where I'm getting a 405 Method Not Allowed error instead of the expected 401 Unauthorized error when accessing an endpoint that requires authentication. Here's a detailed description…
Remote debugging of ASP.NET (.NET Core 8) app under IIS 10 will not show source code on breakpoint
Historically, I've had no problems using the remote debugger on a Windows server for .NET Framework web services. I've now had to create a .NET Core 8 Web API using VS2022. I've published the service to a W2016 host and am hosting it under IIS…
Blazor 8.0 NavigateTo throws an exception
Hello, I have a language selector that calls the following code and it works like a charm. On other hand, I want to change the language from within the MainLayout on Initialized event (async) but then the very same code throws an exception of type…
Blazor ValidationMessage being conditional
Hello, I have a registration form where the users can select if they are private or company. What I need is to make the Company Name validation conditional. Meaning, if they select a company it gets enabled and if they select a private it gets disabled.…
How to create persistent Cookie from HttpContext's Cookie.Append method?
var token = await _jwtTokenService.GenerateToken(user); HttpContext.Response.Cookies.Append("accessToken", token, new CookieOptions { HttpOnly = true, Expires = DateTime.UtcNow.AddHours(1), SameSite = SameSiteMode.None, Secure =…
Seed Data Asp.Net core Identity .Net 9
Hello, good time. A problem in the new version of .Net 9 that I recently found after upgrading from version 8 to 9. Regarding the seed data context identity I found this problem after upgrading the version, in your project I have a Context, one for the…
RDLC reports on .NET Core 8
Hi at all, I'm using a rdlc report inside a .net core 8 app but i'm getting this error {"An error occurred during local report processing.;The definition of the report 'report path inside the project' is invalid.\r\nAn unexpected error occurred in…
Maui project - Microsoft.AspNetCore.Aoo didnt work with the APP
1-There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'iossimulator-x64'. 2-There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'maccatalyst-x64'.
including Azure Key Vault in .NET core 8 app running on on prem IIS
My .NET core 8 app talks to Azure Key Vault when I run it in Visual Studio 2022 because I can see a reference to Azure Key Vault in the Connected Services under the project. The app does not start on the IIS server, because of an authorization fail in…
issue with api, unauthorised
I have this simple Webapi, which is published as APP service [Route("api/[controller]")] [ApiController] public class DateTimeController : Controller { [Authorize] [HttpGet] public IActionResult GetCurrentDateTime() { …
System.NullReferansException:
I would like to insert product but SelectListItem returned true Can you help me? It will make me crazy
System.NullReferenceException: 'Object reference not set to an instance of an object.'
I would like to insert product 2 or anymore but Model.Selects.get returned null! I do not understand how I resolve this problem. Can you help me please! Thanks for your support
system.IO.Directorynotfoundexception for the file that exists in the network drive
I am trying to open and fill a blank .pdf file. This blank .pdf file resides on the network drive. The path to that blank .pdf file is specified in the program.cs file. When I tried to read the blank .pdf file in my code, my code automatically goes to…
Can Razor work with Active Directory?
For over a month I have been trying to use Blazor Server-Side Rendering (SSR) with Active Directory. I had thought that maybe I could use it as a part of a Razor template, but navigating to Blazor components. Today, I have learned that hope is wrong. So,…
Why Login failed for user 'Domainname\AppserverName'." If this type of user is added in the SQL Server Security section but has a different functional username configured within SQL, the error persists
On the client’s network, the application server and database server are hosted on distinct machines (different servers). When accessing the database via an API developed using .NET Core 8, we encounter the following error: Login failed for user…
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…
Minimal APIs in Blazor with RequireAuthorization() using Individual Account
In my .NET8 Blazor project, I added the Individual Account to manage the users. Now, in order to save the data in the database, I added some minimal endpoints like public static void MapClientEndpoints (this IEndpointRouteBuilder routes) { var…
How to retrieve SharePoint site load times, search performance, retention policies, compliance policies in asp dotnet core web api?
I want to retrieve SharePoint site load times, search performance, retention policies, compliance policies in asp dotnet core web api. Please suggest any documentation.