Nop Commerce 2.0 Deployment Problem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
Hi!
On local iis server everything is ok.
but after deployment on hosting server (arvixe) i get an error (http://gool.lv.gall.arvixe.com/)


Guests' role could not be loaded

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: Nop.Core.NopException: 'Guests' role could not be loaded

[NopException: 'Guests' role could not be loaded]
   Nop.Services.Customers.CustomerService.InsertGuestCustomer() in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Customers\CustomerService.cs:619
   Nop.Services.WorkContext.GetCurrentCustomer() in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\WorkContext.cs:131
   Nop.Services.WorkContext.get_CurrentCustomer() in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\WorkContext.cs:199
   Nop.Web.MvcApplication.SetWorkingCulture() in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Global.asax.cs:135
   Nop.Web.MvcApplication.Application_AuthenticateRequest(Object sender, EventArgs e) in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Global.asax.cs:96
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
12 năm cách đây
Seems that something got wrong during installation ('Guests' role awsn't inserted). Try to reinstall the application (and clear the database before it's done)
12 năm cách đây
Db update helps. But now a have new problem

Admin workin fine!
Frontend, until I try to open any page where is product data.

i got an error.

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) in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Tax\TaxService.cs:237
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Int32 taxCategoryId, Decimal price, Boolean includingTax, Customer customer, Boolean priceIncludesTax, Decimal& taxRate) in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Tax\TaxService.cs:317
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Boolean includingTax, Customer customer, Decimal& taxRate) in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Tax\TaxService.cs:298
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Customer customer, Decimal& taxRate) in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Tax\TaxService.cs:281
   Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Decimal& taxRate) in C:\Users\Surikus\Desktop\gool.lv 2.0\Libraries\Nop.Services\Tax\TaxService.cs:257
   Nop.Web.Controllers.CatalogController.PrepareProductPriceModel(Product product) in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Controllers\CatalogController.cs:194
   Nop.Web.Controllers.CatalogController.PrepareProductOverviewModel(Product product, Boolean preparePriceModel, Boolean preparePictureModel) in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Controllers\CatalogController.cs:304
   Nop.Web.Controllers.CatalogController.<Manufacturer>b__1b(Product x) in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Controllers\CatalogController.cs:917
   System.Linq.WhereSelectListIterator`2.MoveNext() +110
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
   Nop.Web.Controllers.CatalogController.Manufacturer(Int32 manufacturerId, CatalogPagingFilteringModel command) in C:\Users\Surikus\Desktop\gool.lv 2.0\Presentation\Nop.Web\Controllers\CatalogController.cs:917
   lambda_method(Closure , ControllerBase , Object[] ) +150
   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() +8841105
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
12 năm cách đây
Have a look at the following topic https://www.nopcommerce.com/boards/t/10664/nop-2-fresh-install-object-reference-not-set-to-an-instance-of-an-object.aspx
12 năm cách đây
As I understand the main point is the https://www.nopcommerce.com/boards/t/10500/publishing-20.aspx link.

I tryed to do everything as described, exept deployment useng WebMatrix.

The steps was:

1. Download source
2. Open it in VS 2010
3. Run project and install NopCommerce on local DB (copy of server DB)
4. Executed Update SQLs
5. Everything work fine! (Admin and frontend)
6. Rebuild application with new sqlconnection sting (Hosting SQL server)
7. Test ok!
9. Run Prepare.bat (no errors)
10. Run Deploy.bat (no errors)
11. Copy all files from \Deployable\nop_2.0\ to the Web server
12. Copy DB From local station to Web SQL server
Open site, it opens, everything looks like ok, but when click on product/category/manufacturer i get this error.

Can you please tell me where is my mistake?
As I understand from the link you give me before, i do everything right.
12 năm cách đây
Seem that you didn't deploy plugins (Tax provider plugin can't be loaded)
12 năm cách đây
wwwroot/plugin folder isn't empty

i compared it with the folder from nopcom...2.0_noSource.zip.

they are similar
12 năm cách đây
Open \App_Data\InstalledPlugins.txt file. Is it empty?
12 năm cách đây
I dont have such file in this folder (on web server).

But in the source folder it contains:

DiscountRequirement.BillingCountryIs
DiscountRequirement.PurchasedAllProducts
DiscountRequirement.PurchasedOneProduct
DiscountRequirement.HadSpentAmount
DiscountRequirement.HasAllProducts
DiscountRequirement.HasOneProduct
DiscountRequirement.MustBeAssignedToCustomerRole
DiscountRequirement.ShippingCountryIs
CurrencyExchange.ECB
CurrencyExchange.MoneyConverter
LiveChat.LivePerson
Payments.CashOnDelivery
Payments.CheckMoneyOrder
Payments.AuthorizeNet
Payments.Manual
Payments.PayPalDirect
Payments.GoogleCheckout
Payments.PayInStore
Payments.PayPalStandard
Payments.PurchaseOrder
PromotionFeed.Become
PromotionFeed.Froogle
PromotionFeed.PriceGrabber
Shipping.AustraliaPost
Shipping.CanadaPost
Shipping.FedEx
Shipping.FixedRate
Shipping.ByWeight
Shipping.UPS
Shipping.USPS
Mobile.SMS.Clickatell
Mobile.SMS.Verizon
Tax.FixedRate
Tax.FreeTaxRate
Tax.StrikeIron.Basic
Tax.CountryStateZip


That means that build was unsuccesful? What should i do?
12 năm cách đây
It means that you didn't deploy nopCommerce properly. This file is created during installation and contains a list of installation plugins. Just copy it to the server and restart the applciation
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.