how to fix Common Language Runtime detected an invalid program?
I have a simple API developed with .NET 8, which connects to a postgreSQL DB using Npgsql version 4.0.0. The API opens the connection, queries the database version, and closes the connection. the API was uploaded to 2 servers, running Windows Server 2019…
I'm having trouble writing the code to downloading the page.
I'm attempting to create a small application that converts image formats to SVG. And bellow comes the code: @page "/" @using System.Drawing @using System.Drawing.Imaging @using System.IO @using System.Threading.Tasks @using…
Error when trying to login using Microsoft Cognitive Services in Public Desktop Client App in Entra External ID tenant
I have an Entra External ID tenant with a registered public desktop app from which I want to call the APIs from an Azure Speech Service resource. Via MSAL I log in like this: var clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; var tenantId…
ClientWebSocket Class
In ClientWebSocket Class how to set up Compression? Does we have to set the header "Sec-WebSocket-Extensions" manually for compression? Does the SendAync() method compresses before sending or it has to be compressed manually before…
Usermanager generate email confirmation token sometimes returns null
Why is it that sometimes the _userManager.GenerateEmailConfirmationTokenAsync(user); returns null. It's very rare to happen but it is happening and I need to know the reason behind it. This is my current configuration for Identity …
Error message while generating a controller in Dotnet ASP.NET Core
I'm trying to generate a controller in Dotnet ASP.NET Core by following the tutorial on https://zcusa.951200.xyz/en-us/aspnet/core/tutorials/first-mvc-app/adding-model?view=aspnetcore-8.0&tabs=visual-studio-code, but when I use the command dotnet…
Azure Pipeline Build doesn't fail but stuck on ##[debug]Agent environment resources
I inherited a project, its a Core 8 Asp.Net web app. The build step successfully builds, but then hangs. The next step in the build pipeline never fires and all that is output in the verbose logs are this, the build never stops. Why is the build step not…
WebSockets in .NET Core
The Client WebSocket Object has ReceiveAsync() method with two overloads. One with ArraySegment<Byte> and other one is Memory<Byte>. Which one to use under which scenarios with an example? I have a requirement where I am sending smaller size…
Using IDENTITY_INSERT with FK_ChildTable_ParentTable?
Hello, Wrapping SaveChanges with ON and OFF works fine with individual tables. But not in case of a parent-child relationship where a foreign key exists. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column…
Assistance Required for Accessing Microsoft Graph API Delegated Permissions Without User Interaction
Hi Guys, Previously, we utilized a console application to access users' mail content within our application (registered as a confidential client in Azure Active Directory). However, we now require the ability to access Microsoft Graph API's delegated…
How to fix this " Error There was an error running the selected code generator: 'startIndex cannot be larger than length of string. (Parameter 'startIndex')' "
Hello I got this error issue. When I tried to create New Scaffolded Item > Selected ' MVC Controller with views, using Entity Frame Work I use Microsoft Entity Frame work version 8.0.8 Version and the Frame Work Design I use 8.05 Window 11 Net 8.0…
System.Runtime.CompilerServices.AsyncTaskMethodBuilder
Hi, I am getting the below mentioned error. Don't know why it was showing. I guess this comes due to I migrate the dotnet version from 6 to 8. can you resolve my issue? { "error": "Error getting value from 'Context' on…
MSIS7012 : The same client browser session has made '6' requests in the last '1' seconds. Contact your administrator for details
We have a .Net application which we implemented ADFS WSFED in it. Its working fine in local but when we deployed we are facing this error. For Dev in URL I see Realm is HTTPS but wreply is HTTP. But for local I see Realm is HTTPS but wreply is HTTPS.…
How to fix An operation was attempted on a nonexistent network connection. (0x800704CD)
Hi guys I got an exception error like the below stack trace. I suspect the problem is when reading the response data, or reading the data for the request. Could you tell me why this exception occurred and how to fix it? Exception Type :…
Why am I getting this Content Policy error?
Hi all; I have added the following to my Blazor Interactive Server app using NWebSec: app.UseHsts(options => options.MaxAge(days: 30)); app.UseXContentTypeOptions(); app.UseXXssProtection(options =>…
Infinite Redirect Login Loop with Keycloak OIDC in ASP.NET Core 8.0 Blazor (Radzen) Application
Hello everyone, I'm currently facing an infinite redirect loop issue when integrating Keycloak for OpenID Connect (OIDC) authentication in my ASP.NET Core Blazor Server application using Radzen. Technologies Involved: Keycloak (24.0.4) as the Identity…
Cognitive Services - Text to speech REST API - not all words are converted when selecting ogg as output format
calling text to speech API selecting ogg-16khz-16bit-mono-opus not synthesizing all the words. For Example: Text: "First Floor" It is converting only first word, and the word Floor is not getting synthesized.
Illegal characters in path.
I am trying to create a new project through following procedure but visual studio is throwing exception
Migration from .NET 6.0 to .NET 8.0: Compatibility and Considerations
Hello everyone, We have a solution with a vast number of projects, and we are aiming to migrate some of the components to .NET 8.0. Before proceeding with the migration, we want to ensure that we will have full compatibility and support for it. Our App…
How to Update-Database in PM console when getting "Could not load assembly..." error?
Hello, I cannot apply migrations to database by Package Manager Console command Update-Database. On every attempt I get error: Could not load assembly "My_Project". Ensure it is referenced by the startup project 'My_Project'. Before mentioned…