Asp.Net Core 6 Web API - How to return only 400 Bad requests
Hi guys, I have an ASP.NET core Web API that I am calling 3rd party web services. I have exception middleware in order to log exceptions and return 500 responses to hide the details from the user. Here is where I am calling this 3rd party web…
ModelState stays valid even if the required attributes are empty in the .NET Framework Web API 4.7.2
I have a strange situation, and none of the existing solutions help I have this model in the .NET Framework Web API public partial class RequestData { public int Id { get; set; } [Required(AllowEmptyStrings = false)] public string AccountName…
Unable to Create Session and Cookies in .NET Core
I've been trying to create a session or a cookie to be determine if the incoming parameter passed to call a hook is successfully received. The session is created and accessed when the code is running in the Startup.cs class. Once I try to retrieve the…
Query regarding Microsoft.AspNetCore.Identity : Differentiating between incorrect password and unverified email during authentication
I am currently working on configuring the identity system in my application using Microsoft.AspNetCore.Identity. I have set the 'RequireConfirmedEmail' property to true, ensuring that users must verify their email addresses before accessing the…
Mapping datatype to Angular.
I have a model in my web API class. public class InspectionPhoto { public int Id { get; set; } public int InspectionId { get; set; } public int CategoryId { get; set;} public string Employee { get; set; } =…
![](https://techprofile.blob.core.windows.net/images/ugQ1n0I1lUekv-OPcFulxQ.png?8DAC5D)
My grid view task missing auto format and edit template ?
Hi everybody! Can anyone tell me how could i do to display the autoformat and edit templates in design in webform. I use Visual Studio 2022 and also i can not drag and drop these grid view in the center :( It is my GridView task. This is Gridview task i…
When will I get .Net Certfications published?
When will I get .Net Certfications published?
How to solve this "Specified value has invalid CRLF characters"?
Hi I have an issue in POST XML data to External API URL I got Error is System.ArgumentException: 'Specified value has invalid CRLF characters. Please advice me Thank you Maideen Dim url =…
why is 404 happened when i request action in a web API project using ASP.NET Core 5.0 authentication service?
when i set [Authorize] to controller , the request "/login/login",the response is "404 not found". when i delete [Authorize], it's work . why was it happened? Here is the code snippet: public class Startup { public…
Best way to store product images
Hello, I have recently uploaded my website to azure and im trying to figure the best way to Upload and display images for the products in my Ecommerce website. In my old Localhost project i would just store it on my C hard drive. with an online website…
![](https://techprofile.blob.core.windows.net/images/Z1PCM1zxm0SLa41PVP7B7g.png?8DA865)
Build a Web Application (ASP.NET Core MVC) and a Mobile App (MAUI) that share components
I want to build a simple web application and a mobile app, which have the following main features (to keep the story short) :- Users' register inside the application. Admin review the request >> once approved >> and email will be sent to…
How to implement "reset password" in MVC 5 API?
Long ago the web app was done in ASP.NET pages and I had the reset password functionality implemented with Views and Controllers: [Authorize] public class AccountController : BaseController { //... // POST: /Account/ForgotPassword …
![](https://techprofile.blob.core.windows.net/images/WmBD9oL6a0-0MJb9XowEMg.png?8D95C2)
Receive only first Chat message, Maui 7 SignalR app in Hosting environment
Hello, I'm building a .Net Maui v7 application based on the example provided below. https://github.com/Skynet-Demos/SignalR-MAUI Running locally with server and client works fine. Once I deploy the server app to my hosting provider and deploy the client…
OData 4.0: Referential constraint when principal key is defined in base class
Hello, I am implementing an OData v.4.0 web service using the latest version 7.6.4 and I use the Non-Convention model builder to create my EDM model. I have a base class Person with a Derived class Customer. The Customer class is related to the Order…
Suggestion for a business logic
Hi, I am working on an ASP.NET Core web API. The user sends product code (A12345) and quantity (1) in order to get a valid response from my API. Now requirements have changed. Some product codes must be sent with quantity and price. How can I associate…
![](https://techprofile.blob.core.windows.net/images/PjYbsbDfukmsOVQ24l7Rxw.png?8D8DBE)
The modules of the .NET challenge will be available to us after we have completed all the modules. or the access will be denied after we complete all the modules of a challenge
The modules of the .NET challenge will be available to us in the future, after we have completed all the modules. or the access will be denied after we complete all the modules of a challenge.
System.Net.Http.UnsupportedMediaTypeException: 'No MediaTypeFormatter is available to read an object of type 'IEnumerable`1' from content with media type 'text/html'.'
I am getting Unsupported Media Type Exception whenever I am doing a get request on MVC side on [http://localhost:52541/Employee/Index] . Please check my code and help me to solve the issue EmployeeController.cs from MVC using System; using…
Use InterFace In action Parameter
hi I Have Action Like [httpPost] Public ActionResult Create(IProductItem Item){ Bla Bla } My Classes Are... public interface IProductItem : IBaseModel { public decimal Price {get; set:} } public class Good : IProductItem{ public string Id {get;…
How do i protect Web API
Hi I'm taking some training courses on Azure and Web API. I need to protect my Web Api which has been built on Visual Studio 2022 with all the latest versions, updates installed and selected (except i didnt select .Net 7). I saw these…
![](https://techprofile.blob.core.windows.net/images/J_TYKjg7AEiX7AvF9jc5sA.png?8D8651)
اريد حل مشكلتي
We have an app built on flutter and asp. net, sql server and api I want to test the application on the phone over the local network