Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Major mixup in two ASP.NET transactions
Message
De
03/09/2006 04:59:15
 
 
À
02/09/2006 16:53:07
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01150471
Message ID:
01150585
Vues:
33
Hi,

>But, on all other hits, I am creating a private property of that global application object and use that instead. As this is private, this could work. What do you think?

Don't think that would work. You've always got just the one instance of your framework object that's potentially being hit from multiple threads. You could map your framework oRequest/oResponse properties to the current objects e.g:
  Public Property oResponse
        Get
           Return HttpContext.Current.Request
        End Get
   End Property
In the end, when you make a call to your framework object, you cannot assume that any per-request based information in it relates to the request actually making the call. In fact I think you have to address the general concurrency issues - all methods of the framework would need to be threadsafe (maybe Application.Lock()?) - and that's another performance hit (not sure about this - I've a feeling that HttpApplication itself is threadsafe to some degree but I've no documentation to hand).

I hate to say it but, although you could get this to work, I think it would be wise to rethink the design of the application...
Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform