Development site is erroring/redirecting to production site.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
SethMW
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Wed May 06, 2009 4:29 pm

Development site is erroring/redirecting to production site.

Post by SethMW » Tue May 19, 2009 6:24 pm

I am new to AC, and I can't figure out why this is happening. My guess is that it's some sort of licensing mechanism causing this, but I was told you can set up AC on a dev site. I'm hoping someone can point me in the right direction. Here is the error from the Event Viewer...

Code: Select all

Event Type:	Warning
Event Source:	ASP.NET 2.0.50727.0
Event Category:	Web Event 
Event ID:	1309
Date:		5/19/2009
Time:		7:48:58 PM
User:		N/A
Computer:	WWW
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 5/19/2009 7:48:58 PM 
Event time (UTC): 5/20/2009 12:48:58 AM 
Event ID: 2dca0528cb454115b6020365786fefb0 
Event sequence: 3 
Event occurrence: 2 
Event detail code: 0 
 
Process information: 
    Process ID: 7488 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 
 
Exception information: 
    Exception type: NullReferenceException 
    Exception message: Object reference not set to an instance of an object. 
 
Request information: 
    Request URL: http://.../Default.aspx 
    Request path: /Default.aspx 
    User host address: ... 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
 
Thread information: 
    Thread ID: 1 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at System.Web.HttpApplication.CompleteRequest()
   at System.Web.HttpResponse.End()
   at CommerceBuilder.Configuration.TokenBase.a()
   at CommerceBuilder.Configuration.TokenBase.get_Database()
   at CommerceBuilder.Stores.AuditEventDataSource.CountForStore()
   at CommerceBuilder.Services.AbleCommerceHttpModule.Init(HttpApplication context)
   at System.Web.HttpApplication.InitModulesCommon()
   at System.Web.HttpApplication.InitModules()
   at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
   at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
   at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
Any help would be GREATLY appreciated.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Development site is erroring/redirecting to production site.

Post by mazhar » Wed May 20, 2009 1:30 am

AbleCommerce license is specific to domain name. It seems that you are using license generated for your actual domain name that is running your production site that's why its redirecting to wards the production site. AbleCommerce also supports the demo mode, so on your dev machine install go to install/updatekey.aspx page and request a demo key. Make sure that your dev machine is connected to internet.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Development site is erroring/redirecting to production site.

Post by jmestep » Wed May 20, 2009 6:33 am

If that is only a 30 day key and your development will be longer, you can add demoMode="true" to the first line in the web.config file and will be able to use it indefinitely. Your test orders will have Demo, Demo for names, but everything else will work fine.
I have to set development sites on my local computer to demo mode because my ip address changes periodically and I'm locked out if I don't, since the license went for a particular ip address.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

SethMW
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Wed May 06, 2009 4:29 pm

Re: Development site is erroring/redirecting to production site.

Post by SethMW » Wed May 20, 2009 4:15 pm

mazhar wrote:AbleCommerce license is specific to domain name. It seems that you are using license generated for your actual domain name that is running your production site that's why its redirecting to wards the production site. AbleCommerce also supports the demo mode, so on your dev machine install go to install/updatekey.aspx page and request a demo key. Make sure that your dev machine is connected to internet.
I tried that, but it too redirected me to the production site. I copied the Install directory to production, and went there, but that looks like it will mess with the production license, and I don't want to do that.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Development site is erroring/redirecting to production site.

Post by jmestep » Thu May 21, 2009 6:34 am

My post wasn't clear-- I meant that you can use the store license itself and set the site to demo mode.
We just moved a site from another hoster and had it set up and running under an ip address in demo mode for a test run. Then when we moved the real site (it was a matter of getting a new copy of the database at that point), we ran into a problem with it redirecting to the production site. So I deleted the CommerceBuilder.lic file, changed all the entries for store urls in the ac_StoreSettings table to use the ip and applied the license again. We got that working so then we switched to the domain name in the database and got the DNS changed.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

SethMW
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Wed May 06, 2009 4:29 pm

Re: Development site is erroring/redirecting to production site.

Post by SethMW » Thu May 21, 2009 11:28 am

Ok, I'll try playing around with that when I get home tonight. I had no idea how to specify a license key. Sounds like that might be in CommerceBuilder.lic, no?

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Development site is erroring/redirecting to production site.

Post by jmestep » Thu May 21, 2009 3:00 pm

We just did it again for another site today. Same procedure as above.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

SethMW
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Wed May 06, 2009 4:29 pm

Re: Development site is erroring/redirecting to production site.

Post by SethMW » Mon May 25, 2009 9:06 am

jmestep wrote:My post wasn't clear-- I meant that you can use the store license itself and set the site to demo mode.
We just moved a site from another hoster and had it set up and running under an ip address in demo mode for a test run. Then when we moved the real site (it was a matter of getting a new copy of the database at that point), we ran into a problem with it redirecting to the production site. So I deleted the CommerceBuilder.lic file, changed all the entries for store urls in the ac_StoreSettings table to use the ip and applied the license again. We got that working so then we switched to the domain name in the database and got the DNS changed.
I have demoMode="true" in the ablecommerce.config in \App_Data, as an attribute of <application>, but I am still being redirected. Is there anything else I might be missing?

What do you mean by "applied the license?"

dnoell
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Mon Jul 07, 2008 9:36 am

Re: Development site is erroring/redirecting to production site.

Post by dnoell » Thu Jul 29, 2010 2:20 pm

I am also receiving the following error below.

We have a licence for our domain, however, we are hosting the domain on 2 servers that are configured the same and switch between each of the servers using a round-robin approach. I'm guessing that the load-balancer receives the request for the domain and sends the request of to one of the two servers using the IP address of the next server in the round-robin rather than a domain name.

Would this be why I am receiving the following error in the Event Log?

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/29/2010 3:45:11 PM
Event time (UTC): 7/29/2010 7:45:11 PM
Event ID: 19df2f6e1e0145ef86c474965a16a799
Event sequence: 4257
Event occurrence: 52
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/160606343/Root-1-129248851543347810
Trust level: Full
Application Virtual Path: /
Application Path: C:\Inetpub\wwwroot\www.xxxxxxx.com\
Machine name: PRUSENA236

Process information:
Process ID: 5976
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

Request information:
Request URL: https://10.x.xxx.xxx:443/Default.aspx
Request path: /Default.aspx
User host address: 10.x.xx.xx
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 12
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.HttpResponse.End()
at CommerceBuilder.Configuration.TokenBase.a()
at CommerceBuilder.Configuration.TokenBase.get_Database()
at CommerceBuilder.Stores.AuditEventDataSource.CountForStore()
at CommerceBuilder.Services.AbleCommerceHttpModule.Init(HttpApplication context)
at System.Web.HttpApplication.InitModulesCommon()
at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Post Reply