Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Custom Login View modes: 
User avatar
Member
Member
AlgarveWeb - 3/10/2011 3:03:12 AM
   
Custom Login
Hi

I am trying to create a custom login vith VB.NET:

Dim user As UserInfo = Nothing
user = CMS.SiteProvider.UserInfoProvider.AuthenticateUser("FSCC", "FSCC", CMS.CMSHelper.CMSContext.CurrentSiteName)
If Not user Is Nothing Then
' Authentication was successful
End If

but only get

http://ms.fsccqdl.com/login.aspx?ReturnUrl=%2fhome.aspx

all the time.

Please advice, thanks, Mike.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/10/2011 9:49:32 AM
   
RE:Custom Login
Hi Mike,


Where do you use your code? (what web part? or ASPX template?)

If you debug the solution, does the authenticate method return a user?


Best regards,
Helena Grulichova

User avatar
Member
Member
AlgarveWeb - 3/11/2011 1:21:06 AM
   
RE:Custom Login
Hi Helena

Thanks for your quick reply.

The code is in a CMS Webpart, when I verify the EventLog it says that the user is Authenticated, please see details at the end of this message.

I must admit that I am not sure how to Debug this!

I also tried your sample (Authenticating user) from your docs (C#) and it does exactly the same.

When I use your own Logon Control (which I can't use) it works fine.

Please advice, thanks, Mike.

EventID: 56293
EventType: I
EventTime: 3/11/2011 6:59:40 AM
Source: Authentication
EventCode: AUTHENTICATIONSUCC
UserID: 85
UserName: FSCC
IPAddress: 85.243.3.202
Site: FSC MS
EventUrl: /login.aspx?ReturnUrl=%2fdefault.aspx
EventMachineName: AWB
EventUserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
EventUrlReferrer: http://ms.fsccqdl.com/login.aspx?ReturnUrl=/default.aspx

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/21/2011 10:53:45 AM
   
RE:Custom Login
Hello,


how do you know you are not authenticated?

Do you use a Default target URL property for your logon web part? If so, it means that the user could be authenticated and then redirected to this URL.

Could you please check the cookies if you are authenticated or not?

You can debug it as any other ASP.NET application in your Visual studio. If you are not sure, please use Google to find some help (for example http://msdn.microsoft.com/en-us/library/sc65sadd.aspx).


Best regards,
Helena Grulichova