我的web.config中有这样的东西:
<authentication mode="Forms">
<forms loginUrl="MyVirtualDirectory/Login/Login" protection="All" timeout="15" />
</authentication>
但是,我正在尝试实现一些“假的”虚拟目录,似乎无法弄清楚如何在运行时使loginUrl的“MyVirtualDirectory”部分动态化。
Reading this MSDN article,似乎我可以设置此属性,但是将其添加到Application_Start或Application_BeginRequest似乎不起作用。
有任何帮助吗?谢谢!