Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

Table of Contents (20 chapters)
WiX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding an exception to Windows Firewall


Windows Firewall protects us from hackers that might try to connect to random ports on our computer. However, if we want to allow our own programs to receive messages, we'll need to add exceptions to the firewall to let them through. In this recipe, we'll install a console application that listens on a certain port and then add this program to the list of applications that are allowed to have incoming messages pass through the firewall.

Getting ready

So that we're able to test our firewall exception, let's create a console application that will listen on a TCP port. Ordinarily, if anyone on a different computer tried to access that port to send a request, it would be blocked by the firewall. Perform the following steps to set up the application and include it in our installer:

  1. Create a new C# Console Application project named PortListeningProgram and add the following code to its Program.cs file:

    using System;
    using System.IO;
    using System.Net;
    using System...