2
votes

I install my windows service using WiX installer. It adds Firewall exception:

<File Id="file_1000_" Checksum="yes" Vital="yes" KeyPath="yes" Source="$(var.SourceFiles)\MyService.exe">
<fwrules:FirewallException Id="FirewallDomainMySvcTCP"
Name="My Service Domain TCP"
Protocol="tcp"
Port="[PORTNUMBER]"
Scope="any"
IgnoreFailure="yes"
Profile="domain" />

My service is a windows host for a few WCF services.

Then I run a query from other workstation to the service, it cannot connect. I go to Control Panel->Firewall->Advanced->Inbound Rules and see the rule exists but on "Program and services" it has a "This program: " When I mark "All programs that meet the specified conditions" my client connects to the service and works fine.

How I can add in my Installer the Firewall exception rule which is for "All programs that meet the specified conditions" but not for one exe?

1

1 Answers

-1
votes

Solved: Remember: you should add ComponentRef to this component into the Fragment(!!!)

The elements

should be under Component but not under File. I moved them on one level upper. Like this: (check the 1st message: "Component" instead of "File")

... ...

...