I'm baffled.
I'm using 3 machines (development desktop, sql server, IIS 7 server) all in the same local network to test this.
I downloaded 2.0 Beta, loaded it on VS2010, compiled it and ran it on my developement desktop. This all works. nopCommerce started and did its installation process and created the database on my remote database server. Next, I removed the database to start fresh. Then I published nopCommerce on my remote IIS Server. This all works fine.
Other than the canonical path, there should be no difference running nopCommerce from my desktop vs the IIS server.
When I brought up IE from my development desktop to view nopCommerce, I expect it to go through the installation process and then show me the home page. It did the installation process, created the database but then, it gets a null reference exception:
------------------------------- error message --------------------------------------------
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 10: @Html.Action("HomepageProducts", "Catalog")
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\mario\Documents\Visual Studio 2010\Projects\NopCommerce\Libraries\Nop.Services\Tax\TaxService.cs:237
--------------------------------------------------------------------------------------------
Here is the code:
----------------------CatalogController.cs -----------------------------------------------
[ChildActionOnly]
public ActionResult HomepageProducts()
{
var model = _productService.GetAllProductsDisplayedOnHomePage()
.Select(x => PrepareProductOverviewModel(x))
.ToList();
return PartialView(model);
}
--------------------------------------------------------------------------------------------
I don't know how to do a remote debug so I cannot trace it. But I cannot imagine that "var model" is null because nopCommerce created the remote database from the IIS server. And why does the stack trace show "C:\Users\mario\Documents\Visual Studio 2010\Projects", this only exist in the development desktop and not the IIS server?
Someone mentioned in another post that he fix the problem by copying the InstalledPlugins.txt file to the App_data Folder. I tried this, and also tried including it in the project App_data and still get the null reference exception.
Any help?
Thanks,
Mario