Guest User

Untitled

a guest
Nov 17th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. namespace DailyAnlytics
  2. {
  3. public class Startup
  4. {
  5. public Startup(IConfiguration configuration)
  6. {
  7. Configuration = configuration;
  8. }
  9.  
  10. public IConfiguration Configuration { get; }
  11.  
  12. public void ConfigureServices(IServiceCollection services)
  13. {
  14. services.AddMvc();
  15. }
  16.  
  17. public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  18. {
  19. if (env.IsDevelopment())
  20. {
  21. app.UseBrowserLink();
  22. app.UseDeveloperExceptionPage();
  23. }
  24. else
  25. {
  26. app.UseExceptionHandler("/Error");
  27. }
  28.  
  29. app.Use(async (context, next) =>
  30. {
  31. //...
  32. });
  33.  
  34. app.UseDefaultFiles();
  35. app.UseStaticFiles();
  36. app.UseStaticFiles(new StaticFileOptions
  37. {
  38. FileProvider = new PhysicalFileProvider(
  39. Path.Combine(Directory.GetCurrentDirectory(), "Mycustomfolder")),
  40. RequestPath = "/Mycustomfolder"
  41. });
  42.  
  43. app.UseMvc(routes =>
  44. {
  45. routes.MapRoute("default", "main{controller}/{action?}/{id?}");
  46. });
  47. }
  48. }
  49. }
Add Comment
Please, Sign In to add comment