我在4.0 (我的第一次)中开发了一个应用程序,我只有2个页面。我部署了它,如果我输入www.mytestapp.com/testpage.aspx,它可以正常工作
但是,如果我只输入mytestapp.com,它会将其重定向到www.mytestapp.com/Account/Login.aspx?ReturnUrl=%2f
我想这是因为我的web.config文件中有以下几行代码。但是当我注释掉这些行并部署代码时
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>如果我输入www.mytestapp.com/testpage.aspx,它会要求我输入用户I和密码。
我该怎么解决这个问题??如何才能让应用程序默认转到testpage.aspx,而不询问任何用户I和密码?
发布于 2011-12-20 00:30:49
为ASP.net会话和FormAuthentication cookie生成的HttpCookie存在问题。Web.Config放了这个
<system.Web>
<httpCookies domain=".mytestapp.com" />
</system.web> https://stackoverflow.com/questions/8564212
复制相似问题