Notifying a user on demand

Discussion in 'ASP .Net' started by Nick, Jul 8, 2008.

  1. Nick

    Nick Guest

    Hi there,

    I'm trying to think of a possible waht that I can achieve notifying the
    current user of events via a webservice, in realtime. For example, I might
    want to pop a message up on the logged on users screen, but not via the page
    Load event.

    I thought of making a static class with an event delegate, this works in an
    isolated project of course, but not from Web Service -> Website, even though
    they are in the same application domain.

    ----

    namespace WindowsFormsApplication1
    {
    class UserNotification
    {
    public delegate void recievedNotificationHandler(String iUserID);
    public static event recievedNotificationHandler
    recievedNotification;
    public static void notifyUser(String iUserID, Object[]
    iNotifyParams)
    {
    recievedNotification(iUserID);
    }
    }
    }

    ----

    The only other way I can think of is via an Ajax update panel updating on a
    regular basis in order to check for notifications, but this wouldn't be
    realtime and could cause allot more stress on the server. Any ideas on if
    this can be done or not?

    Another example of what I want to use this for is to log-off the user
    on-demand.

    Many thanks for your time.

    Nick.
     
    Nick, Jul 8, 2008
    #1
    1. Advertising

  2. Nick

    Nick Guest

    Hi Patrice,

    The site is for public usage. One reason I mention the capability of
    being able to log off the user on-demand would be that it would just mean
    that it would be technically possible for me to process any other code, the
    logging off on-demand isn't so important, just the practice behind it.

    What i'm trying to do is enable a webservice to have extra control over
    the logged on user so that I can provide some extra functionality that isn't
    currently possible using the standard principals. I'm a little worried
    about polling as I'm not sure what impact that would have with 100+ users
    polling for notifications at the same time, and of course the delay between
    a notification being sent and recieved.

    Of course I might be being a tad too over cautious.

    Thanks a million for your feedback, I hadn't thought of silverlight as a
    possible solution, that could help with a number of issues...

    Nick.

    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > As mosft often knowing the context could help. Is this for general public
    > or in a controlled environment ?
    >
    > Depending on the context you could also explore using the "net send"
    > service, SilverLight, or an instant messaging API ?? If you need to stick
    > to a basic browser then you'll have likely no other choice than polling...
    >
    > For logging off a flag that would log them off on the next request
    > wouldn't be enough ? What is the purpose of login them off ?
    >
    > --
    > Patrice
    >
    > "Nick" <> a écrit dans le message de groupe de discussion :
    > ...
    >> Hi there,
    >>
    >> I'm trying to think of a possible waht that I can achieve notifying the
    >> current user of events via a webservice, in realtime. For example, I
    >> might want to pop a message up on the logged on users screen, but not via
    >> the page Load event.
    >>
    >> I thought of making a static class with an event delegate, this works in
    >> an isolated project of course, but not from Web Service -> Website, even
    >> though they are in the same application domain.
    >>
    >> ----
    >>
    >> namespace WindowsFormsApplication1
    >> {
    >> class UserNotification
    >> {
    >> public delegate void recievedNotificationHandler(String iUserID);
    >> public static event recievedNotificationHandler
    >> recievedNotification;
    >> public static void notifyUser(String iUserID, Object[]
    >> iNotifyParams)
    >> {
    >> recievedNotification(iUserID);
    >> }
    >> }
    >> }
    >>
    >> ----
    >>
    >> The only other way I can think of is via an Ajax update panel updating on
    >> a regular basis in order to check for notifications, but this wouldn't be
    >> realtime and could cause allot more stress on the server. Any ideas on
    >> if this can be done or not?
    >>
    >> Another example of what I want to use this for is to log-off the user
    >> on-demand.
    >>
    >> Many thanks for your time.
    >>
    >> Nick.
    >>

    >
     
    Nick, Jul 8, 2008
    #2
    1. Advertising

  3. Hi Nick,

    From the description in your first message, I think what you want to do the
    let the webservice server-side proactively notify the webservice client for
    some changing, correct?

    I'm afraid this is quite difficult as the webservice by default is used as
    the client calls the server for information modal. The server-side doesn't
    have any channel to send client-side informaton on the fly. Unless your
    webservice client is also a service host which will listening on a certain
    port(or host a certain webservice) to let the server-side invoke.

    For such kind of "server to client" notification in http based stateless
    environment, the most common way is still using a polling approach to
    constantly check the server-side status.

    Please feel free to post here if you have any other ideas or concerns.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: "Nick" <>
    >References: <>

    <>
    >Subject: Re: Notifying a user on demand
    >Date: Tue, 8 Jul 2008 15:27:34 +0100


    >
    >Hi Patrice,
    >
    > The site is for public usage. One reason I mention the capability of
    >being able to log off the user on-demand would be that it would just mean
    >that it would be technically possible for me to process any other code,

    the
    >logging off on-demand isn't so important, just the practice behind it.
    >
    > What i'm trying to do is enable a webservice to have extra control

    over
    >the logged on user so that I can provide some extra functionality that

    isn't
    >currently possible using the standard principals. I'm a little worried
    >about polling as I'm not sure what impact that would have with 100+ users
    >polling for notifications at the same time, and of course the delay

    between
    >a notification being sent and recieved.
    >
    > Of course I might be being a tad too over cautious.
    >
    > Thanks a million for your feedback, I hadn't thought of silverlight as

    a
    >possible solution, that could help with a number of issues...
    >
    >Nick.
    >
    >"Patrice" <http://www.chez.com/scribe/> wrote in message
    >news:...
    >> As mosft often knowing the context could help. Is this for general

    public
    >> or in a controlled environment ?
    >>
    >> Depending on the context you could also explore using the "net send"
    >> service, SilverLight, or an instant messaging API ?? If you need to

    stick
    >> to a basic browser then you'll have likely no other choice than

    polling...
    >>
    >> For logging off a flag that would log them off on the next request
    >>
     
    Steven Cheng [MSFT], Jul 9, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eliyahu Goldin

    Re: Notifying clients in asp.net

    Eliyahu Goldin, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    396
    Eliyahu Goldin
    Aug 4, 2004
  2. Steve Caliendo

    Notifying client before session timeout

    Steve Caliendo, Oct 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    450
    William F. Robertson, Jr.
    Oct 5, 2004
  3. Steve Caliendo

    Notifying client before timeout

    Steve Caliendo, Oct 13, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    329
    =?Utf-8?B?S2VuIENveCBbTWljcm9zb2Z0IE1WUF0=?=
    Oct 13, 2004
  4. Taki
    Replies:
    0
    Views:
    381
  5. (Pete Cresswell)

    Notifying user of running process?

    (Pete Cresswell), Oct 22, 2004, in forum: HTML
    Replies:
    5
    Views:
    389
    (Pete Cresswell)
    Oct 24, 2004
Loading...

Share This Page