ASP.NET MVC应用程序的默认登录直播网站,主页视图在localhost视图 [英] ASP.NET MVC application defaults to LogIn view on live site, Home view on localhost
问题描述
我在创建使用ASP.NET MVC网站的过程。我去把它发布到网上,并由于某种原因登录视图上来,而不是主视图。我还没有实现(不知道如果我打算)任何形式的采伐在所有因为这是一个相当简单的网站。
I am in the process of creating a website using ASP.NET MVC. I went to publish it to the web, and for some reason the LogIn view comes up rather than Home view. I have not implemented (not sure if I intend to) any sort of logging in at all since this is a rather simple web site.
我99%肯定,我忽视的东西非常简单和明显,但最喜欢的问题,我不明白说的问题。
I am 99% certain I am overlooking something extremely simple and obvious but like most problems, I cannot see said issues.
如果需要了解更多信息,请让我知道,我会很乐意提供。
If more information is required, please let me know and I will be glad to provide.
谢谢!
推荐答案
是否对生产web.config文件中启用身份验证?默认情况下,在任何新的MVC项目web.config文件中有这样的:
Does your web.config file on production have authentication enabled? By default, you have this in any new MVC project web.config file:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
更改身份验证模式=none或删除元素将禁用验证。
Changing authentication to mode="None" or removing the element will disable authentication.
这篇关于ASP.NET MVC应用程序的默认登录直播网站,主页视图在localhost视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!