Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace DailyAnlytics
- {
- public class Startup
- {
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
- public IConfiguration Configuration { get; }
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddMvc();
- }
- public void Configure(IApplicationBuilder app, IHostingEnvironment env)
- {
- if (env.IsDevelopment())
- {
- app.UseBrowserLink();
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseExceptionHandler("/Error");
- }
- app.Use(async (context, next) =>
- {
- //...
- });
- app.UseDefaultFiles();
- app.UseStaticFiles();
- app.UseStaticFiles(new StaticFileOptions
- {
- FileProvider = new PhysicalFileProvider(
- Path.Combine(Directory.GetCurrentDirectory(), "Mycustomfolder")),
- RequestPath = "/Mycustomfolder"
- });
- app.UseMvc(routes =>
- {
- routes.MapRoute("default", "main{controller}/{action?}/{id?}");
- });
- }
- }
- }
Add Comment
Please, Sign In to add comment