Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIS screwed up?
Message
De
18/03/2003 13:18:03
 
 
À
17/03/2003 19:25:43
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00766801
Message ID:
00767166
Vues:
18
Keith,

An update on this weird situation. It had nothing to do with the fact that I was using SQL mode for my SessionState. The error message had absolutely nothing to do with what was happening, which was forcing me on a wild goose chase. Something got confused somewhere and all hell broke loose. Anyway, the problem had to do with the DataSets that I was saving to the Session variable.

In the declarations of the form I should have used this:
    private MyDataSet oData;
instead of this:
    private MyDataSet oData = new MyDataSet();
And then, in the PageLoad, I should have had this:
    if (Session["MyData"] == null)
        oData = new MyDataSet();
    else
        oData = (MyDataSet)Session["MyData"];
With the way I was doing it originally (the new MyDataSet() in the declarations), once it posted back, it got all confused because oData was not the same as Session["MyData"]. Anyway, this has solved another problem I was having with data in some of my tables in the DataSet getting wiped out, and it makes sense now that I think about it. If the error message had reflected what was really going on, I would have solved this mystery days ago.

Anyway, just thought you or anyone else who was following this thread might be interested in the outcome.

~~Bonnie



>Just a wild guess, but you could also try forcing SQL Server to flush the transaction logs for your database. SQL Server should have done it when you rebooted the server but there might be bad data in there that it can't handle. If it is a development server, you can detach and re-attach the database to force the flush.
>
>>Thanks Keith ... I always forget about checking there (even though our application logs errors there). I guess I've got a mental block about it. However, looking in the error log doesn't shed any light on the situation other than to say that *maybe* it *is* a SQL problem and not necessarily a SessionState problem (because some of the error messages indicate SqlClient errors). I guess I'll try using the in-process SessionState and see if that solves the problem, but I don't think it will.
>>
>>Any other ideas?
>>
>>~~Bonnie
>>
>>
>>
>>>The first thing I would do is check the Event Log of the server. Sometimes you can get lucky and see pertinent info in the error messages.
>>>
>>>>Hey gang,
>>>>
>>>>Here's one that's got me stumped. This is the second time it's happened to me. The first time, I figured it was just a fluke and recreated my TestForm. But, since it's happened again, it has me worried that it will happen on my real form instead of a TestForm and then I'll be up the creek without a paddle. Here's what happened:
>>>>
>>>>I was in the middle of debugging my Test WebForm. I'm doing stuff with saving SessionState variables to SQL Server (although I can't say whether it's the SQL Server part of it that's problematic ... at this point I don't think so). Anyway, .NET and IIS locks up really bad , for who-knows-what-reason (probably over-worked and under-paid). Killing the VS.NET process thru Task Manager allows me to get out of it, but I can't even bring up VS.NET after that because it hangs up (or times out actually) on trying to access the WebServer. The only recourse is to reboot (I've tried stopping/restarting IIS ... doesn't help).
>>>>
>>>>Anyway, once the PC has been re-booted, everything is fine ... except for that one WebForm that crashed. I just cannot run it again, no matter what I try I keep getting the following error:
>>>>
>>>>Session state can only be used when enableSessionState is set to true, either in a configuration file or in a Page directive
>>>>
>>>>It *is* set to true in the machine.config, I'm using the sessionState mode = "SQLServer" etc. in the Web.config. It works fine on any other page I start up, just not the one that crashed-and-burned. I tried putting EnableSessionState="true" in the Page directive (as the error message suggested), but it still won't work.
>>>>
>>>>I'm guessing something's hosed in IIS, but I don't have a clue where to look or how to fix it. Anybody???
>>>>
>>>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform