Page 1 of 2
Object reference not set to an instance of an object.DHL Int
Posted: Wed Feb 04, 2009 8:51 am
by johnhardy
I have downloaded AC 7 for asp.net and am using Visual Studio
I am getting errors and wonder if anyone can assist me getting through these.
I am using IIS and have set full permissions for IUSR and NETASP
I have checked the database connection
Thanks
John
=================================
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath(String path, Boolean create) +366
CommerceBuilder.Web.UI.AbleCommercePage.InitializeTheme() +732
CommerceBuilder.Web.UI.AbleCommercePage.a(Object A_0, EventArgs A_1) +36
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
In the error list Iam getting 5 error messages
Error 1 The type or namespace name 'DHLInternational' does not exist in the namespace 'CommerceBuilder.Shipping.Providers' (are you missing an assembly reference?) D:\Inetpub\wwwroot\AbleCommerce2\Admin\Shipping\Providers\DHLInternational\Register.aspx.cs 1
Error 2 The type or namespace name 'DHLInternational' does not exist in the namespace 'CommerceBuilder.Shipping.Providers' (are you missing an assembly reference?) D:\Inetpub\wwwroot\AbleCommerce2\Admin\Shipping\Providers\DHLInternational\Configure.aspx.cs 1
Error 3 The type or namespace name 'DHLInternational' does not exist in the namespace 'CommerceBuilder.Shipping.Providers' (are you missing an assembly reference?) D:\Inetpub\wwwroot\AbleCommerce2\Admin\Shipping\Providers\DHLInternational\Default.aspx 2
Error 4 The type or namespace name 'DHLInternational' does not exist in the namespace 'CommerceBuilder.Shipping.Providers' (are you missing an assembly reference?) D:\Inetpub\wwwroot\AbleCommerce2\Admin\Shipping\Providers\DHLInternational\Activate.aspx 4
Error 5 The type or namespace name 'DHLInternational' could not be found (are you missing a using directive or an assembly reference?) D:\Inetpub\wwwroot\AbleCommerce2\Admin\Shipping\Providers\DHLInternational\Configure.aspx.cs 159
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Re: Object reference not set to an instance of an object.DHL Int
Posted: Wed Feb 04, 2009 9:14 am
by mazhar
The debug errors exist because of DHL international which was included, but not fully implemented due to lack of testing. We have already an opened bug for this issue. I suggest to remove the DHL international files. As I said before, it's part of a beta program that wasn't directly available within the program anyway.
Delete the "admin/shipping/providers/DHLInternational" folder.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Wed Feb 04, 2009 10:19 am
by johnhardy
Thanks Mazhar
That made a difference in as much no errors are now reported in VS.
However the page is still bringing up the following message, I think it may be the same as previous.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath(String path, Boolean create) +366
CommerceBuilder.Web.UI.AbleCommercePage.InitializeTheme() +732
CommerceBuilder.Web.UI.AbleCommercePage.a(Object A_0, EventArgs A_1) +36
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 10:44 am
by johnhardy
I wondered if there were any comments on what the above error message may mean and how I can fix it.
Thanks
John
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 11:08 am
by mazhar
Have you setup the website on local IIS or just trying to run it through Visual Studio?
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 11:37 am
by johnhardy
I have set the site up in localhost.
The url is
http://localhost:3730/AbleCommerce2/Default.aspx
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 11:54 am
by mazhar
From your posted URL localhost:3730 it seems that you are using the built in webserver bundled with the Visual Studio 2005. If this is the case then give a try and setup the site on your local ISS by creating virtual directory and install it. Then in the solution explorer of your visual studio add it from local ISS instead of access it from the file system.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 1:29 pm
by johnhardy
Thanks mazhar
I have created a virtual directory in IIS 6 for the site.
I am not sure how to do this next part:
Quote:
"Then in the solution explorer of your visual studio add it from local ISS instead of access it from the file system."
Perhaps you can advise me please
>>>>>>>>>>>>>>>
However in the solution explorer I selected the right hand button ASP>NET Configuation
This brought me to
http://localhost:1545/asp.netwebadminfi ... eCommerce2
At page
http://localhost:1545/asp.netwebadminfi ... rity0.aspx i found this message
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Object reference not set to an instance of an object. (D:\Inetpub\wwwroot\AbleCommerce2\web.config line 132)
>>>>>>>>>>>>>>>>
If I run the site through VS then I get the url
http://localhost:1459/AbleCommerce2/Default.aspx
If I use the url
http://localhost/AbleCommerce2/default.aspx
The error message is the same in both cases:
Server Error in '/AbleCommerce2' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath(String path, Boolean create) +366
CommerceBuilder.Web.UI.AbleCommercePage.InitializeTheme() +732
CommerceBuilder.Web.UI.AbleCommercePage.a(Object A_0, EventArgs A_1) +36
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Feb 06, 2009 1:39 pm
by johnhardy
I now notice I am getting these VS messages when default.aspx is run
Message 1 Could not find schema information for the element 'AbleCommerce'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 23 3 D:\...\AbleCommerce2\
Message 2 Could not find schema information for the element 'application'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 24 4 D:\...\AbleCommerce2\
Message 3 Could not find schema information for the attribute 'configSource'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 24 16 D:\...\AbleCommerce2\
Message 4 Could not find schema information for the element 'encryption'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 25 4 D:\...\AbleCommerce2\
Message 5 Could not find schema information for the attribute 'configSource'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 25 15 D:\...\AbleCommerce2\
Message 6 Could not find schema information for the element 'log4net'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 27 3 D:\...\AbleCommerce2\
Message 7 Could not find schema information for the attribute 'configSource'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 27 11 D:\...\AbleCommerce2\
Message 8 Could not find schema information for the element 'dataConfiguration'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 28 3 D:\...\AbleCommerce2\
Message 9 Could not find schema information for the attribute 'defaultDatabase'. D:\Inetpub\wwwroot\AbleCommerce2\web.config 28 21 D:\...\AbleCommerce2\
Re: Object reference not set to an instance of an object.DHL Int
Posted: Wed Feb 18, 2009 9:44 am
by mazhar
Here is the installation guide
http://help.ablecommerce.com/installati ... sp.net.htm
Read it and install the application on localhost. Once you got it installed properly then you have to use the visual studio.
1)- Launch visual studio.
2)- Go to File -> Open -> Website
3)- Select the Local IIS option and it will list all virtual directoreis you have on your local IIS
4)- Select the One you used for AbleCommerce install and click the open button.
5)- It will open the website code in Visual Studio.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Mon Feb 23, 2009 3:37 am
by johnhardy
Thanks for the reply.
I re-started from scratch just to make sure I did as is required
I am now getting a different error, I cannot see where the problem is as I do not yet understand the Stack Trace yet.
Any ideas please?
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath(String path, Boolean create) +231
CommerceBuilder.Web.UI.AbleCommercePage.InitializeTheme() +433
CommerceBuilder.Web.UI.AbleCommercePage.a(Object A_0, EventArgs A_1) +10
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
Re: Object reference not set to an instance of an object.DHL Int
Posted: Tue Mar 03, 2009 11:11 am
by mazhar
Please post the screen shot of solution explorer of your visual studio here.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Tue Mar 03, 2009 12:08 pm
by johnhardy
Thanks Mazhar
Is this what you require?
Re: Object reference not set to an instance of an object.DHL Int
Posted: Thu Mar 05, 2009 11:04 am
by mazhar
It seems that you have configured the application on localhost properly. Have a look at the Website/App_Data/Logs/app.log file, is there any information available when error occurs.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Thu Mar 05, 2009 11:28 am
by mazhar
Also drop every thing from ac_SharedPersonalization or truncate ac_SharedPersonalization completely and then give a try.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Mar 06, 2009 3:18 am
by johnhardy
Thanks Mazhar
Nothing shows in AppData/Log
I did a search for ac_SharedPersonalization and found this in \ablecommerce.sql and \ablecommerce2000.sql
I do not understand when you say
drop every thing from ac_SharedPersonalization or truncate ac_SharedPersonalization.
Perhaps you can enlighten me
Regards
John
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Mar 06, 2009 3:28 am
by mazhar
johnhardy wrote:Thanks Mazhar
Nothing shows in AppData/Log
I did a search for ac_SharedPersonalization and found this in \ablecommerce.sql and \ablecommerce2000.sql
I do not understand when you say
drop every thing from ac_SharedPersonalization or truncate ac_SharedPersonalization.
Perhaps you can enlighten me
Regards
John
I mean ac_SharedPersonalization table in your datatbase. When you install application it populates the database with tables. Check your database and delete all records from ac_SharedPersonalization table.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Mar 06, 2009 4:22 am
by johnhardy
In visual studio if I right click on AbleCommerce.mdf and press open I get the error The event log is full
If I rt click on Able_commerce_log.mdf and press open I get the operation could not be completed.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Fri Mar 06, 2009 5:05 am
by jmestep
Do you have SQL Server set to allow remote connections? SQL Server Surface Area Configuration--> Surface Area Configuration for Services and Connections-->Remote Connections-->Local and Remote Connections-- Using both TCP/IP and named pipes?
AQL.JPG
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sat Mar 07, 2009 4:55 am
by johnhardy
Sorry about the delay in answering.
Many thanks for that image
Mine looks rather different maybe thats a clue?
Like your website and the plugins
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sat Mar 07, 2009 7:18 am
by jmestep
That is a different screen. The configuration screen on my computer comes up with Start-->Programs-->[SQL Server]-->Configuration Tools--> Surface Area Configuration
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sat Mar 07, 2009 8:33 am
by johnhardy
Thanks
Sorry I went to the wrong file. I have found the correct file now and the setting are as you recommend.
(I restarted this PC to make sure)
I am still getting the error, although I cannot make a lot of sense out of the stack trace.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath(String path, Boolean create) +231
CommerceBuilder.Web.UI.AbleCommercePage.InitializeTheme() +433
CommerceBuilder.Web.UI.AbleCommercePage.a(Object A_0, EventArgs A_1) +10
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
I was trying to find this file
CommerceBuilder.Personalization.SharedPersonalizationDataSource.LoadForPath but it doesnt seem to exist.
I found CommerceBuilder in the \bin folder but could not find CommerceBuilder.Personalization.
I expect I am looking at this all wrong!
Any ideas please?
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sat Mar 07, 2009 2:06 pm
by jmestep
I just noticed the read-only on your Able database in the screen shot. How did you set the database up? Did you use the one that comes with the install? If you did, you might be better off creating a new database, creating a new user under Security in SQL Server, then giving that user permissions to the new database (try setting it as the db owner). Then copy the store files to a new folder, set your IIS site to go there after you've set the right permissions, then start to browse it from install/default.aspx in IIS. That bypasses VS and is better in the end so that you don't have to build the site all the time.
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sun Mar 08, 2009 10:26 am
by johnhardy
Thanks Judy at last I have AC working I think...
The final thing that threw me was on url
http://localhost/ACTestStore/Admin/Logi ... fault.aspx
The page asks for a username but in fact requires an email address.
I also tried using the forget password page which worked OK except that it never sent the password to me.
All I have to do now is to learn how to use AC!
Many thanks again for all of your assistance.
Regards
John Hardy
Re: Object reference not set to an instance of an object.DHL Int
Posted: Sun Mar 08, 2009 4:19 pm
by johnhardy
Re:
"I also tried using the forget password page which worked OK except that it never sent the password to me"
I have this working now.
Thanks again
John