send popup in desktop application from asp.net web page - asp.net

I have a web application and on that application i update a sql database ...what i want is that when i update the database from the web application a notification will be sent to any one openening my application or a pop up appears to them on their desktop informing them that the database is updated to check all this will be in an intranet.
I'm using ASP.Net and I'm the admin for all the PCs in the network and the server.
Does anyone knows how i can do this ?

Build a desktop application that polls the database regularly or better write a HTTP/REST service where desktop application poll frequently.

What you need is a WCF duplex service your website and your windows clients connect to. With such a service you can use callback methods to inform your windows clients through the service. But be aware that this is normally an intranet and not an internet scenario because such an wcf binding has problems with internet infrastructure (Proxies, Firewalls, ...)

Related

NServicebus Hosted in IIS vs Windows Service

I am hosting a handler inside of a IIS web application. Is this a good solution ? Or Should I Hosting a handler in windows service application ? Which solution is better? What is recommended and what is more performance ?
I use SqlTransport in my configuration.
There are many factors that can effect how you choose to host your endpoint(s). For example
How you want to scale your site / handlers
What permissions can be granted to your web site process
How an IIS reset can effect your handling code
But in general... Host the bus in both the Web Application and a Windows service.
The web application handles incoming http requests, translates those requests to messages and places them on the bus via a Send.
The Windows service takes message off the bus and does the actual handling/business processing.
Some useful links that may guide you to the best solution for you circumstance
Hosting documentation http://docs.particular.net/nservicebus/hosting/ which contains some information on hosting in a web application
Windows Service Hosting http://docs.particular.net/nservicebus/hosting/windows-service
A showcase sample that uses a similar design as i described above http://docs.particular.net/samples/show-case/on-premise/
Web related samples http://docs.particular.net/samples/web/
Implications of Publishing from Web Applications http://docs.particular.net/nservicebus/hosting/publishing-from-web-applications
If you need to send messages from your web application then the only solution is to host NServiceBus in IIS, With IIS you shouldn't be publishing events from IIS.
Take a look here for more details
HTH

Using ASP.NET Web application as SignalR client

My team is in the middle of deciding the architecture of our backend system:
Webserver A is an ASP.NET MVC application with ASP.NET Web API component, hosted in Azure Website.
Windows Service B is a self-hosted OWIN server that will periodically push notifications to clients who subscribes to the notification, hosted in Azure VM.
Windows Service C is a client that subscribes to notification from B, hosted in Azure VM.
Since we are more-or-less entrenched in .NET stack, we implemented B as SignalR server with C being the SignalR client. This part seems to work well.
Now comes a point where we also want A to subscribe to B, but I realize that it means an ASP.NET Web Server is going to act as SignalR CLIENT, instead of the typical scenario where it acts as SignalR server.
I presume we can initialize the SignalR connection in Global.asax and make the process ever-running to avoid AppDomain recycle. However, I feel a bit iffy when a Web Server is made to do something other than serving web requests. This solution also make the web server not stateless since it needs to maintain the web socket connection alive.
Is there something fundamentally wrong with making an ASP.NET application a SignalR client? Is there any possible gotcha with this setup?
In Azure you cannot tell that your AppDomain will not recycle. Because of many reasons, it can restart itself to heal and then you will end up making a new connection to the SingleR server. Is that OK for you?
Also SingleR is mostly used in the Web Functionality improvement where polling and refresh on web clients is made simple. But as your requirement seems to be all a back end stuff, I would suggest you to go with any other event driven pattern. Check Azure Service Bus topic/subscription model to have different components listen to various events and act accordingly.

Connect to Local Webservice from Mobile app

I need to make an application where a mobile web app can connect to a local web service in a LAN. For example, several locations are running this web service on their own local server. When someone with the mobile app comes into the location they can open it up and it will somehow be able to connect to that local webservice through WiFi. The mobile app won't know the IP of that webservice ahead of time. Any thought on how to go about this? This will be a .NET webservice and HTML5 app but I don't think that matters.
As mentioned in the comments you will probably have to make it configurable by the user as the will ultimately need the address of the server.
There is however another approach that you can take. Develop a small multicast/udp service that broadcasts the web service address every 10-30 seconds. In your android application register a broadcast receiver that responds to the network connectivity status and runs in the background.
This service on the Android service will pick up the address from the UDP broadcasts and then configure the application.

is it possible to control a desktop application by a web application

I have developed a desktop application in c# which send SMS by using an api, It has two button controls 'Send SMS' and 'Stop SMS'. This application is running on a Microsoft SQL server 2008 R2 and I have assigned an Static IP also.
Now my question is that, can I access this application using a web application, means can I control both buttons functionality over web site if I create one and host is from the same server?
Yes. You can make your application to listen spesific port and your web app can send requests to that IP and Port.
As Mike said, actually you should be able to reuse the business logic codebase of your Desktop-Application.
But if this is no option, you also could use named pipes for communcation between the several processes, where you desktop application would be the server, that the wep application would connect to.
May have a look at here:
http://msdn.microsoft.com/en-us/library/bb546085(v=vs.100).aspx

vb.net client server - connect to desktop app from website

Tools : VB.net (VS2010), MySQL
I've a client desltop application connecting to my asp.net (vb) website. The desktop app typically sends a request and web app (server) responds to it.
Now, for certain scenarios, I would like website to connect to the client app and sends some data. How do I do it ?
I know client-server app (desktop app to desktop app) but not sure whether this can be done from website to destop app.
Any help is appreciated. Thanks.
You could use SignalR Framework.
From asp.net website : "ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization."
Have a look here for documentation and tutorials : http://www.asp.net/signalr

Resources