Using URL Rerouting with a WCF Service
The Web Application project uses URL rerouting to allow the BackgroundTransferRequest
to pass the user ID and filename to the service via the URL.
The routing system on the server is initialized in the RegisterRoutes
method of the Global
class in the Web Application project. The URL routing APIs reside in the System.Web.Routing namespace. A new ServiceRoute
is added to the RouteTable
, so that when a request for the URL BackupService
arrives, the built-in WebServiceHostFactory
creates an instance of the BackupService
class to service the request. See the following excerpt:
public class Global : System.Web.HttpApplication{ protected void Application_Start(object sender, EventArgs ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.