an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 3/9/2010 2:08:19 PM By bansal_db. 2 replies.
3/9/2010 12:43:33 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Orderpipe line error
I modified the Category class by adding one more property. Everything was working fine until i had to modify the order pipeline for some email changes. There was a call to Category.Add in BulkImportTaskProvider so i modified that too since i had modified the Add method. Now i am getting this errot in order pipleline. Not sure what might be causing the error. Is it possible to tell with this error log where the error is coming from?
 
 
HandlingInstanceID: bcd0cd73-d311-41ed-a754-b2e7f884bb61

An exception of type 'System.NullReferenceException' occurred and was caught.

-----------------------------------------------------------------------------

03/09/2010 12:23:15

Type : System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Object reference not set to an instance of an object.

Source : DotShoppingCart.Commercial.Base Help link :

Data : System.Collections.ListDictionaryInternal

TargetSite : System.String GetUserName()

Stack Trace :    at DotShoppingCart.Commercial.Base.Utils.GetUserName()

   at DotShoppingCart.Commercial.Core.Category.GetCategories(String host, Int32 categoryId, Int32 levelCount)

   at DotShoppingCart.Commercial.Core.Category.GetAll(String host, Nullable`1 categoryIdExcludeChildren, Boolean excludeNonLeaf)

   at DotShoppingCart.Commercial.Core.Category.GetAllByHost(String host)

   at DotShoppingCart.Commercial.OrderPipeline.BulkImportTaskProvider.RunTask(String host, IConfigurationSource cfgSrc)

   at DotShoppingCart.Commercial.OrderPipeline.TaskProvider.Proccess(String host, IConfigurationSource cfgSrc)

   at DotShoppingCart.Commercial.OrderPipeline.ProcessorProvider.Run()

   at DotShoppingCart.Commercial.OrderPipeline.RunnableProvider.StartRun()

 

Additional Info:

 

MachineName : SD9000

TimeStamp : 3/9/2010 8:23:15 PM

FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null AppDomainName : DotShoppingCart.Commercial.OrderPipelineService.exe

ThreadIdentity :

WindowsIdentity : NT AUTHORITY\SYSTEM
 
3/9/2010 1:24:09 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Orderpipe line error
DotShoppingCart.Commercial.Base.Utils.GetUserName() is getting the current loggon user. This is for only web application. OrderPipeline is a windows service which doesn't have web context. You want to avoid any web context calls in the low level object. Move the call to code behind or create another layer on top of it.
 
DotShoppingCart Staff
3/9/2010 2:08:19 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Orderpipe line error
I had modified category.cs and had used
 
int userID = nc.getuserID(Utils.GetUserName());
 
but i hadn't updated the orderpiple line so never saw this error before.
 
I modified the Category.cs to this
 
 
try
{
           userId = nc.getuserID(Utils.GetUserName());
}
catch
{
     userId = 0;
}
 
 
now it seems to be working.
 
Thanks