I just downloaded and installed the starter kit. Then I attached the database to my SQL server and commented the classifiedsConnection in the connection strings in web.config and added a new classifiedsConnection with the connection infor to the restored
database. Then when I ran the web site, it opened the site without any issues. When I click on the login link, it gave me the following error.
Object reference not set to an instance of an object.
Now even when I stop and restart the site in VS2005 it keeps giving me the above error at the following line of code.
Line 23: Protected Sub PasswordRecovery_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordRecovery.Init
Line 24: Dim s As SiteSettings = SiteSettings.GetSharedSettings()
Line 25: PasswordRecovery.MailDefinition.From = s.SiteEmailFromField
Line 26: End Sub
Line 27:
When I checked the contents in the debug mode, I do see values for variable s, but it keeps giving me the error. Also in debug mode it stops at the above line and displays "Use the New keywork to create an object instance"
I am not sure how to fix this. I am using SQL 2005 with VS 2005.
coolvaas1
Participant
938 Points
435 Posts
Object reference not set to an instance of an object.
May 07, 2010 06:31 PM|LINK
I just downloaded and installed the starter kit. Then I attached the database to my SQL server and commented the classifiedsConnection in the connection strings in web.config and added a new classifiedsConnection with the connection infor to the restored database. Then when I ran the web site, it opened the site without any issues. When I click on the login link, it gave me the following error.
Object reference not set to an instance of an object.
Now even when I stop and restart the site in VS2005 it keeps giving me the above error at the following line of code.
Line 23: Protected Sub PasswordRecovery_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordRecovery.Init
Line 24: Dim s As SiteSettings = SiteSettings.GetSharedSettings()
Line 25: PasswordRecovery.MailDefinition.From = s.SiteEmailFromField
Line 26: End Sub
Line 27:
When I checked the contents in the debug mode, I do see values for variable s, but it keeps giving me the error. Also in debug mode it stops at the above line and displays "Use the New keywork to create an object instance"
I am not sure how to fix this. I am using SQL 2005 with VS 2005.
Any help is greatly appreciated.