Hello,
I have written a feeprovider for our new shop. It does work absolutely fine in local, however when I copy the project DLL on the server, it makes IIS crash with this error :
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: nlssorting.dll, version: 4.0.30319.18408, time stamp: 0x52310504
Exception code: 0xc00000fd
Fault offset: 0x000000000000440f
Faulting process id: 0x12bc
Faulting application start time: 0x01d0be063ca4c302
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
Report Id: 8302f72a-29f9-11e5-8e91-005056bd5e51
Unfortunately I haven't been able to find more detailed info on the error, windows isn't very detailed about this. If I comment my feeprovider, it works fine, so I know it comes from there, but I cannot see the problem.
Here is the code, it is pretty straightforward :
public class FreeShippingProcessing : FeeProvider
{
public override PriceRaw FindFee(Order Order)
{
PriceRaw returnFee = null;
try
{
User user = User.get_Current(PagePermissionLevels.Frontend);
string val = string.Empty;
if (user != null)
{
Context.Cart.ShippingMethodID = Shipping.getAllShippingmethods().FirstOrDefault(x => x.Name == "BKI").ID;
if (Context.Cart.TotalPriceWithoutTaxes.Price >= 1900)
{
returnFee = new PriceRaw(0.00, Order.Currency);
}
else
{
CustomFieldValue discountCode = user.CustomFieldValues.FirstOrDefault(x => x.CustomField.SystemName == "AccessUser_Fakturarabatkode");
if (discountCode != null && discountCode.Value != null)
{
val = discountCode.Value.ToString().Trim();
if (val != "99")
{
returnFee = new PriceRaw(0.00, Order.Currency);
}
}
}
}
}
catch (Exception e)
{
LogToFile.Log(e.Message, "FindFee", LogToFile.LogType.ManyEntriesPerFile);
LogToFile.Log(e.StackTrace, "FindFee", LogToFile.LogType.ManyEntriesPerFile);
return null;
}
return returnFee;
}
}
Notice the log inside the catch... but nothing gets logged.
Anyone has an idea ?
Thank you !