Professional Web Applications Themes

Application_Start event - ASP.NET Web Services

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...

  1. #1

    Default Application_Start event


    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

    Nissim Guest

  2. #2

    Default Re: Application_Start event

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

    --
    Greetz

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


    "Nissim" <nis_krighhotmsil.com> wrote in message
    news:00df01c3d537$cdd6a660$a101280aphx.gbl...
    >
    > 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
    >

    Jan Tielens Guest

  3. #3

    Default Re: Application_Start event

    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: [url]http://weblogs.asp.net/jan[/url]
    >
    >
    >"Nissim" <nis_krighhotmsil.com> wrote in message
    >news:00df01c3d537$cdd6a660$a101280aphx.gbl...
    >>
    >> 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
    >>
    >
    >
    >.
    >
    Nissim Guest

  4. #4

    Default Re: Application_Start event

    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: [url]http://weblogs.asp.net/jan[/url]


    "Nissim" <min_krighhotmail.com> wrote in message
    news:095e01c3d5b6$923ea8d0$a301280aphx.gbl...
    > 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: [url]http://weblogs.asp.net/jan[/url]
    > >
    > >
    > >"Nissim" <nis_krighhotmsil.com> wrote in message
    > >news:00df01c3d537$cdd6a660$a101280aphx.gbl...
    > >>
    > >> 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
    > >>
    > >
    > >
    > >.
    > >

    Jan Tielens Guest

  5. #5

    Default Re: Application_Start event

    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: [url]http://weblogs.asp.net/jan[/url]
    >
    >
    >"Nissim" <min_krighhotmail.com> wrote in message
    >news:095e01c3d5b6$923ea8d0$a301280aphx.gbl...
    >> 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: [url]http://weblogs.asp.net/jan[/url]
    >> >
    >> >
    >> >"Nissim" <nis_krighhotmsil.com> wrote in message
    >> >news:00df01c3d537$cdd6a660$a101280aphx.gbl...
    >> >>
    >> >> 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
    >> >>
    >> >
    >> >
    >> >.
    >> >
    >
    >
    >.
    >
    Nissim Guest

  6. #6

    Default Re: Application_Start event

    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: [url]http://weblogs.asp.net/jan[/url]
    >>
    >>
    >>"Nissim" <min_krighhotmail.com> wrote in message
    >>news:095e01c3d5b6$923ea8d0$a301280aphx.gbl...
    >>> 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: [url]http://weblogs.asp.net/jan[/url]
    >>> >
    >>> >
    >>> >"Nissim" <nis_krighhotmsil.com> wrote in message
    >>> >news:00df01c3d537$cdd6a660$a101280aphx.gbl...
    >>> >>
    >>> >> 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
    >>> >>
    >>> >
    >>> >
    >>> >.
    >>> >
    >>
    >>
    >>.
    >>
    >.
    >
    Guest

Similar Threads

  1. Web Service throws exception during Application_Start
    By fm@newsgroups.nospam in forum ASP.NET Web Services
    Replies: 7
    Last Post: December 15th, 04:19 PM
  2. application_start in webservices
    By mekim in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 24th, 12:43 AM
  3. Application_Start event does not fire on restart of IIS?
    By Morten Overgaard in forum ASP.NET
    Replies: 1
    Last Post: August 26th, 06:30 AM
  4. Application_Start fails
    By Anne Too in forum ASP.NET General
    Replies: 0
    Last Post: August 10th, 02:23 PM
  5. Application_Start not firing at all
    By Adrian in forum ASP.NET General
    Replies: 0
    Last Post: July 2nd, 03:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139