Much Difficulty Developing Locally... Very Frustrated

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 1:05 pm

I will say first of all that I'm using VS2008 on Vista Business.

As I tried to do a fresh install of the application (several times), I ran into a common problem where the install process would get hung on 'Configure2.aspx' - see my post here:

viewtopic.php?f=42&t=9933&p=68208&hilit ... spx#p68208

I tried with both a remote SQL server, as well as an instance of SQL on my local machine, going so far as to initialize the DB with sa credentials - always the same result of simply reloading the 'Configure2.aspx' and clearing out the fields on the page, with no indication as to why it wasn't doing anything. Note that I have given the 'Network Service' account full permissions to the root of my site.

Most recently, however, I decided to simply copy down the complete (fully functional) application from my dev server, with the exception of the license file. I then browsed to 'Default.aspx' from within VS2008, and it looked promising as it gave me the opportunity to enter a new license key. Once I did so, I then got a 'This webpage has a redirect loop' error in Chrome, and IE simply says 'Internet Explorer cannot display the webpage.' Why is this so difficult? Granted, I'm not a seasoned web developer, but rather just starting to get the hang of things. I want to develop locally so I can build the site and actually step through the code for troubleshooting.

Can anyone offer any pointers? What am I missing??
Jason Hendee
Cables for Less

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Much Difficulty Developing Locally... Very Frustrated

Post by Shopping Cart Admin » Wed Nov 30, 2011 2:27 pm

Hello Jason,

Did you request a development license key for the IP address of your local installation? If you attempted to use the one provided for your live domain it would cause the re-direct loop you are describing since it would be attempting to loop over to the live domain encoded into the key.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 2:30 pm

Mike,

Thanks for your reply. What I requested, and am trying to use.. was a dev license for 'localhost'. I do see that there is a port number specified in the url when I try to browse from VS ('http://localhost:50975/AbleCommerce/Default.aspx' to be more specific) - is this a problem?
Jason Hendee
Cables for Less

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

Re: Much Difficulty Developing Locally... Very Frustrated

Post by AbleMods » Wed Nov 30, 2011 2:43 pm

Dump Vista before you stress yourself into jumping from a bridge. Vista is notoriously difficult to make work with a local IIS implementation. Microsoft messed with local permissions so badly, nothing goes right the first time. If you're going to take development seriously, dump Vista and get yourself on Windows 7 64-bit. The effort will repay itself many times over.

It's not so much that getting a local dev install to work is 'difficult', but it is something that requires some real technical knowledge. There are a variety of completely different technologies that all have to align properly for the site to render in a local environment. But the only way you're going to learn is by doing, and by Google-ing the errors and with these forums. I always preface my Google searches with 'IIS' if I think it's web-server based and 'ASP.NET' if I think it's .Net related.

First, check out permissions:
The folders of your website must have permissions set correctly. I would add the local ASPNET and the local NETWORK SERVICE user accounts to the website folder. Then apply those to all subdirectories. If you want, just add EVERYONE to the site folder and apply that - it's not like you really have to worry about file-level security on your own local PC.

Next, check the IIS website configuration. Make sure you have the app pool set correctly for the site. If you're using the default AC7 web.config, you want ASP.Net 2.0 as the Framework version in IIS. If you've changed the default framework files in AC7, I would suggest the 'Classic' instead of 'Pipeline' mode in IIS as it is easier to get running.

Finally, make sure SQL connects properly. Usually the install will find SQL permission errors, but not always. Your SQL should be set up as a Mixed Mode Authentication. Your SQL user account should be set for the dbowner schema. Easiest way to test SQL is to use the Control Panel/Administrative Tools/ODBC to make an ODBC connection to your SQL install. If you can't get ODBC to talk to your SQL, you certainly won't get ASP.Net to do it either.

Let us know how it goes for you, we're all here to help!
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

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 3:03 pm

Thanks Joe. As much as I'd love a new machine... that may not be an option at this time (have been thinking about asking the higher-ups for just that for various reasons, so we'll see).

It seems that the permissions issues may have been responsible for my 'Configure2.aspx' hangups, but I feel like I've completely side-stepped that issue - and saved several steps - by simply copying the working application from my dev server. So now I've just got to get past this redirect loop, which seems to be more of a licensing issue, correct? Or could permissions still be playing into this problem?
Jason Hendee
Cables for Less

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Much Difficulty Developing Locally... Very Frustrated

Post by Shopping Cart Admin » Wed Nov 30, 2011 3:05 pm

Hello Jason,

You need to change your development environment so that it's not adding the port to the localhost address. That will stop the redirect and you should be able to proceed.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 3:10 pm

Note that I am still trying to point this local instance to the remote SQL server on my dev box. I know there is a field in the db called 'Store_StoreUrl' in the 'ac_StoreSettings' table, which is currently set to 'http://dev.cablesforless.local/' (the url on that server's instance of the site). Could this be causing the redirect? If so, I suppose I could just duplicate the db, and set that field appropriately for my local instance. I just don't want to have to maintain multiple development databases.. but if that's the only hangup, it's not that big of a sacrifice, I suppose.
Jason Hendee
Cables for Less

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 3:15 pm

Mike,

I thought I understood that VS creates it's own instance of the site when I 'browse' that site from within VS. So I thought it wasn't necessary to actually go through the steps within IIS to create a new site. Am I incorrect in my understanding here? If VS is what's responsible for adding the port number to the URL, how do I tell it NOT to add that additional info?
Jason Hendee
Cables for Less

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Much Difficulty Developing Locally... Very Frustrated

Post by Shopping Cart Admin » Wed Nov 30, 2011 3:16 pm

Hello Jason,

The URL would need to be the same as the key you requested 'Localhost', I believe the entry in the db will be sorted out once you remove the port from your dev install and update the key.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 3:48 pm

Ok, so the only way I could see to strip the URL of that port number was to actually create a new web application in IIS pointing to my directory, and manually load it in the browser (instead of relying solely on the ASP.NET Development Server). It does now load my site!

So while I can at least build the site in VS to check for obvious errors with my current setup, it looks the only way to truly debug from within VS is to set a static port number within the VS properties for my site, and request a development license that exactly matches 'localhost:[myStaticallyAssingedPort]'? I suppose if I wanted to work on both my desktop at laptop at different times... I could always assign the same static port on each machine, right? That way I don't have to request an additional developer's license for the same project.

Thanks for bearing with me through this everyone... :)
Jason Hendee
Cables for Less

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

Re: Much Difficulty Developing Locally... Very Frustrated

Post by AbleMods » Wed Nov 30, 2011 4:03 pm

jasonhendee wrote:I suppose if I wanted to work on both my desktop at laptop at different times... I could always assign the same static port on each machine, right?
It's a whole lot easier if you debug using IIS. When you're ready to debug, just hit the VS menu Tools, Attach to Process and select your IIS process listed as 'w3wp.exe'.

If you use a specific app-pool name, you'll also see it listed there with that w3wp.exe process.

That way you don't have to wait on VS to spawn anything, just keep your website open in a separate window and flip back and forth.

More important, you don't want to rely solely on VS hosting your app for debugging purposes. It's not a true IIS environment. You want to do your testing and debugging in the environment closest to your production setup.
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

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Much Difficulty Developing Locally... Very Frustrated

Post by jasonhendee » Wed Nov 30, 2011 4:23 pm

Great info Mike and Joe - I seem to be up and running! Thank you so much.
Jason Hendee
Cables for Less

Post Reply