Custom order/product Calculator stops working after a while
Ive made a custom order and product calculator to handle campaigns. They check all nodes with doctype "Campaign" and if the Campaign-node got the product in a multi-tree-picker I recalc the new price (which I get from the Campaign-node).
The weird part is that this works just fine for a while (like a day) then it suddenly stops working without any errors. It seems like my custom calculators just stops being called.
To fix it I just has to touch it (changing a line or so)..
So the entire Tea Commerce still works but just your custom calculator that stops working at some point?
Do you know for how long it works and then stops?
Well the Autofac code is only run when the application is starting and the should be used the rest of the time. So weird if TC works and just your custom code that gets unloaded.
Yea teacommerce runs fine, its only the calculator that "stops working" (not used. Ive made it Log something before I return the price but its not logged).
I dont know how long it works Im afraid. I'll try to find out.
Its weird that it first works then stops working without any warning. hmmmm
Could you in your code add a custom property to the order with the Datetime.Now everytime your code is run. That might give you an idea of for how long it runs and when it stops. So record when you first added this property and when it stops.
No - the only way to overwrite is to use the suppress dependency attribute, but you properly already did that :)
Its just that we have lots of setups where the custom runs fine for days and days without any problems. Using the latest Tea Commerce version? Has the right folder permissions?
hmmmmm, it seems like my assembly sometimes (randomly) isnt loaded in to IIS memory.
The site sometimes goes into sleep due to inactivity, and when it's started again sometimes my prodCalc assembly isnt loaded. Its weird.. but I think I've solved it by putting my calculator in App_Code instead of a dll.
Custom order/product Calculator stops working after a while
Ive made a custom order and product calculator to handle campaigns. They check all nodes with doctype "Campaign" and if the Campaign-node got the product in a multi-tree-picker I recalc the new price (which I get from the Campaign-node).
The weird part is that this works just fine for a while (like a day) then it suddenly stops working without any errors. It seems like my custom calculators just stops being called. To fix it I just has to touch it (changing a line or so)..
Any ideas what could cause this?
Thanks
Hi Tobbe
So the entire Tea Commerce still works but just your custom calculator that stops working at some point?
Do you know for how long it works and then stops?
Well the Autofac code is only run when the application is starting and the should be used the rest of the time. So weird if TC works and just your custom code that gets unloaded.
Kind regards
Anders
Yea teacommerce runs fine, its only the calculator that "stops working" (not used. Ive made it Log something before I return the price but its not logged).
I dont know how long it works Im afraid. I'll try to find out.
Its weird that it first works then stops working without any warning. hmmmm
do you have any ideas I could try Anders?
Could you in your code add a custom property to the order with the Datetime.Now everytime your code is run. That might give you an idea of for how long it runs and when it stops. So record when you first added this property and when it stops.
Kind regards
Anders
I kicked on the file yesterday at 1700, and then this morning at 8 it didnt work, so not even a day.
Can I manually overwrite the default calculator-files somehow?
No - the only way to overwrite is to use the suppress dependency attribute, but you properly already did that :)
Its just that we have lots of setups where the custom runs fine for days and days without any problems. Using the latest Tea Commerce version? Has the right folder permissions?
Kind regards
Anders
hmmmmm, it seems like my assembly sometimes (randomly) isnt loaded in to IIS memory. The site sometimes goes into sleep due to inactivity, and when it's started again sometimes my prodCalc assembly isnt loaded. Its weird.. but I think I've solved it by putting my calculator in App_Code instead of a dll.
It has been working for almost a day now :)
Does your code still works when it is in the App_Code folder? :)
YUP! it seems like it solved it :)
is working on a reply...