ASP.NET MVC not serving default document

后端 未结 6 994
北恋
北恋 2020-12-29 06:07

I have an ASP.NET MVC application where the default page should be index.html which is an actual file on disk.

I can browse to the file using www.mydomain.com/index.

6条回答
  •  清歌不尽
    2020-12-29 06:46

    I suspect you added index.html yourself as that extension would be unknown to the mvc framework.

    Your default index page in mvc is //domain/home/index and is physically index.aspx.

    If you call your domain using //domain then the routing engine will assume /home/index.aspx and not index.html.

提交回复
热议问题