Permalink
Browse files

fix #219. iisnode installer enables webSocket config section on IIS8

  • Loading branch information...
1 parent 19c7e46 commit e33c99f1a5a1071fc2f6684e69f6ea2e033321f3 @tjanczuk tjanczuk committed Oct 11, 2012
Showing with 27 additions and 1 deletion.
  1. +13 −0 src/setup/iisnode-express-msi/addiisnodesection.js
  2. +14 −1 src/setup/iisnode-msi/addiisnodesection.js
View
13 src/setup/iisnode-express-msi/addiisnodesection.js
@@ -15,5 +15,18 @@ function main() {
// nothing to remove
}
var iisnode = systemWebServer.Sections.AddSection("iisnode");
+
+ var webSocketSection;
+ try {
+ webSocketSection = systemWebServer.Sections.Item("webSocket");
+ }
+ catch (e) {
+ // the section may not exist if we are on IIS 7
+ }
+
+ if (webSocketSection) {
+ webSocketSection.overrideModeDefault = 'Allow';
+ }
+
ahwrite.CommitChanges();
}
View
15 src/setup/iisnode-msi/addiisnodesection.js
@@ -15,5 +15,18 @@ function main() {
// nothing to remove
}
var iisnode = systemWebServer.Sections.AddSection("iisnode");
+
+ var webSocketSection;
+ try {
+ webSocketSection = systemWebServer.Sections.Item("webSocket");
+ }
+ catch (e) {
+ // the section may not exist if we are on IIS 7
+ }
+
+ if (webSocketSection) {
+ webSocketSection.overrideModeDefault = 'Allow';
+ }
+
ahwrite.CommitChanges();
-}
+}

0 comments on commit e33c99f

Please sign in to comment.