1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk, Virtual Directories and ASP

Discussion in 'Plesk for Windows - 8.x and Older' started by smilinmike, Feb 21, 2004.

  1. smilinmike

    smilinmike Guest

    0
     
    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.
     
  2. sonics

    sonics Regular Pleskian

    26
    23%
    Joined:
    Jan 4, 2004
    Messages:
    168
    Likes Received:
    1
    Location:
    Switzerland
    Take the url like this with the / and it should not show you the virual url:

    www.mysite.com/ecommerce/shop/

    test that if it solves you problem. i don't think so but test it.
     
  3. siren@

    siren@ Guest

    0
     
    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.
     
  4. smilinmike

    smilinmike Guest

    0
     
    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.
     
  5. tdscom

    tdscom Guest

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

    Response.Cookies("CookieName").Path = "/"
     
  6. smilinmike

    smilinmike Guest

    0
     
    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?
     
  7. rwickham

    rwickham Guest

    0
     
    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.
     
  8. tdscom

    tdscom Guest

    0
     
    You're welcome :)
     
Loading...