.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

Session identifier missing until a couple of calls done to webservice

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server
 

Hi!

I use the ReportExecution2005 service to render reports and on the first rendering of the stylesheet, and on the first call to ToggleItem I get "A session identifier is required for this operation" exception. If I go back to the first "get" to my page and click ctrl+F5 it starts behaving well. Stylesheet and toggling works as expected.

In my local environment, both on my computer and testserver (64bit) it works first time, but in my customers environment (64bit) it fails as described. I've checked that we've got exactly the same version of SQL Server.

Any ideas where to start debugging?


Lars-Erik


View Complete Post


More Related Resource Links

Apparently missing something in my understanding of session handler...

  

 It was doing exactly what I expected until I added more than 1 property to it.   It seems if I set the value of a property this, in turn, sets every property in the handler to the same value.  It's blatantly obvious I didn't have the understanding I thought I did on this.  :-)

Could someone point out what I'm missing?  I figured it had something to do with the "shared" but if it's not shared then I would have to declare an instance on my page which would kinda ruin the state of my variables (otherwise, I'd just put them all in my class), right??

Private Shared _strStudentName As String
Private Shared _strSchoolID As String


    Public Shared Property StudentName() As String

        Get

            If (HttpContext.Current.Session(SessionHandler._strStudentName) Is Nothing) Then
                Return String.Empty
            Else
                Return HttpContext.Current.Session(SessionHandler._strStudentName).ToString()
            End If

        End Get

        Set(ByVal value As String)
            HttpContext.Current.Session(SessionHandler._strStudentName) = value
        End Set

    End Property



    Public Shared Property SchoolID() As String

        Get

            If (HttpContext.Current.Session(SessionHandler._strSchoo

ReportViewer looping ajax calls to keep session alive causes Firefox to look like it's constantly r

  
In the HTML generated by the ReportViewer there is the following line of code (I've tried ot make it more readable by removing the superfluous information)
setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...&TimerMethod=KeepAliveMethodReportViewer1TouchSession0...", 0);

function KeepAliveMethodReportViewer1TouchSession0() {
   setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...TimerMethod=KeepAliveMethodReportViewer1TouchSession0....", -1703027296);
}

 

When the Reserved.ReportViewerWebControl.axd is called it makes a GET request that returns the following HTML:

 

<html><body><script type="text/javascript">parent.KeepAliveMethodReportViewer1TouchSession0();</script
></body></html>
 

 So in effect it becomes a recursive function and because KeepAliveMethodReportViewer1TouchSession0 calls a set timeout with a negative timeout value, in Firefox it's called immediately, in about 10 secon

session timeout redirect in ajax calls

  

If a normal session timeout occurs we could handle the session timeout.

But say we are using a lot of ajax calls, webhandlers etc. How would we catch session timeout here and redirect to error/login page.

Thanks



ReportViewer looping ajax calls to keep session alive causes Firefox to look like it's constantly r

  
In the HTML generated by the ReportViewer there is the following line of code (I've tried ot make it more readable by removing the superfluous information)
setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...&TimerMethod=KeepAliveMethodReportViewer1TouchSession0...", 0);

function KeepAliveMethodReportViewer1TouchSession0() {
   setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...TimerMethod=KeepAliveMethodReportViewer1TouchSession0....", -1703027296);
}

 

When the Reserved.ReportViewerWebControl.axd is called it makes a GET request that returns the following HTML:

 

<html><body><script type="text/javascript">parent.KeepAliveMethodReportViewer1TouchSession0();</script
></body></html>
 

 So in effect it becomes a recursive function and because KeepAliveMethodReportViewer1TouchSession0 calls a set timeout with a negative timeout value, in Firefox it's called immediately, in about 10 seconds Firebug logs over 150 GET requests in one minute there

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Content Query Web Part missing in SharePoint 2010

  
If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Using JQuery to perform Ajax calls in ASP.NET MVC

  
The muscle behind the actual asynchronous calls comes from JavaScript. I looked around at a bunch of existing JavaScript libraries and settled on JQuery because of the way it leverages existing CSS knowledge. The three things that the library should do easily are:

Missing 'new item templates'

  

 Hi all,

          I am a 'newbie' to VWD and I am slowly working through the Basic Walkthrough Help files, and learning plenty along the way.

However, when I tried to create a new database in the LINQ control walkthrough I found that the option to create a new database is missing, and further investigation has found that many other new item templates are missing.

I am using a brand new machine with Windows 7 Ultimate and have enabled IIS and .NET from Control Panel-Programs-Turn Windows Features On-Off. I used the WPI to install all basic elements eg. IIS Components, SQL Server Express.

The only 'new item templates' I have when I right-click the App_Data Folder and choose 'new item' are:-

ADO.NET Data Service

AJAX Enabled WCF Service

Dynamic Data Field

SQL Server Database

Text File

XML File

Does anyone know where I have gone wrong.

 

Michael J. Hill


SQL Server Session state problem.

  

Hi to all,


I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.

1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?

Actualy Im working on it but Im having problems when connecting to the sql database.

2.  Is that a problem in the webhost?

3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.




Session and Application Variables

  

I have a web application in which i need to logout the user if he clicks the logout button or even if he closes his browser window. On Logout button click, i am doing session.Abandon(), but how to go about his browser window close.

Can anybody help with a code sample.


Is there any way to find out the reason for session expiry?

  

Dear All,

is there any way to find out the reason for session expiry?

Regards

Denny


Session time out earlyer with in 5 min.

  

In my live site session time out with in 5 min only.how can i get the default i.e 20 min time . below webconfig file give below



<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, &#xA;        System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, &#xA;        PublicKeyToken=31bf3856ad364e35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, &#xA;        System.Web.Extensions, Ver

Datatable in session

  

I am creating a simple shopping cart using a datatable that is passed into a session object.  I have a small mini cart that displays the total number of items in the cart as well as the running total - this is displayed in a web control.  When the web control starts up I run a try/catch to see if the session object exists, if it doesn't I create the datatable for the cart and store it in the session.  I then have a datalist control that contains all the information for my products including an "add to cart" button.  When the page loads everything looks fine.  If I click on an "add to cart" button nothing happens to the session information.  If I click on it again, the session information updates - displaying only one item is in the cart and then counts up correctly there after.  Additionally, after adding an item, if I select a different item in the list, the same issue occurs.  I am not sure why this is happeing, if anyone can give me an idea I would appreciate it. 


Session

  

Hi friends

I m facing a problem in my application with server so it needs changes .

My question is

Q1.Where should I store my session if i want to disconnect my server or How shold we storesession in web farm if specific serever is shut down.

Q2.Can anyone explain me difference between WEB FARM and WEB GARDEN

 

Regards

Chandrakant

 

 


Session Timeouts

  

What are the issues (if any) of setting sessions to expire after an extended period of time as in 4-8 hours? I'm building an intranet app which is designed so that users will access it once in the morning and then leave it used, possibly, for hours at a time. I'm assuming that there aren't too many since

1) we're running it on a intranet
2) sessions are soley to retain state between requests
3) its not like a connection to the DB where you can conceivable run out


holding datatable value using session

  

Hi,

iam insert record using datable in gridivew,iam using  session to hold the record,

there is any other way to hold the record in datable.

dtempty.Columns.Add("storeid");   
        dtempty.Columns.Add("ratetypeid");
        dtempty.Columns.Add("ratedesc");
        dtempty.Columns.Add("slabs");   
        dtempty.Columns.Add("days");
        dtempty.Columns.Add("rate");
        dtempty.Columns.Add("contid");
        dtempty.Columns.Add("continertype");

        DataRow row;
        row = dtempty.NewRow();
         
        row["ratetypeid"] = ddlratetype.SelectedValue;
        row["ratedesc"] = ddlratetype.SelectedItem.Text;
        row["slabs"] = ddlslabs.SelectedValue;   
 &n

Session with Crystal Reports on IE 8

  

All,

Having a very wierd problem.  I have an application that uses Crystal Reports and it uses what I have found to be a common scenario (I am not a CR expert in any way).  I have an ASPX page that gathers options for the report, and then it goes and gets the data and if there is some, a button appears for them to launch the report.  On clicking that button, the code sets some values in the HttpResponse.Context area, then performs a Server.Transfer to another ASPX page that is our Report Template.  This page contains the CR stuff and it generates a PDF version of the report.  It then does the following code:

 With HttpContext.Current.Response
            .ClearContent()
            .ClearHeaders()
            .ContentType = "application/pdf"
            .AddHeader("Content-Disposition", "inline; filename=Report.pdf")
            .BinaryWrite(s.ToArray)
            .End()
        E

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend