Access to the MVC project template for Visual Studio 2015 is denied

I created a very simple MVC application in VS2015 that has some basic CSS style and some HTML to get the application from the ground faster.

The application works fine.

I exported it as a template using File -> Export Template ...

Then I created a completely new project based on this type of project. So far, so good. But now, when I start the newly created project, I get a blank page with "Access Denied" (see. Image).

I am looking through a draft template and a new project with a thin comb, and I can not find any differences. Why work, while others are denied access? I am out of ideas, any help is appreciated.

Access is denied

EDIT:

After further research, I found the cause of the problem, but not the solution.

It appears that the Anonymous Authentication project template is disabled and the project settings are set to Windows Authentication on. However, when I create a project based on a template, these values ​​are inverted and therefore cause access denial.

Here is an image of the project parameters in the template :

enter image description here

Here is an image of the project settings in the "new" project:

enter image description here

Note that both authentication options are upside down. Can someone tell me how to do this not ?

Edit 2:

As suggested, applicationhost.config files are different, which causes the above problem. Here is the security section of the applicationhost.config template:

enter image description here

However, here is the same file in the new project, created based on the template:

enter image description here

Please note that the section is completely missing from the new project. So now the question is, how can you translate this into new projects?

+6
source share
2 answers

As suggested by BrianLegg, I forward my comments to the answer

The problem seems to be related to the applicationhost.config file. These files are not displayed in the zip file that contains the template.

You can take a look at the attribute of the physical path on

<system.applicationHost> <sites> 

Perhaps he is trying to access the first project instead of a new one.

Could you check what is in your applicationHost.config template?

See Where the applicationHost.config file template is stored

+1
source

Have you seen the global routes? can it be something not created or damaged?

0
source

All Articles