0

I have an application that use a static class too large and complex for this reason can not use the standard Asp.net Session. More telho problems with the stability of my application because when the pool closed by an error in a estarna dlls, all static variables are discharged.

I wonder if there is a setting for each "client" open a pool. So if a User does not fall knocks others.

  • 2
    Some clarification please... The static class is too lrage and complex to use the Asp.NET session for what? What is the specific problem that you are facing? – Kevin Nov 04 '12 at 13:37
  • is a class that can not be serialized quarda values ​​of an interaction with a machine. For this reason I can not use the default asp.net session. I use a static class and works well, telho only problem with the stability of the pool. because in a common application when the pool is closing the session is recovered and ready, as in my case, this static object falls jutno with pool. Is there a ject to hold this static object separate from the pool and even have free access to this memory? – Rafael leonel pontani Nov 04 '12 at 13:53

2 Answers2

0

If you have a static class there is only one of that class for the application pool. If this class has something different for each user it shouldn't be static. If the class only contains general information not pertaining to a specific session and you don't want to make it an instance class then make sure there are no exceptions being thrown in the static class' constructor.

Four_0h_Three
  • 592
  • 10
  • 27
  • science rather have it more in my case I have to use this class as static Intent do with a machine. several users that the accession plumb more content in my case the instability is of general application, for a connector exeplo bank is giving a fatal error in the pool and for this reason he drops the class static. – Rafael leonel pontani Nov 04 '12 at 14:00
0

In addition to YetAnotherSoftwareDeveloper's answer, application pooling is used to provide a mechanism that can be used to isolate applications for stability and security reasons, not to isolate individual client sessions.

If you have an application that is unstable, you can keep it from having a detrimental effect on other applications by isolating it in its own application pool. This will not provide any stabilizing effect on the application having problems, but will keep it from crashing other applications on the same server.

Kevin
  • 552
  • 2
  • 4
  • is that my problem is not with the class static. it is stable and has no problems with other parts is, as the connector to the database that avezes crashes and closes the pool. – Rafael leonel pontani Nov 04 '12 at 13:57
  • What DBMS are you using and what exception is it throwing when it crashes? – Kevin Nov 04 '12 at 14:00
  • so I am evaluating is very unstable, the debugger tells me that is a flaw in the lock on a variable that causes this unexpected closure. Use the connector native firebird that is written in. NET – Rafael leonel pontani Nov 04 '12 at 14:04
  • but I'm afraid that another class external cause the same problem. for this reason seek a solution to this class static extanciar outside the pool. – Rafael leonel pontani Nov 04 '12 at 14:06
  • Firebird DB is open source. Did you get the source and compile it, or download the binaries? If there is an instability in the third party software (Firebird Native Provider), and you are evaluating its suitability for use in an application, the fact that it is unstable is a sure indicator that you need to find another software to use. – Kevin Nov 04 '12 at 14:08
  • I'm still not quite getting how the static object plays into this scenerio either. Are you using a static object as your data access object? If so this is generally a bad idea as DB connections should be as short lived as practical/possible. – Kevin Nov 04 '12 at 14:12
  • is complicated because the code already use open source connector in my Abiente of desenvolvimenot, the problem is more that. generating a Net this error that closes the pool in a command lock connector .. I believe that this is not a problem explicit location of connector. can be until the connector bypasses this problem, more instability in the pool will always exist in applications with several customers. By this I am not seeking the instability of an external component or C # but how to circumvent this instability saving this static class in another process eg .. its not ^ ^ – Rafael leonel pontani Nov 04 '12 at 14:14
  • I'm afraid that I'm not going to be able to help you here. It appears that the problem is in your application's software architecture. I don't know how far along you are in development, but I think you may be in for some real problems. Also, I apologize for the problems we seem to be having overcoming the language barrier - the translator that you are using is not always producing clearly understandable english. – Kevin Nov 04 '12 at 14:24