locked
Session InProc RRS feed

  • Question

  • User1111434469 posted

    Hello,

    When I started using Session InProc, my code behaves differently:

    1) on normal localhost test (when I write the address in browser, using is a virtual dir) and

    2) on Visual Studio F5 (Start Debugging) the project.

    In case 1) when I try to write in textbox it shows my Windows authentication window to enter account username & password and it doesn't show autocomplete

    In case 2) when I try to write in textbox it doesn't show my Windows authentication window and it doesn't show autocomplete.

    When I comment SessionState configuration in web.config, everything 1) & 2) cases work as normal.

    I use Visual Studio 2008, CS, asp.net and I have Session configuration in web.config:

        <sessionState mode="InProc"
            cookieless="true" timeout="1">
        </sessionState>


    I also have in codebehind a textbox with attached javascript to it:

        <script type="text/javascript">
            function pageLoad(sender, args) {
                var autoComplete = $find('autoComplete');
                autoComplete.add_populating(function() {
                    //  use the filter as the context key
                    autoComplete.set_contextKey($get('<%= this.ddlFilter.ClientID %>').value);
                });
                autoComplete.add_itemSelected(function() {
                    //  force the panel to refresh
                    __doPostBack('<%= this.updPanel.ClientID %>', '');
                });
            }
        </script>  
    <asp:UpdatePanel ID="updPanel" runat="server">
        <ContentTemplate>  
                <asp:TextBox ID="txtFilter" runat="server" autocomplete="off" OnTextChanged="FilterChanged" AutoPostBack="True" />
                <ajaxToolkit:AutoCompleteExtender 
                    ID="autoComplete" BehaviorID="autoComplete" runat="server"
                    TargetControlID="txtFilter" ServiceMethod="GetCompletionList" 
                    CompletionSetCount="5" UseContextKey="true" ContextKey="test"
                    MinimumPrefixLength="2" CompletionInterval="1000"
                    CompletionListCssClass="autocomplete_list" 
                    CompletionListItemCssClass="autocomplete_listItem" 
                    CompletionListHighlightedItemCssClass="autocomplete_highlighted_listitem"
                />
      </ContentTemplate>
    </asp:UpdatePanel>    


    This textbox along with ASP.NET AJAX and the above javascript filters and do autocomplete on some data.

    How to solve the problem?


     

     

     

     

     

     

     

    Tuesday, February 8, 2011 4:36 AM

Answers

  • User-968982370 posted

    Hi, Try  cookieless="false" 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 8, 2011 5:13 AM

All replies

  • User-968982370 posted

    Hi, Try  cookieless="false" 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 8, 2011 5:13 AM
  • User1111434469 posted

    Yes, that solved the problem. If I don't want cookies, but i want a random string in the address bar, how can I do it?

    Tuesday, February 8, 2011 5:33 AM
  • User-968982370 posted

    Then you have to add querystring to your URL. when redirecting from any place use http://yoursitename.com?randomstring=randomvalue 

    Tuesday, February 8, 2011 6:22 AM
  • User1111434469 posted

    If I have cookieless="true" then, I have a random string id in the address bar. I want to keep this random session string in the address bar and everytime i have a new session to change that string and autocomplete to work properly.

    Tuesday, February 8, 2011 7:18 AM
  • User533502567 posted

    I want to keep this random session string in the address bar and everytime i have a new session to change that string and autocomplete to work properly.
     

    Every time you have new session, by default Session ID will change. You don't have to do anything. 

    Tuesday, February 8, 2011 10:05 AM
  • User1111434469 posted

    You don't understand me... I don't want cookies and i want my javascript to work properly (take a look in the topic, my first post)

    If I use cookieless="true" my javascript is not working properly.

    If I use cookieless="false" my javascript is working OK, but I don't have SessionID querystring in address bar.

    Tuesday, February 8, 2011 10:14 AM
  • User983825434 posted

    Hi Guys,

    Actually my scenrio while changing cookieless="True" to cookieless="False" then it's showing the javscript please share some solution for this great help for me

    Thanks

    Ranganathan palanisamy

     

     

     

    Tuesday, August 21, 2012 2:22 PM
  • User983825434 posted

    Thanks for every one , I found the solution to above problem

    1. Cookies are diable from the client system.so Session Id are not storing the cookies

    2. Javascript files are not loading properly.

    <script type="text/javascript" src='<%= Page.ResolveUrl("~/js/Help_CSH.js") %>'></script>

    Thanks

    Wednesday, August 22, 2012 6:41 PM