publish version2 on hosting

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
1 - I made from vs2010 published Nop.WEB  in Nop.Web\obj\Release\Package and Nop.Web.Administration in Nop.Web.Administration\obj\Release\Package
moved Nop.Admin.dll and Nop.Admin.pdb in Nop.Web.bin
2  - then Deploy.bat  In log.log Build succeeded.
    0 Warning(s)
    0 Error(s)

3 - upload on hosting from directory deployable (with included Plugins)
4 - in Add_Data Setting.txt

First page site  - is OK
When page - New Products

Server Error in '/' 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.]
   Nop.Services.Tax.TaxService.GetTaxRate(ProductVariant productVariant, Int32 taxCategoryId, Customer customer) +419
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Int32 taxCategoryId, Decimal price, Boolean includingTax, Customer customer, Boolean priceIncludesTax, Decimal& taxRate) +78
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Boolean includingTax, Customer customer, Decimal& taxRate) +143
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Customer customer, Decimal& taxRate) +171
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Decimal& taxRate) +117
   Nop.Web.Controllers.CatalogController.PrepareProductPriceModel(Product product) in H:\MVC3\proba22\Presentation\Nop.Web\Controllers\CatalogController.cs:194
   Nop.Web.Controllers.CatalogController.PrepareProductOverviewModel(Product product, Boolean preparePriceModel, Boolean preparePictureModel) in H:\MVC3\proba22\Presentation\Nop.Web\Controllers\CatalogController.cs:304
   Nop.Web.Controllers.CatalogController.RecentlyAddedProducts() in H:\MVC3\proba22\Presentation\Nop.Web\Controllers\CatalogController.cs:1430
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8963149
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

In local variants all working
I do not understand what I'm doing wrong.
12 years ago
https://www.nopcommerce.com/boards/t/10664/nop-2-fresh-install-object-reference-not-set-to-an-instance-of-an-object.aspx
12 years ago
I made all as in http://www.youtube.com/watch?v=8E8G0CUh4S8
But on  host I uploaded from Webmatrix using protocol Ftp because  protocol "Web deploy" don't support host.
If I run site from directory   Deployable\nop_2.0 using Webmatrix - I'm getting error
[code]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:


Line 192:                                {
Line 193:                                    decimal taxRate = decimal.Zero;
Line 194:                                    decimal oldPriceBase = _taxService.GetProductPrice(productVariant, productVariant.OldPrice, out taxRate);
Line 195:                                    decimal finalPriceBase = _taxService.GetProductPrice(productVariant, _priceCalculationService.GetFinalPrice(productVariant, true), out taxRate);
Line 196:


Source File: H:\MVC3\proba22\Presentation\Nop.Web\Controllers\CatalogController.cs    Li
ne: 19[/code]4


If I run site from  NOP.Web - site running very well. From VS2010 - site running OK
If I run site from host I'm getting error
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.]
   Nop.Services.Tax.TaxService.GetTaxRate(ProductVariant productVariant, Int32 taxCategoryId, Customer customer) +419

Can you help me.  What I'm doing wrong.
12 years ago
Everyone who got an error, make in TaxService.cs
            var activeTaxProvider = LoadActiveTaxProvider();
            if (activeTaxProvider != null)
            {
                //get tax rate
                var calculateTaxResult = activeTaxProvider.GetTaxRate(calculateTaxRequest);
                if (calculateTaxResult.Success)
                    return calculateTaxResult.TaxRate;
            }
            return decimal.Zero;

        }
after line 233.
And all right!!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.