简体   繁体   中英

How to add Default.aspx as default document

I have a new Windows Server 2016 with IIS 10.0.

I have a ASP.NET 4.6.2 application with a Default.aspx file.

When I point my browser to the application I get this error:

HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.

I suspect that IIS is not configured for ASP.NET because the Default Document does not include Default.aspx .

I have .Net Framework 4.6.2 as evidenced that I get an error message that is is already installed when I try to install it again.

The application pool lists CLR 4.0 , but does not allow me to change it to 4.6.2.

What do I try to get this configured to load my Default.aspx.

When I google I stumble on things that tell me to run stuff from the command line. I am perfectly comfortable running things from the command line but what I am doing is do vanilla that I can't believe I need to do something from the commandline.

[EDIT] Here is what happened when I added Default.aspx as a default document: 在此处输入图片说明

There are a few things to try, but all the instructions are a bit to vague for me to follow with confidence. It also seems weird that I would have to run a commandline thing for something so common as getting IIS to use ASP.NET.

[EDIT] Here are the settings for the Default page:

在此处输入图片说明

[EDIT] Here is the configuration of the Application Pool:

在此处输入图片说明

After going down all kinds of wrong paths I found this link:

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45

which amounted to getting 4.6 checked on this wizard screen and pressing install. It was confusing because this is under the development category and this is not a development machine.

在此处输入图片说明

Note: the hand added Default.aspx caused a conflict so I had to remove it from web.config by hand.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM