Posts

Publish or Host webapi on IIS

Image
Publish webapi on IIS 1.Prerequisites: IIS Configure, .NET Core Hosting Bundle 2. Skip this step if you have already installed     - install IIS on your Windows machine if it's not already installed.    - Go to Control Panel > Programs > Turn Windows features on or off.    - Check the box for Internet Information Services and click OK.    - Ensure that the "Web Management Tools" and "World Wide Web Services" options are selected.    - Under "World Wide Web Services", ensure that "Application Development Features" such as .NET Extensibility, ASP.NET,       and ISAPI Extensions are selected.    - Also, ensure that "Common HTTP Features" like Static Content, Default Document, and Directory Browsing are selected.    - Additionally, under "Security", ensure that "Request Filtering" is selected.    - Click OK and wait for the installation to complete. 3. Skip this step if you have al...

Configure Swagger in dotnet core web api

Image
 1. Install the Swashbuckle.AspNetCore NuGet package :    You can do this via the NuGet Package Manager Console with the following command:        Install-Package Swashbuckle.AspNetCore 2. Configure Swagger in the Programme.cs file:    Open the Programme.cs file and add the following code to configure Swagger:     builder.Services.AddEndpointsApiExplorer();     builder.Services.AddSwaggerGen (c =>     {         c.SwaggerDoc("v1", new OpenApiInfo         {             Version = "v1",             Title = "My API",         });     });     // Configure the HTTP request pipeline.     if (app.Environment.IsDevelopment())     {         app.UseSwagger();         app.UseSwaggerUI (c =>         { ...
Image
Share your knowledge about India to world. Show strength of India write in comment.
How to change India ?
OM