Hi Everyone, I'm having some troubles working on a project that involves ASP's an Oracle connection.
The thing is that I need to have a global variable that will comunicate with the webservice that connects to the data base.
I've been reading some articles and I've found that I can declare global variables in ASP's using Application like this:
myServer.Service1 Server1 = new myServer.Service1();
Application.Add("Server",Server1);
in the Global.asax.
It does work when I try to connect to de data base using the first web page, but when I call it from other page from the project I've got this message:
"Operation is not valid due to the current state of the object."
I've tried also to update the state of the object in the first page doing this:
MyServer.Service1 servidor = (MyServer.Service1)Application.Get("Server");
// Some code using variable server
//...
// then
Application.Set("Server",servidor);
Application.UnLock();
I believe it must be something simple, but I'm really new on this.
I whish somebody could help me, please.