Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationManual AD Login Causes InnerException: Bad Data (v2 Beta) Manual AD Login Causes InnerException: Bad Data (v2 Beta)
Previous
 
Next
New Post
1/8/2008 1:13 PM
 

We are currently running 4.8.0 with the v.2 beta release of the AD provider on our company intranet. When users are not logged in automatically and use the windows login it is throwing and error Bad Data. This was working in 4.7 just as an FYI and only started with the new AD provider. I guess the first question is why are users that are in the database not getting authenticated  and logged in automatically all the time. I did some trouble shooting logged out and was not logged back in automatically. So I deleted all the cookies on the client and did an iisreset and was then logged in automatically.

Here is the error from the events log when logging in manually. I also found anothe error that is occuring when logged in automatically which is below this.

AssemblyVersion: 04.08.00
PortalID: 0
PortalName: EFT Intranet Portal
UserID: -1
UserName:
ActiveTabID: 36
ActiveTabName: EFT Home
RawURL: /EFTHome/tabid/36/ctl/Login/Default.aspx?returnurl=%2fEFTHome%2ftabid%2f36%2fctl%2fLogin%2fDefault.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://wwwdev.eft.fiserv.net/EFTHome/tabid/36/ctl/Login/Default.aspx?returnurl=%2fEFTHome%2ftabid%2f36%2fctl%2fLogin%2fDefault.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: e824fc01-939c-4eb7-9854-6584020d1eff
InnerException: Bad Data.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Bad Data. ---> System.Security.Cryptography.CryptographicException: Bad Data. at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone) at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) at System.Web.Security.MembershipProvider.DecryptPassword(Byte[] encodedPassword) at System.Web.Security.MembershipProvider.UnEncodePassword(String pass, Int32 passwordFormat) at System.Web.Security.SqlMembershipProvider.GetPassword(String username, String passwordAnswer) at System.Web.Security.MembershipUser.GetPassword() at DotNetNuke.Security.Membership.AspNetMembershipProvider.ChangePassword(UserInfo user, String oldPassword, String newPassword) at DotNetNuke.Entities.Users.UserController.ChangePassword(UserInfo user, String oldPassword, String newPassword) at DotNetNuke.Authentication.ActiveDirectory.Login.WindowsAuthorization(UserLoginStatus& loginStatus, String IP) at DotNetNuke.Authentication.ActiveDirectory.Login.cmdLogin_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: TEFT03IS04

 

1/8/2008 12:29:00 PM   Login Success

IP: 10.204.24.17
WindowsAuthentication: True
Server Name: TEFT03IS04

1/8/2008 12:28:58 PM General Exception Error when logged in automatically.

AssemblyVersion: 04.08.00
PortalID: 0
PortalName: EFT Intranet Portal
UserID: -1
UserName:
ActiveTabID: 36
ActiveTabName: EFT Home
RawURL: /Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: ec6366d8-ece0-44a8-b79e-8a90646a67ab
InnerException: Error processing AD login
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Threading.Thread.AbortInternal
StackTrace:
Message: System.Exception: Error processing AD login ---> System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at System.Web.HttpResponse.Redirect(String url) at DotNetNuke.Authentication.ActiveDirectory.HttpModules.AuthenticationModule.OnAuthenticateRequest(Object s, EventArgs e) --- End of inner exception stack trace ---
Source:
Server Name: TEFT03IS04

 
New Post
1/8/2008 3:51 PM
 

Thanks Dan

I'll do some checking to see if I can't recreate the error.

 
New Post
1/14/2008 7:27 AM
 

Any luck reproducing this error? we are no longer able to use the Windows\Active Directory login, it takes a page_load exception. I have done some additional testing and it is related to the cookie. If I logout and try to login I get this error, when I logout then bring up the Windows login then delete my cookie while the windows login page is still up, guess what no bad data error. I found a post from 2005 http://aspadvice.com/blogs/rjdudley/archive/2005/07/15/2634.aspx which is the same error. 

Can this be the cause http://blogs.msdn.com/shawnfa/archive/2005/11/10/491431.aspx

 

AssemblyVersion: 04.08.00
PortalID: 0
PortalName: EFT Intranet Portal
UserID: -1
UserName:
ActiveTabID: 36
ActiveTabName: EFT Home
RawURL: /EFTHome/tabid/36/ctl/Login/Default.aspx?returnurl=%2fEFTHome%2ftabid%2f36%2fDefault.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://wwwdev.eft.fiserv.net/EFTHome/tabid/36/ctl/Login/Default.aspx?returnurl=%2fEFTHome%2ftabid%2f36%2fDefault.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 741ac8e4-1074-42ac-b722-15a64a07ce6a
InnerException: Bad Data.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Bad Data. ---> System.Security.Cryptography.CryptographicException: Bad Data. at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone) at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) at System.Web.Security.MembershipProvider.DecryptPassword(Byte[] encodedPassword) at System.Web.Security.MembershipProvider.UnEncodePassword(String pass, Int32 passwordFormat) at System.Web.Security.SqlMembershipProvider.GetPassword(String username, String passwordAnswer) at System.Web.Security.MembershipUser.GetPassword() at DotNetNuke.Security.Membership.AspNetMembershipProvider.ChangePassword(UserInfo user, String oldPassword, String newPassword) at DotNetNuke.Entities.Users.UserController.ChangePassword(UserInfo user, String oldPassword, String newPassword) at DotNetNuke.Authentication.ActiveDirectory.Login.WindowsAuthorization(UserLoginStatus& loginStatus, String IP) at DotNetNuke.Authentication.ActiveDirectory.Login.cmdLogin_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: TEFT03IS04

 
New Post
1/14/2008 12:13 PM
 

Wait. So you can't log in manually at all?!?

I haven't been able to recreate the problem myself though I have seen where I'm getting a "Timed Out, Thread abort" type error (I don't have the exact error handy) but users are still getting logged in both automatically and manually. I suspect that this has always been happening but I added a Try/Catch to one of the procedures which is where the error is coming from.

I haven't been able to recreate the Bad Data error you're seeing and the blog post you refer to (which refers to a thread on the old ASPNET forums) was related to trying to log into multiple portals when "Remember Login" was clicked on one.

 
New Post
1/14/2008 3:37 PM
 

Yes that is correct we cannot use the manual login at all if the cookie exist until the cookie is deleted. The bad data error somtimes is an attempt to store the result of an encryption operation in a string, are you using Base64 encoding?

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationManual AD Login Causes InnerException: Bad Data (v2 Beta) Manual AD Login Causes InnerException: Bad Data (v2 Beta)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out