HTML and CSS Reference
These event handlers are invoked when the client or agent application is closed or otherwise disconnected.
In addition to removing the connection from the appropriate list, a message is sent to the other end of the
conversation so proper clean-up can be performed. If an agent is disconnected, all of the clients that were
connected to it need to be notified.
Creating the Agent Application
Now you'll create the agent application that will be used by the agents responding to client requests. This will
support up to four simultaneous chat sessions.
Creating the Agent Project
The Agent application will start with the standard ASP.NET web site template. This provides the ability to register
and login to the site, simulating the authentication that an agent would normally use.
eXerCISe 13-5. CreatING the aGeNt prOJeCt
From the Solution Explorer, right-click the Chapter 13 solution and select the
Add ➤ New project links.
In the “Add New project” dialog box, select the “ASp.NET MVC 4 Web Application”
template and enter the name Agent as shown in Figure 13-10 . Click the ok button
Figure 13-10. Creating the Agent application
In the next dialog box, select the Internet Application template and make sure the
razor engine is selected as shown in Figure 13-11 . This template provides a login
form that the agents will use to authenticate.