Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 使用index.html作为默认页面_Asp.net_Deployment - Fatal编程技术网

Asp.net 使用index.html作为默认页面

Asp.net 使用index.html作为默认页面,asp.net,deployment,Asp.net,Deployment,我正在尝试将index.html页面设置为默认页面,并希望在加载asp.net网站时显示该页面。我已经读过十几篇关于这个问题的不同帖子,但没有一个解决方案有效 我在web.config中添加了defaultDocument元素,并将index.html设置为iis中的默认页面。我甚至创建了一个空的Default.aspx页面,添加了一个Global.asax文件,然后使用server.transfer重定向到index.html 我尝试过的方法都不起作用,当我的站点加载时,它会重定向到login

我正在尝试将index.html页面设置为默认页面,并希望在加载asp.net网站时显示该页面。我已经读过十几篇关于这个问题的不同帖子,但没有一个解决方案有效

我在web.config中添加了defaultDocument元素,并将index.html设置为iis中的默认页面。我甚至创建了一个空的Default.aspx页面,添加了一个Global.asax文件,然后使用server.transfer重定向到index.html

我尝试过的方法都不起作用,当我的站点加载时,它会重定向到login.aspx页面,而不是index.html页面。我曾试图让我的主机公司techsupport提供帮助,但他们中没有一人精通dotnet或windows主机。请帮我找到解决方法,谢谢。


<location path="index.html">
      <system.web>
         <authorization>
            <allow users="*"/>
         </authorization>
      </system.web>
   </location>

如果您使用的是表单身份验证,则该文件可能对匿名用户不可用,因此您需要在web.config上公开该文件。在发布我的问题之前,我已经这样做了,但感谢您的回复。您是否在iis中将默认页面设置为index.html?