Y
Yehia A.Salam
Hello,
I am building an ASP.net website that connects to an XML database, and was
wondering which is the best way to create the connection if I need frequent
access to the database, I have one of the three options:
1. Use one instance of XmlDocument thought the whole Application by
initializing the class in Global.asax in the Application_Start Event.
2. Use one instance per session using the Session_Start Event.
3. Create and initialse the XmlDocument as late as possible and close it as
soon as possible, by creating a new instance and close each time per access.
I I know that if I were using SQL database I would go with option 3 because
of the connection pooling and the security concerns, but this feature is not
available for XmlDatabases AFAIK, should I depend on the caching features of
ASP.net? , what is best design of the three to use?
Thanks
Yehia A.Salam
I am building an ASP.net website that connects to an XML database, and was
wondering which is the best way to create the connection if I need frequent
access to the database, I have one of the three options:
1. Use one instance of XmlDocument thought the whole Application by
initializing the class in Global.asax in the Application_Start Event.
2. Use one instance per session using the Session_Start Event.
3. Create and initialse the XmlDocument as late as possible and close it as
soon as possible, by creating a new instance and close each time per access.
I I know that if I were using SQL database I would go with option 3 because
of the connection pooling and the security concerns, but this feature is not
available for XmlDatabases AFAIK, should I depend on the caching features of
ASP.net? , what is best design of the three to use?
Thanks
Yehia A.Salam