YAFLogo

shanker
  • shanker
  • 64.4% (Friendly)
  • YAF Camper Topic Starter
10 years ago
I have an custom page... mypage.aspx... i need to check if the user is registered in my forums or not..

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

I have an custom page... mypage.aspx... i need to check if the user is registered in my forums or not..

Originally Posted by: shanker 


// Check if user is logged in
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
               // do something when user is logged in
            }
shanker
  • shanker
  • 64.4% (Friendly)
  • YAF Camper Topic Starter
10 years ago
Who thanks alot...

I have a new problem now..

/yaf_login.aspx?returnurl=%2fdownload.aspx this is my link.. but after login in.. there user is sent to default page...

i want to redirect to download.aspx

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Who thanks alot...

I have a new problem now..

/yaf_login.aspx?returnurl=%2fdownload.aspx this is my link.. but after login in.. there user is sent to default page...

i want to redirect to download.aspx

Originally Posted by: shanker 

Thats a bug in the current urlrewriter.config. Open this config file in a editor and replace the line...

<rewrite url="^~/(.+?)?yaf_login?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&amp;$5" processing="stop" />

with this one

<rewrite url="^~/(.+?)?yaf_login?\.aspx\?(.+)?$" to="~/$1Default.aspx?g=login&amp;$2" processing="stop" />
shanker
  • shanker
  • 64.4% (Friendly)
  • YAF Camper Topic Starter
10 years ago
Awesome... You rock...

Another Question..

Can you tell me a way i can place the whole forum as a custom control inside my masterpage..

what things i should take care of....

I am interested in integrating h yaf inside my website in .net

Regard's

Shanker Paudel

Thanks Alot Again

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Awesome... You rock...

Another Question..

Can you tell me a way i can place the whole forum as a custom control inside my masterpage..

what things i should take care of....

I am interested in integrating h yaf inside my website in .net

Regard's

Shanker Paudel

Thanks Alot Again

Originally Posted by: shanker 

Technically you can place the forum control anywhere you want. The only thing you might need to adjust are the app.config.

For example if you put the forum itself in a sub folder you need to set

In the App.config

You could also check the sample application (with yaf integrated) which is available here...

https://github.com/YAFNET/YAFNET/wiki/YAF.NET-Integration-in-to-an-existing-ASP.NET-Application