Server error - url without www prefix

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
eileen
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Sun Feb 11, 2007 10:59 pm
Location: Novato, CA
Contact:

Server error - url without www prefix

Post by eileen » Fri Dec 02, 2016 6:53 am

We are getting a server error (see below) on our store now and then causing us to lose sales. It can also happen when accessing admin. It tends to happen most often when we access the site without the www prefix.

In our developer's opinion the exception stack track indicates that the AbleCommerce back-end code fails to properly check a null object in certain situations. Most likely when a user basket is transferred or when a user gets redirected from the domain with the www prefix to a domain without the prefix.

According to our developer this problem needs to be fixed at AbleCommerce's end. These needs to be a simple check that would make sure that when 'userName' parameter to LoadForUserName function is null, it does not try to access the null string. Our developer is Abdullah from Plugables (http://www.plugables.com).

Here are the exception details we keep getting time and again...

==========================
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.]
CommerceBuilder.Users.UserRepository.LoadForUserName(String userName,
Boolean createMissing) +38
CommerceBuilder.Users.UserDataSource.LoadForUserName(String userName,
Boolean createMissing) +35
CommerceBuilder.Services.Membership.WebUserLocator.Locate() +898
CommerceBuilder.Common.AbleContext.get_User() +50
CommerceBuilder.Services.PageTracker.Track(HttpApplication application,
HttpContext context) +1244
CommerceBuilder.Services.HttpModule.a(Object A_0, EventArgs A_1) +1110
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.6.1590.0
==========================

User avatar
NC Software
AbleCommerce Partner
AbleCommerce Partner
Posts: 4620
Joined: Mon Sep 13, 2004 6:06 pm
Contact:

Re: Server error - url without www prefix

Post by NC Software » Sun Dec 04, 2016 5:02 am

If you think it's a missing WWW in the URL then most likely IIS for the web site is not configured properly (and DNS should be checked too) and has nothing to do with AbleCommerce.
Neal Culiner
NC Software, Inc.

User avatar
dgoranov
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Sun Jan 16, 2011 3:58 pm
Location: Boston, MA
Contact:

Re: Server error - url without www prefix

Post by dgoranov » Sun Dec 04, 2016 9:33 am

Hello,

This is clearly an AbleCommerce Http module issue. The exception is being thrown on an application level. If this is an IIS or DNS
issue the site will not respond at all and the browser will get http 404 or 500 errors.

IIS and DNS is working fine. The request is hitting the application and the application code fails and throws and exception.

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.]
CommerceBuilder.Users.UserRepository.LoadForUserName(String userName, Boolean createMissing) +38
CommerceBuilder.Users.UserDataSource.LoadForUserName(String userName, Boolean createMissing) +35
CommerceBuilder.Services.Membership.WebUserLocator.Locate() +898
CommerceBuilder.Common.AbleContext.get_User() +50
CommerceBuilder.Services.PageTracker.Track(HttpApplication application, HttpContext context) +1244
CommerceBuilder.Services.HttpModule.a(Object A_0, EventArgs A_1) +1115
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0
Dimi Goranov
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5169
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Server error - url without www prefix

Post by AbleMods » Mon Dec 05, 2016 3:28 am

What is the version/build of Able? Is CommerceBuilder customized?

There was an issue in older Gold installs where a lengthy (or empty) user agent string would throw exceptions in the HTTP module. Not sure that applies here, but worth mentioning nonetheless.

Are there any external processes or threads that work on the ac_Users table? Clearly Able is expecting the user record to exist in the database but it does not.

Almost sounds like a cookie issue given the issue is intermittent and not constant.

I've got a fairly large client who's been running for years on http://whatever.com and we've never seen this issue. Worked fine in 7.x, works fine in Gold R11.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

eileen
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Sun Feb 11, 2007 10:59 pm
Location: Novato, CA
Contact:

Re: Server error - url without www prefix

Post by eileen » Mon Dec 05, 2016 6:55 am

VERSION: 7.0.92.9266
Release Label: GoldR12SR1

Problem occurred after update to R12 from R10.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2649
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Server error - url without www prefix

Post by Katie » Mon Dec 05, 2016 8:45 am

Eileen,

The license key determines what URL AbleCommerce will use. As long as your DNS and IIS webserver are setup to work with that URL, then you should not have any problems. Your license key is registered to www.backdesigns.com and even though I can manually type in backdesigns.com, there is an immediate redirect to www.backdesigns.com.

I am not clear on why you think this is a bug. I tested your admin and the storefront, and the redirect happens for me without any issue. Seems odd, like maybe you have some customization that isn't taking well to how the licensing works.

Sometimes it helps if you can provide the exact steps to reproduce the issue. I have a Gold R12 SR1 install that I can test with, but I don't understand how you are getting this error.

Thanks,
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2649
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Server error - url without www prefix

Post by Katie » Tue Dec 06, 2016 6:29 am

If we can get a proper bug report, then we are happy to look into this.

A bug report should include the following information -

SUMMARY of ISSUE
EXACT STEPS TO REPRODUCE.
WHAT HAPPENS?
WHAT SHOULD HAVE HAPPENED?

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply