• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk, Virtual Directories and ASP

S

smilinmike

Guest
Looking around on this Forum I thought my problem might be fixed with the revised mapping.dll file. So I requested it from Plesk support and sent them the following email with no response.
**************************
My Email to Plesk Support
**************************
I installed the mapping.dll file but I am still having problems with this ASP Shopping Cart. Below is an email that I sent to the original developer and their response back to me. I tried their test and it verifies that the cookies are not being written when I go to the correct address but are being written when I go to the address that has the additional "mysite.com_non_ssl/" directory added to it.

Also if I go to:
www.mysite.com/ecommerce/shop
(A URL without the actual page I am going to)

I end up at:
http://mysite.com/mysite.com_non_ssl/ecommerce/shop/
(This URL has no www on the beginning and has added the virtual directory in the middle).

This app is working fine on my development machine which is not running Plesk. What is going on with this virtual directory issue?
*************************
My Email to ASP Developer
*************************
I am running your software on a windows 2003 box running Plesk 6.5 for Windows.

I am unable to sign into or view status of my account the shop with the standard login at this url:
http://www.mysite.com/ecommerce/shop/signin.asp. Whenever I do
I am just redirected to the signin screen and my shopping cart is
emptied. I can however sign in if I login at this URL:
http://www.mysite.com/mysite.com_non_ssl/ecommerce/sho
p/signin.asp. The additional "mysite.com_non_ssl/" is the
virtual directory setup by Plesk when I created the site. What is going
on here? Is there something special I have to do on the server to get
PDShopPro to work properly on the server?
*******************
Developer Response
*******************
Interesting situation, it appears your server (on the first URL) is not
issuing any "cookies", or the scripts in that directory were modified in
some way and the "response.cookies" code was removed or changed.

To test your server you should create a test page, ex. "test.asp"
It should contain only this code:
<%
response.cookies("testcookie")="Testing 123"
%>

After you run that page from a browser, a cookie should be written to
the browsers cache. To see the cookie, type this in to the browser
Address bar: "javascript:alert(document.cookie)" It will show the
cookie, if you do not see "testcookie=Testing123" in the popup window,
than your server is not issuing the cookies (a server problem or setting
problem with the Plesk software). Our support services do not cover
Plesk, only IIS 4 or higher (when used alone on a Windows 2000/03
Server).

********************
********************
My question is:

Does anyone know of a solution to this "virtual directory" issue with Plesk?

I have no problems at all with this app on my dev box which is not running Plesk.
 
For using cookies you have to set the default directory.

This is what most coders do, but some do not and it creates problems with Plesk.

If the default directory is set with a simple / then cookies will work fine.
 
Larry,

Thanks for your reply. I fixed the situation by setting up the site outside of Plesk using IIS.

I am curious about your comment about setting default directories in code. What exactly did you mean by that? I looked at the code for my shopping cart and where cookies are concerned all I see are response.cookies() statements.

Are you talking about how the URL's are formed in the code?

Am I missing something?

Thanks for your help.
 
We had a similar problem. We fixed it by defining the default path for our cookie as follows :

Response.Cookies("CookieName").Path = "/"
 
Thanks for the response.

Do I need to set the path each time a cookie is issued or is there a way to do it globally?
 
Just want to say a big thank you to tdscom and also to ddreams for finding the answer to this one.
This has helped several customers whos pages stopped working properly when we migrated them onto Plesk.
 
Back
Top