Posted by: Zero2Cool - Tuesday, 3 July 2012 16:57:30
Currently, my site is in DotNetNuke with the YetAnotherForum plugin. What steps are needed to remove DNN so I can use YAF solo?
I made a fresh install of YAF and connected to my DNN-YAF database, which worked great, except I couldn't log in, lol.
Posted by: bbobb - Tuesday, 3 July 2012 19:17:48
Basically, you don't have to make a fresh install, you simply need a YAF code which is in sync with the module version. The problem can be with ASP.NET Memebership, Role and Profile Providers. YAF can use any, you should simply figure out what happens in your case in YAF tables like something_prov_something.
Posted by: Zero2Cool - Tuesday, 3 July 2012 23:13:40
I went with a fresh install because I figured it would be best to avoid any of the DNN changes and easier to upgrade. I was hoping I could just copy over the membership tables needed, but from what you're saying, it looks like I'm not experienced enough to pull this transition off all that swiftly.
Posted by: bbobb - Wednesday, 4 July 2012 02:47:22
I can't help you much as I don't remember how the module works, tha_watcha could be more helpful.
Posted by: tha_watcha - Wednesday, 4 July 2012 12:12:41
[quote=Zero2Cool;55251]Currently, my site is in DotNetNuke with the YetAnotherForum plugin. What steps are needed to remove DNN so I can use YAF solo?
I made a fresh install of YAF and connected to my DNN-YAF database, which worked great, except I couldn't log in, lol.[/quote]
You need to change the provider settings then you should be able to login, it worked on my tests
[code=xml][/code]
Posted by: Zero2Cool - Wednesday, 4 July 2012 16:11:08
I have PackersHome.com with DNN/YAF and a placeholder site NoEqualSolutions.info which has YAF only.
I changed the db.config to point at the PH database, and made the posted changes to the NES web.config and I think I messed something up, because on the NES site, I got this.
[quote=Server Error]500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.[/quote]
Is it possible to be able to log into the PH site, using the PH database and log into the NES site, with the PH database?
I'm hoping to have a pure standalone YAF database, and remove all the DNN stuff.
Posted by: tha_watcha - Wednesday, 4 July 2012 16:36:54
You Need to Set the customErrors mode to "Off" in your Web.config in order to See the Full error message.
In theory you can use One Db, but ist Not recommended only when you have a Full Backup of it. So if you mess something up you can easily restore it.
Posted by: Zero2Cool - Wednesday, 4 July 2012 16:44:41
[quote=tha_watcha;55267]You Need to Set the customErrors mode to "Off" in your Web.config in order to See the Full error message.
In theory you can use One Db, but ist Not recommended only when you have a Full Backup of it. So if you mess something up you can easily restore it.[/quote]
This is what I have for my customerErrors
[code=xml][/code]
I do have full backup being done daily, but restoring the PH database to NES on my host takes a long time.
Edit, do I need to copy over a DLL to the NES/bin directory?
Posted by: bbobb - Wednesday, 4 July 2012 16:58:09
It seems your Web.config can't be parsed. Check it. But you have all info now to make what you need.
Posted by: Zero2Cool - Wednesday, 4 July 2012 17:12:17
This portion of web.config works to view the forums on NES, but does not allow users to be logged in.
[code] [/code]
When I replace that exact portion with this, I get the Server Error quoted previously.
[code] [/code]
Posted by: tha_watcha - Wednesday, 4 July 2012 17:38:11
Sorry one " too much
[code=xml;-1][/code]
Posted by: Zero2Cool - Wednesday, 4 July 2012 17:54:33
I missed that too.
I made the change to the web.config.
The NES site works again, however, the Forum Login button is unresponsive.
Edit, NES site Forum Login wouldn't respond with the NES database either. When I reverted back to the original web.config, I was able to log into the NES database, but still not the PH databse.
I'm gonna keep poking around the web.config
Posted by: Zero2Cool - Wednesday, 4 July 2012 18:38:51
While using the NES db and NES web.config with original settings, I logged in
Then switched to the PH db and made the posted changes to the web.config and it says I'm logged in, lol. I'm able to post and everything.
But when I logged out and tried to log back in, the Forum Login button is still unresponsive. It's as if it doesn't have an event to fire off.
Do I need to bring a DLL over to the NES /bin directory?
Posted by: Zero2Cool - Wednesday, 4 July 2012 23:52:49
Server Error in '/' Application.
You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ProviderException: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.]
System.Web.Security.MembershipProvider.EncryptPassword(Byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode) +9861
System.Web.Security.SqlMembershipProvider.EncodePassword(String pass, Int32 passwordFormat, String salt) +505
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +122
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +302
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +111
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +413
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +121
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +125
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Posted by: tha_watcha - Thursday, 5 July 2012 01:06:26
Server Error in '/' Application.
You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ProviderException: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.]
System.Web.Security.MembershipProvider.EncryptPassword(Byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode) +9861
System.Web.Security.SqlMembershipProvider.EncodePassword(String pass, Int32 passwordFormat, String salt) +505
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +122
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +302
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +111
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +413
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +121
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +125
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Posted by: Zero2Cool - Thursday, 5 July 2012 01:22:17
I've been toying with the web.config and got the creation of users to work. I've created a user, tested it, confirmed the email and logged in with the new user.
Correct Username, Bad or Correct Password = Forum Login button does nothing.
Bad Username, Bad or Correct Password = Forum Login button prompts message stating "The user name or password entered is incorrect. Please try again."
This is what got the registration to work. But, I still can't log into NES with a user that was created on PH.
[code=xml] [/code]
Posted by: Zero2Cool - Thursday, 5 July 2012 01:28:25
[quote=tha_watcha;55282][quote=Zero2Cool;55280]I tried to create a new user, the error in the Spoiler tags is shown.
You can resolve the error by adding a machinekey to your web.config, you can generate one here:
http://aspnetresources.com/tools/machineKey
[/quote]
I've added the MachineKey to my web.config. I am still able to register new users, as mentioned in the post above.
Unfortunately, I still have not figured out how to log into NES (YAF) with users that were created via the PH (DNN/YAF) site.
Posted by: Zero2Cool - Thursday, 5 July 2012 01:51:45
This is making me wish I never even heard of DNN and knew about the_watcha's sample and used YAF from the start.
Two sites with the goal of PH being YAF with no DNN at all.
Currently ...
PackersHome.com uses DNN/YAF.
NoEqualSolutions.info uses YAF.
While both sites connected to the same database, I tried the Lost Password feature on NES for one username and it worked as it is intended. I was able to log into NES with the username that was created from the PH site. I was thinking okay, so all the users will have to request a new password and update their password. That's a fine last resort. Until I tried the Lost Password on that account again and now the account is locked.
After spending most of the day trying to figure this out, I'm starting to feel that what I thought would be an easy alteration, even if it meant I had to write some code to transfer everything from one database to another ... is not all that possible after all?
Posted by: tha_watcha - Thursday, 5 July 2012 03:01:15
[quote=Zero2Cool;55285]Is it possible to make it so users created with DNN/YAF will be able to use their same password to log into the YAF site?[/quote]
Take a Look at your dnn Web.config And make sure that the provider Settings are the same in the yaf web.config. If that's the case you should be able to login.
Posted by: Zero2Cool - Thursday, 5 July 2012 03:06:45
[quote=tha_watcha;55286][quote=Zero2Cool;55285]Is it possible to make it so users created with DNN/YAF will be able to use their same password to log into the YAF site?[/quote]
Take a Look at your dnn Web.config And make sure that the provider Settings are the same in the yaf web.config. If that's the case you should be able to login.[/quote]
I'm still waiting for my backup to upload from PH to NES so I can do better testing, but when it's completed, I'll give it a try and respond. I do know I did try it before and it failed, but I'm not sure what exactly the problem was. But using the dnn web.config is how I was able to get the YAF stand alone site to allow users to register successfully.
Posted by: Zero2Cool - Thursday, 5 July 2012 03:19:13
Below is the provider information in my DNN web.config. I changed the connectionStringName to yafnet. Still no user created from DNN/YAF is able to log in via the stand alone YAF.
[code=xml;-1][/code]
Posted by: Zero2Cool - Thursday, 5 July 2012 07:17:05
Well, thanks for the help, but I'm at a loss. I don't know what more to try. I'm confident that the password I'm sending is being Encrypted differently from YAF than DNN, or something like that.
I'll keep monkeying around with it tomorrow and if I figure it out, I'll reply.
Posted by: squirrel - Thursday, 5 July 2012 09:16:57
This is just a thought... In the past, when I had migrated/upgraded a DNN installation I had, the machine keys from the old web.config of the DNN did not make it through the upgrade into the new one, and no DNN user could login.
In the case where you had YAF installed with DNN using DNN/ASP.NET membership, then the passwords would have been encrypted using DNN's concept... I know you said you generated a set of keys, and you've copied the role/profile stuff in from the DNN config. Just for kicks, try pulling in the DNN machinekeys from your dnn webconfig into the site you're trying to login with and can't...
I don't have tons of experience in the .NET side, but that's just a thought I want to put out there since I know when my keys got fouled up in the past with the DNN installation, I couldn't login. So I'm thinking that if you had those keys since you're trying to login YAF users against a 'former DNN membership' - it might work -- just might... One of those 'shot in the dark things'...
Posted by: Zero2Cool - Thursday, 5 July 2012 15:23:56
When I created a user on the YAF site, using the DNN/YAF database, the Password Format is '1', where as all the DNN/YAF users are '2'.
I found this in my aspnet_Membership table on my DNN/YAF database, does it mean anything? Any glimmer of hope? lol
I think if I can figure out how to use password format 2 on the YAF stand alone site, I should be good to go, right?
Edit, Password format (0=Plaintext, 1=Hashed, 2=Encrypted)
Posted by: Zero2Cool - Thursday, 5 July 2012 15:34:45
[quote=squirrel;55292]This is just a thought... In the past, when I had migrated/upgraded a DNN installation I had, the machine keys from the old web.config of the DNN did not make it through the upgrade into the new one, and no DNN user could login.
In the case where you had YAF installed with DNN using DNN/ASP.NET membership, then the passwords would have been encrypted using DNN's concept... I know you said you generated a set of keys, and you've copied the role/profile stuff in from the DNN config. Just for kicks, try pulling in the DNN machinekeys from your dnn webconfig into the site you're trying to login with and can't...
I don't have tons of experience in the .NET side, but that's just a thought I want to put out there since I know when my keys got fouled up in the past with the DNN installation, I couldn't login. So I'm thinking that if you had those keys since you're trying to login YAF users against a 'former DNN membership' - it might work -- just might... One of those 'shot in the dark things'...[/quote]
Thank you!
I pulled the MachineKey from the dnn web.config, put it into the yaf web.config and I'm able to log into old DNN/YAF accounts AND the test account I made on YAF.
I figured it was something easy that I was just missing. Ugh, a whole day wasted, but at least it's working now. Thank you and the_watcha and bbobb.