Phantom Root URL

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 Jahre weitere
Hey guys. I'm pulling my hair out here as I'm sure this is something simple but after hours of trying I just can't find it.

I am using version 2.4 and the whole MVC thing is new to me.

I had the entire cart set up and running perfectly in a sub domain on my clients server as he was still running his old site while I developed the new cart. When it was ready to launch I rang my server hosts and got them to copy the files from the subdomain into the root directory as it would have taken me a very long time via FTP.

Anyway, the transfer went fine and the admin and front end run perfectly UNTIL I click add to cart or the Administration link once logged in. On both accounts the click is trying to find a sub-directory URL:

Server cannot access application directory 'e:\bikecraftnetau\bikecraft.net.au\www\Cart\

It is somehow calling a link to /Cart when that directory does not exist.

I have changed the Site URL to bikecraft.net.au in the admin area and all other links are fine.

The only thing I can possibly think of is that before I set up the sub directory I did a test set up in the main root directory in a folder called /Cart and this is the only way it has picked this directory up.

I have searched everywhere to find the cause of this phantom /Cart directory but can't loacte it in the web.config or anywhere else.

Can anybody tell me where it is coming from?
12 Jahre weitere
The closest case I got to mine was this one: https://www.nopcommerce.com/boards/t/15700/error-adding-product-to-cart.aspx

The items still get added to the cart and you can still checkout, only problem is you get the error when you click add to cart due to it not finding the correct URL I guess.
12 Jahre weitere
I took the error page redirect off and the code says:

Server Error in '/Cart' Application.
Server cannot access application directory 'e:\bikecraftnetau\bikecraft.net.au\www\Cart\'. The directory does not exist or is not accessible because of security settings.
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.Web.HttpException: Server cannot access application directory 'e:\bikecraftnetau\bikecraft.net.au\www\Cart\'. The directory does not exist or is not accessible because of security settings.

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:

[HttpException (0x80004005): Server cannot access application directory 'e:\bikecraftnetau\bikecraft.net.au\www\Cart\'. The directory does not exist or is not accessible because of security settings.]
   System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +9151303
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +85

[HttpException (0x80004005): Server cannot access application directory 'e:\bikecraftnetau\bikecraft.net.au\www\Cart\'. The directory does not exist or is not accessible because of security settings.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9088540
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258


Is the /Cart actually a system file called cart and the capital C is just a conicidence, meaning this is actually a permissions problem? I've tried it with read and write on all files so i can't work out why? What are the file permissions set when doing a normal set up - and what other stuff is stored on set up (other than the database connection string)?
12 Jahre weitere
Ok, no reply.

How about a diffrent angle guys?

I have the cart working perfectly in the sub domain, how can I transfer the whole thing as it sits right now into the main root directory?
12 Jahre weitere
I decided to try and reinstall the cart from scratch in the root directory with a new database. The whole thing started up as it should so I thought I would try and change the setting.txt file to change the coonection string to the old database with all the data I need in it. When I did so the new cart threw the exact same error as before and the error stuck even when I changed the connection string back to the new clean database. Obviously something within the database itself is causing the error to be thrown and then the error is being cached in the whole system somewhere. I am now uninstalling the cart again from the root directory and reinstalling it again with another fresh database to make sure it all works ok before I do anything else.

Can anyone work out what is happening in the original database to be causing this error each time?
12 Jahre weitere
Ok, so after trying everything from scartch it turned out to be something so obvious that kicked ourselves. We were so busy looking at application level we didn't think about server level. The subdirectory and main directory were running the same application pool, so on start up, the one that had been working successfully before (the subdirectory) took priority, so of course that meant the secondary one (the new root folder version) was falling over. It was so messy we took it to a newer server and it ran from the first load.

I guess the moral is, don't get too caught up in the app, don't run two copies of the same cart on one domain and always check the fundamentals.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.