How to: Implement a Custom ClickOnce Deployment Server File Repository
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
To implement a custom ClickOnce deployment server file repository, you must have a custom request handler running on the deployment Web server to intercept inbound file requests for .application files, .manifest files, and .deploy files. The handler retrieves the files from whatever repository you want to use as an alternative to the usual ClickOnce file storage, and then has them streamed back to the client computer as the response to the file request. In addition, the handler must set the appropriate MIME content type header so that the responses are properly handled by the ClickOnce runtime on the client computer.
You could write a handler that is hard-coded to retrieve the ClickOnce files from a specific location or in a specific way. However, it makes more sense to factor out the retrieval logic from the handler into a provider that you can plug into multiple implementations without having to update the handler.
The following steps are required for this procedure:
- Implement an HTTP handler that intercepts file requests for ClickOnce manifests and application files, and then retrieves them from a repository provider.
- Implement a repository provider that retrieves the files from wherever you need to store them.
- Configure the Web site in Internet Information Services (IIS) to route ClickOnce manifest file requests and application file requests to ASP.NET.
- Configure the ASP.NET application to use the handler for incoming ClickOnce manifest file requests and application file requests.
- Populate the repository with ClickOnce application files.
- Configure the handler to use the repository provider to retrieve the files.
For information about how to complete these steps, see Implementing a Custom ClickOnce Deployment Server File Repository.