call an api in C#
I have the following code: namespace TwilioSendMessages.Controllers { [Route("api/[controller]")] [ApiController] public class SMSController : ControllerBase { private readonly IWebHostEnvironment _webHostEnvironment; …
.NET Authentication .NET 7 Vs .NET 8 in my simple API service
I’m working on a relatively simple .NET Core web API service that performs CRUD operations on a database. Not sure what's the best way to implement authentication. Here’s the situation: In .NET 7, I had to manually define all the authentication…
Shopping application
To implement this application Should we use both ASP.NET web api and postman or any one? do we need to create models for application in web api ?
Developing Web API in C# with VS 2022: IIS Express Error, no connection to local IP, access denied
I'm developing a Web API with C#, Net 8, in Visual Studio 2022. Everything was fine until I changed one detail in "$schema": "http://json.schemastore.org/launchsettings.json", "iisSettings": { …
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" and "The remote certificate is invalid according to the validation procedure" on just 1 server?
There is an API and this API in .NET C# gives this error: "System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Unable to establish trust for…
Changing the APPID of a VB.Net project
I'm working on ASP.NET Web API project, and I realized that the APPID being captured in the Teradata DBQL is a duplicate of another application. This is how the APPID looks like. W3WP:AA:CC:xx.xx.xx.000) Can you please advise how to update the…
.Net 8.0 Unable to install EntityFrameworkCore.Tools 8.0.2 from Nuget package manager
I have installed Visual Studio 2022 community edition, created a .Net Core Web API project and installed below 2 packages from Nuget package manager successfully. EntityFrameworkCore.SqlServer 8.0.2 EntityFrameworkCore 8.0.2 But, when I try to install…
Incorrect assessment result for Develop an ASP.NET Core web app that consumes an API
I attempted the assessment and successfully completed all the tasks. I am very sure that my result is calculated incorrectly. The result says I failed to Interact with an API which does not make any sense as I would not be able to proceed to other…
Is there a way to trigger Outlook-Add-Ins (Web) from external? (Custom event activation)
I am currently working on Office365 add-ins development and their communication via asp.net interfaces which are registered with entra id. I would like to open email templates from an external program. Templates can be created via ms-graph or by the…
How do I attach an SSL certificate to access SOAP services with .NET Framework 4.8?
Hello everyone, We have a requirement to attach the SSL certificate while consuming SOAP services. We are getting an error as "Could not establish secure channel for SSL/TLS with authority 'url.com:portnumber'/". Inner Exception WebException:…
Problema om Swagger em publicaçao de API no Azure
estou tentando publicar uma API no Azure mas esta retornando o erro Falha ao gerar o arquivo de swagger. Erro dotnet swagger tofile --serializeasv2 --output var builder = WebApplication.CreateBuilder(args); // Add services to the…
Adding React.Js components to my existing/new Asp.net MVC core 6.0 , is this possible/compatible?
I am building ASP.NET Core 6.0 with MVC web application, and I am using these technologies... Web API Entity Framework SQL Server Razor views, JavaScript, JQuery & Bootstrap. Apexcharts But i want to improve my MVC web application front-end by…
No webpage was found for the web address
I have deployed web api to Azure. The API has an SQL server which i have configured when deploying. I have checked the connection string is in the app settings and i have migrated my database with data so it should be working, but i keep getting a 404…
Azure is decoding characters in the URL before reaching the application
In our backend API, we have an endpoint with a path variable and we need to be able to support certain special characters. To accomplish this, we are encoding the path variable with UTF-8 before hitting the endpoint. This works for most special…
Send Chunked Response in .NET 6 Web Api
I am building a Web API project where I will be fetching pdf files from Azure blob Storage and send the pdf files as response to API calls. I have tried using following piece of code Response.ContentType = "application/pdf"; await foreach…
How to get Task manager process closing events in c#?
Hi Team I am Implimenting a server(APIGatewat.exe which is console exe) to launch other console exe(act as other servers) in background without user intercation mode i am able to launch the exe(using process start) but when im closing my Main…
Question about clean architecture
I read article about clean architecture (in microsoft docs) and I have question about validation. In the article said that Application layer must not have any dependencies from external libraries and frameworks. But I see examples projects on github…
Generate custom PasswordHash with Microsoft.AspNet.Identity
Hi , I'm using VS2022 and I want to override the Default PasswordHash. I want to include when the user is created in the Hash Password the username for example. I found some code but it is for the Core. And I'm not using the core I have created a …
How to solve error "A potentially dangerous Request.Path value was detected from the client (:)."
I am trying to fetch binaries/files from Artifacts --> Package using API call. URL: GET…
IIS - Rewrite Module from 200 OK to 201 Accepted
In IIS version 10, I installed Rewrite Module and I am trying with the above XMLs the following action. I want to set "201 or 202 Active" status instead of default 200 OK to all successful requests (only when my api should return 200…