开发者

asp.net login control relative url problem

login CreateUserUrl="~/user/page.aspx" goes to x.com/user/page.aspx instead of x.com/dir/user/page.aspx

So I have this format for my asp:login tag:

    <a开发者_开发问答sp:Login ID="loginMain" runat="server" OnAuthenticate="OnAuthenticate" 
            CreateUserText="Request Account"
            CreateUserUrl="/user/RequestAccount.aspx"
            PasswordRecoveryText = "Forgot Password"
            PasswordRecoveryUrl = "/user/ForgotPassword.aspx"
            UserNameLabelText="Username:"/>

This works in my localhost IIS7. But on my server IIS6, the site is in a specific directory (it's not a folder, just a setting in IIS), like this: domain.com/virtualdir/login.aspx

So when I am at that page, I click Request account, it goes to domain.com/user/RequestAccount.aspx which gives 404.

I want it to go to domain.com/virtualdir/user/RequestAccount.aspx

Why does IIS make the links incorrectly and not notice that I am in /virtualdir/ ?

How do I fix this?

EDIT: It seems I totally forgot I had a Login.skin file, which is adding the link in manually, which cannot be altered. Let me do some testing.


I decided to stop using "asp:login" and just building my own custom login form. Solved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜