Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7052911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:26:26+00:00 2026-05-28T03:26:26+00:00

I have an MVC 3 application that works fine when running locally from visual

  • 0

I have an MVC 3 application that works fine when running locally from visual studio,

There are two bat files that pre compile the application ready for deployment, when i run the bat files and upload the deployment folder to the web server a load of errors are thrown including a null exception error,

The error can be seen by visiting the following URL, i can also provide the full stack trace on a document if required, i didnt want to post it here as its so big.

error can be seen here

I cant understand where the error is coming from as everything works locally, t seems these errors are being created when the bat files are compiling the application, has anyone had similar experiences after deploying an MVC app? can anyone offer any advice on what may be causing the problem?

Thanks

Liam

UPDATE=============

This is the GetTax method, this code has been thoroughly tested as its part of NopCommerce 2.2, the errors only occur after the solution is compiled via the BAT files which is again standard for building a nop commerce 2.2 app, am i right in thinking its got to be something on my machine that is causing these problems when the BAT files are ran and the code is compiled for deployment?

public virtual decimal GetTaxRate(ProductVariant productVariant, int taxCategoryId, 
        Customer customer)
    {
        //tax exempt
        if (IsTaxExempt(productVariant, customer))
        {
            return decimal.Zero;
        }

        //tax request
        var calculateTaxRequest = CreateCalculateTaxRequest(productVariant, taxCategoryId, customer);

        //make EU VAT exempt validation (the European Union Value Added Tax)
        if (_taxSettings.EuVatEnabled)
        {
            if (IsVatExempt(calculateTaxRequest.Address, calculateTaxRequest.Customer))
            {
                //return zero if VAT is not chargeable
                return decimal.Zero;
            }
        }

        //active tax provider
        var activeTaxProvider = LoadActiveTaxProvider();

        //get tax rate
        var calculateTaxResult = activeTaxProvider.GetTaxRate(calculateTaxRequest);
        if (calculateTaxResult.Success)
            return calculateTaxResult.TaxRate;
        else
            return decimal.Zero;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:26:27+00:00Added an answer on May 28, 2026 at 3:26 am

    The stack trace indicates that it’s coming from the method GetTaxRate in TaxService.cs. I’m guessing this isn’t anything ASP.NET MVC specific, but a deployment issue. It could be database permissions or connection strings.. you’ll have to check what that method is doing.

    Nop.Services.Tax.TaxService.GetTaxRate(ProductVariant productVariant, Int32 taxCategoryId, Customer customer) in c:\Nop 2.2 Source\just4fashion2.2source\Libraries\Nop.Services\Tax\TaxService.cs:240
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net mvc application that works fine under visual studio but when
I have an asp.net mvc 2 application which works fine when run from visual
I have an ASPNET MVC application that works fine locally but when I deployed
i have a MVC application that works fine; but now i need to put
We have a file upload in our ASP.NET MVC application that works fine. It
I have an Asp.Net MVC application that works in the vs.net development web server.
We have an internal ASP.NET MVC application that requires a logon. Log on works
I have a captcha in my MVC application that is called from a HttpHandler
I have an application running on iis(7) ( asp.net mvc if that matters )
I have an ASP.NET MVC (using the release candidate) application that works with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.