1

I am on a long journey to learn C# and ASP.NET 5 to become a full web stack developer (already have a decent grasp on HTML/CSS/JS).

I have an Azure Web App I am building and I have set up a few things such as 301 redirects to www.example.com (for SEO optimization), caching of static content such as images and CSS, some security headers, etc.

In ASP.NET 4.6 I was using web.config to set most of these up. However, in ASP.NET 5 (and MVC 6) I understand the web.config file is no longer being used (but is still present in the wwwroot folder).

Can anyone tell me how can I accomplish redirecting from http://example.com to http://www.example.com using ASP.NET 5 and MVC 6? Is it done via routing? Middleware? Still using web.config?

Thank you.

MaxT
  • 261
  • 3
  • 8

1 Answers1

0

You have to use appsettings.json or project.json

Probably this link may help you.

ASP.NET 5 (vNext) - Getting a Configuration Setting

Community
  • 1
  • 1
Keppy
  • 471
  • 1
  • 7
  • 23