frequent signouts

Last post 05-16-2008 7:03 PM by shahab1363. 6 replies.

Sort Posts:

  • frequent signouts

    05-14-2008, 7:08 PM
    • Loading...
    • shahab1363
    • Joined on 03-30-2004, 1:24 PM
    • Tehran - I.R.Iran
    • Posts 37

    Hi Guys,

    I've a webapplication with a XML membership and role provider. My app works just fine on developement machine, but when I upload this to a server, I see these problems ::

    1. when I sign in, my session expires too soon. And I have too login again frequently.
    2. The remember me check box will no longer works.
    3. and, worse of them, some times when I try to login, I'll redirect to the error page!

    do you have any idea on what the problem is and how can I correct that?

    Thanks,

    Shahab

  • Re: frequent signouts

    05-15-2008, 4:14 AM
    • Loading...
    • anas
    • Joined on 09-21-2006, 8:31 AM
    • Jerusalem
    • Posts 3,907

    it seems that the application is restarting because of the modifications on the XML file that contains the Membership Data ,

    Please make sure you placed the XML files in APP_DATA folder , and not in Bin, OR in main website directory,

    did you used an existing XML prvider ? or did you wrote your custom one ?

    Note that any modification to BIN,Web.config,Global Application file, .ASPX page,.ASCX ,.... could cause to restart the application !

     

    Best Regards,

    Anas Ghanem| LogFile
  • Re: frequent signouts

    05-15-2008, 5:33 PM
    • Loading...
    • shahab1363
    • Joined on 03-30-2004, 1:24 PM
    • Tehran - I.R.Iran
    • Posts 37

    Hi,

    Thanks for your response.

    But, my xml files are in App_Data (users.config, roles.config and WebSite.config).

    I've changed an existing xml provider in one of microsoft starter kits (I do not remember which one was that!) and customized that for my application.

    Any idea? :(

  • Re: frequent signouts

    05-15-2008, 5:41 PM
    • Loading...
    • anas
    • Joined on 09-21-2006, 8:31 AM
    • Jerusalem
    • Posts 3,907

    Try to change the Files Extensions ,

    Instead of ".config" , use ".xml" or ".txt"

    ".config is a special extension, and maybe it causes the application to restart ,

    To make sure that the application will is not restarting when you change one of those files,

    run the application in debugging mode, and add a break point to application_start event in "global application file" ,

    application start must called when the application starts , now modify one of those files , and refresh the page ,

    if Application_start fired , then your application is being restarted every time you modify one of those files !

     

    Also : you should make sure that the hosting company doesn't overrides one of the Session and FormsAuthentication configurations !

    And the Most important thing is that you need to make sure that you application is configured as a virtual directory ,

    so that you can configure your own security settings ( like using Forms Authentication, setting cookie timeout ...)


     


     

    Best Regards,

    Anas Ghanem| LogFile
  • Re: frequent signouts

    05-15-2008, 6:03 PM
    • Loading...
    • shahab1363
    • Joined on 03-30-2004, 1:24 PM
    • Tehran - I.R.Iran
    • Posts 37

    OK, I'll try that.

    But, note that I have no problem on my development machine. I got this problem only on my remote server! So I dont think that file changes cause the problem.

    And, I dont know how to check my hosting company preferred settings and if they are overriding my settings. Also, I dont know how to make sure that my application is running  as a virtual directory. Do you know any way to detect these? I think that the problem cause should be on the server.

    Thanks :)

  • Re: frequent signouts

    05-15-2008, 6:19 PM
    Answer
    • Loading...
    • anas
    • Joined on 09-21-2006, 8:31 AM
    • Jerusalem
    • Posts 3,907

    You should contact the hosting company support ,and let him check if your website is configured as a virtual directory ,

    because if its not ,  your website will not able to apply its own security roles !

    the roles and security confgurations will be inherited from the main Virtual Directory .

     

    Best Regards,

    Anas Ghanem| LogFile
  • Re: frequent signouts

    05-16-2008, 7:03 PM
    • Loading...
    • shahab1363
    • Joined on 03-30-2004, 1:24 PM
    • Tehran - I.R.Iran
    • Posts 37

    Thanks. I'll ask them.

    Just which setting should I check? And is there anyway that I can find it out with my application (not changing), i.e. by a property or something like that?

Page 1 of 1 (7 items)