Application_Start event

N

Nissim

i wrote the code below in global.asax:
protected void Application_Start
(Object sender, EventArgs e)
{
m_Adapter.SelectCommand = m_CityCmd;
m_Adapter.Fill(m_DataSet,"Cities");
Application["DS"] = m_DataSet;
}

but that event never raised, or maybe its raised but the
method never run, why?
Thanks
 
N

Nissim

Hi Jan
the question is about Web Services application_start event,
when the service start i want to create DataSet and save
it in cache for other requests, i dont want read data from
my data source each request.

thanks
-----Original Message-----
I suggest you post this question in the ASP.NET newsgroup, this one is for
webservices.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Nissim said:
i wrote the code below in global.asax:
protected void Application_Start
(Object sender, EventArgs e)
{
m_Adapter.SelectCommand = m_CityCmd;
m_Adapter.Fill(m_DataSet,"Cities");
Application["DS"] = m_DataSet;
}

but that event never raised, or maybe its raised but the
method never run, why?
Thanks


.
 
J

Jan Tielens

The application_start event is an event of ASP.NET, it's not specific for
webservices (please correct me if I'm wrong). In the ASP.NET newsgroup are
some more people who have knowledge of all ASP.NET stuff. So I really think
that they can tell you a little bit more over there. :)

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Nissim said:
Hi Jan
the question is about Web Services application_start event,
when the service start i want to create DataSet and save
it in cache for other requests, i dont want read data from
my data source each request.

thanks
-----Original Message-----
I suggest you post this question in the ASP.NET newsgroup, this one is for
webservices.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Nissim said:
i wrote the code below in global.asax:
protected void Application_Start
(Object sender, EventArgs e)
{
m_Adapter.SelectCommand = m_CityCmd;
m_Adapter.Fill(m_DataSet,"Cities");
Application["DS"] = m_DataSet;
}

but that event never raised, or maybe its raised but the
method never run, why?
Thanks


.
 
N

Nissim

Thanks jan.
i know about Application_start and ASP.NET, i use that
event very frequently.
but when i try to write any code in that event in web
services (create Application that save dataset in cache,
ofor a sample) i failed to do that,
i assumed that that event dosnt occure in web service,
am i right?
Thanks
-----Original Message-----
The application_start event is an event of ASP.NET, it's not specific for
webservices (please correct me if I'm wrong). In the ASP.NET newsgroup are
some more people who have knowledge of all ASP.NET stuff. So I really think
that they can tell you a little bit more over there. :)

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Nissim said:
Hi Jan
the question is about Web Services application_start event,
when the service start i want to create DataSet and save
it in cache for other requests, i dont want read data from
my data source each request.

thanks
-----Original Message-----
I suggest you post this question in the ASP.NET newsgroup, this one is for
webservices.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan



i wrote the code below in global.asax:
protected void Application_Start
(Object sender, EventArgs e)
{
m_Adapter.SelectCommand = m_CityCmd;
m_Adapter.Fill(m_DataSet,"Cities");
Application["DS"] = m_DataSet;
}

but that event never raised, or maybe its raised but the
method never run, why?
Thanks



.


.
 
G

Guest

Yes, yes. This is a asp.net question. But what is a
webservice but an asp.net application with extra fluff.
To help you get to where you need to be:

whenever you talk to the application variables, you must
lock the application
set the value
unlock the application

application.Lock();
applicaton("DS") = objDS;
application.Unlock();

remember that once you lock the applicaton, everyone else
is waiting on you. Make this quick as possible.

logic block
code
code
code
end lock

lock app
savework
unlock app


HTH,

Matthew


-----Original Message-----
Thanks jan.
i know about Application_start and ASP.NET, i use that
event very frequently.
but when i try to write any code in that event in web
services (create Application that save dataset in cache,
ofor a sample) i failed to do that,
i assumed that that event dosnt occure in web service,
am i right?
Thanks
-----Original Message-----
The application_start event is an event of ASP.NET,
it's
not specific for
webservices (please correct me if I'm wrong). In the ASP.NET newsgroup are
some more people who have knowledge of all ASP.NET
stuff.
So I really think
that they can tell you a little bit more over there. :)

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Nissim said:
Hi Jan
the question is about Web Services application_start event,
when the service start i want to create DataSet and save
it in cache for other requests, i dont want read data from
my data source each request.

thanks

-----Original Message-----
I suggest you post this question in the ASP.NET
newsgroup, this one is for
webservices.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan



i wrote the code below in global.asax:
protected void Application_Start
(Object sender, EventArgs e)
{
m_Adapter.SelectCommand = m_CityCmd;
m_Adapter.Fill(m_DataSet,"Cities");
Application["DS"] = m_DataSet;
}

but that event never raised, or maybe its raised
but
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top