Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

startup.cs file

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace NOCng
{
    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddRazorPages();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapRazorPages();
            });
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: ado .net nullable int datareader 
Csharp :: wpf repository pattern query async with includes properties 
Csharp :: taskcontinuationoptions.onlyonfaulted 
Csharp :: Process.Start(osk.exe) 
Csharp :: c# .net core kendo dropdownlistfor enum 
Csharp :: sqlite dapper bulkcopy 
Csharp :: set teh screen rect of camera unity 
Csharp :: Focus on last entry in listbox 
Csharp :: google sheets problems cell not considered even 
Csharp :: system.text.json ways to go about getting to the data how to get the data text.json you should use JsonDocument when 
Csharp :: Destroy(GameObject.Find("Turret_Laser_Hit"), 0.2f); 
Csharp :: Last N lines from file 
Csharp :: get picked item xamarin 
Csharp :: nest elasticsearch date reange c# .net 
Csharp :: c# half hour dropdown list 
Csharp :: dispathcer in wpf stack overflow 
Csharp :: c# asp.net gridview selected row unselect 
Csharp :: C# Fibonacci list 
Csharp :: how can i replace Any for All method and vice versa linq in c# 
Csharp :: stack in c# 
Csharp :: how to execute a function in every object of list c# 
Csharp :: skrivetænking 
Csharp :: c# picturebox zoom 
Csharp :: uity pause game 
Csharp :: Set property of control on form by name 
Csharp :: initialization of dictionary in other forms c# 
Csharp :: how to make a respaen script in unity 
Csharp :: make wpf run in fullscreen but above windows taskbar 
Csharp :: pem file string reader c# 
Csharp :: if equal statement c# 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =