RDarling
  •  RDarling
  • 56% (Neutral)
  • YAF Camper Topic Starter
2009-04-27T10:53:23Z
I have just downloaded and setup 1.9.3 and I have integrated it with my site.

My login page is on a different server than my yetanotherforum.

If I login from my login page and have it redirect to the default.aspx page everything works fine.
But if I try to redirect the user from my login page to a specific topic:

ie "http://myforum.com/YetAnotherForum.NET/default.aspx?g=topics&f=161"

I get an error saying "Access Denied"

I have debuged the issue and found that it sees the "g=topics" in the query string but not any portion after that.

If have also unchecked "Enable Url Referrer Security Check"

The original url for redirection when sent to the login page looks like this:

"http://myloginserver.com/login.aspx?ReturnUrl=http://myforum.com/YetAnotherForum.NET/default.aspx?g=topics&f=161"

Any help is appreciated. Thank you.

Robert
Sponsor
Mek
  •  Mek
  • 100% (Exalted)
  • YAF Developer
2009-04-27T11:04:08Z
Confused. Are both servers under the same domain; as i was under the impression that the login cookies automatically took your domain into account (even subdomain).
So therefore they wouldn't be logged in when you redirected them to the yaf server... or am I just talking nonsense ;-)

UserPostedImage 

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )
RDarling
  •  RDarling
  • 56% (Neutral)
  • YAF Camper Topic Starter
2009-04-27T11:31:29Z
Mek wrote:

Confused. Are both servers under the same domain; as i was under the impression that the login cookies automatically took your domain into account (even subdomain).
So therefore they wouldn't be logged in when you redirected them to the yaf server... or am I just talking nonsense ;-)



Sorry bout that. Yes both servers are under the same domain name and the cookies work fine, i just used dummy names so I wasnt posting my info in there.

here would be the correct naming for it:

"http://forum.mysite.com/YetAnotherForum.NET/default.aspx?g=topics&f=161"
"http://login.mysite.com/login.aspx?ReturnUrl=http://forum.mysite.com/YetAnotherForum.NET/default.aspx?g=topics&f=161"
RDarling
  •  RDarling
  • 56% (Neutral)
  • YAF Camper Topic Starter
2009-04-28T05:46:51Z
Ok, I found out what the problem was. I was not performing a Server.UrlEncode on the query string before sending it to the login page.
new_Developer
2010-11-23T09:57:50Z
hi,
i have the same problem ,but it doesnt work with me Server.UrlEncode , i put it in the login page in login click method
protected void LoginButton_Click(object sender, EventArgs e)
{
Response.Redirect(
Server.UrlEncode(FormsAuthentication.GetRedirectUrl(Login1.UserName,
false)));
}

The page cannot be found error as url contain lots of characters like this default.aspx%3fg%3dinfo%26i%3d4

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved