Authentication Problem

Discussion in 'ASP.NET / ASP.NET Core' started by ChuckTraywick, Sep 27, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have the following in my web.config



    <authentication mode="Forms">


    <forms name="IBuySpyStoreAuth" loginUrl="login.aspx" protection="All" path="/"/>


    </authentication>


    I am having trouble logging into the site. It works here and on locally hosted servers.


    I don't know if this is related to the authentication and or a permission error.





    Thanks


    Chuck
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    chuck,

    need more information.

    do you get any error? if you don't, the problem is probably not cause by permission or any server related issues and the likely cause is the database setting.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hi Bruce:

    I was busy trying to get other stuff to work, sorry for not replying sooner.

    Here is what I think is happening:
    We used the started site IBUYSPY from MS and modified. This site uses the IBUYSPY authenitication. This is a link at the top of key pages as an included object. There is a web config setting as follows:




    <system.web>


    <!-- enable Forms authentication -->


    <authentication mode="Forms">


    <forms name="IBuySpyStoreAuth" loginUrl="login.aspx" protection="All" path="/"/>


    </authentication>


    What happens is when you initially go into the site the code opens a cookie (if you have one) and attempts to log you in. This APPEARS to work in that the user name comes up on the default.aspx page in the store. REGISTRATION off of the main site. But if you attempt to look at the shopping cart or Account history (links on the top of the page) you will get nothing. That is, no data will show. If you then log in as the same person you can then look at the shopping cart and or account history with accurate results.


    Some how this appears to be a lack of authentication but I can't seem to see exactly what is happening.


    This same code works on my dev machine and on an in house server we were using to host the site before we moved it. So I am thinking I have something set wrong somewhere in terms of permissions or objects etc.


    Any help that can be offerred will be greatly appreciated.


    Thanks


    Chuck
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    do you have multiple directories setup as web application? remember that each web application has it own scope for session variables.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Hi Bruce:

    I will check the session variables. Yes, the store is a sub directory (virtual) of the main site. I guess what is confusing me is the fact that the code must find the user cookie initially since the name displays (Welcome Bruce) but somehow does not authenticate. The LOG IN manually performed means that this functions works. The Welcome message is displayed when you enter the store if you are an existing customer. So I am thinking it finds the cookie and retrieves the user info but somehow is not authenticated. When it looks up the user if it fails the system generates a GUID which would explain why the CART and ACCOUNT functions work but return no data, that is, if you tried to look up the cart or account data with a GUID it should not return any result.

    Chuck
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page