@joebigelow / wix-1 / commits / 4818bb24

Import code from old v4 repo

Sean Hall committed Dec 16, 2018 at 15:54 UTC 4818bb24e8f7f22345f90393239ce92129238ecc
12 files changed +6109
src/wixext/IIsCompiler.cs new
+2563
@@ -0,0 +1,2563 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.Extensions
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using System.Globalization;
8 + using System.Xml.Linq;
9 + using WixToolset.Data;
10 + using WixToolset.Extensibility;
11 +
12 + /// <summary>
13 + /// The compiler for the WiX Toolset Internet Information Services Extension.
14 + /// </summary>
15 + public sealed class IIsCompiler : CompilerExtension
16 + {
17 + /// <summary>
18 + /// Instantiate a new IIsCompiler.
19 + /// </summary>
20 + public IIsCompiler()
21 + {
22 + this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/iis";
23 + }
24 +
25 + /// <summary>
26 + /// Types of objects that custom HTTP Headers can be applied to.
27 + /// </summary>
28 + /// <remarks>Note that this must be kept in sync with the eHttpHeaderParentType in scahttpheader.h.</remarks>
29 + private enum HttpHeaderParentType
30 + {
31 + /// <summary>Custom HTTP Header is to be applied to a Web Virtual Directory.</summary>
32 + WebVirtualDir = 1,
33 + /// <summary>Custom HTTP Header is to be applied to a Web Site.</summary>
34 + WebSite = 2,
35 + }
36 +
37 + /// <summary>
38 + /// Types of objects that MimeMaps can be applied to.
39 + /// </summary>
40 + /// <remarks>Note that this must be kept in sync with the eMimeMapParentType in scamimemap.h.</remarks>
41 + private enum MimeMapParentType
42 + {
43 + /// <summary>MimeMap is to be applied to a Web Virtual Directory.</summary>
44 + WebVirtualDir = 1,
45 + WebSite = 2,
46 + }
47 +
48 + /// <summary>
49 + /// Types of objects that custom WebErrors can be applied to.
50 + /// </summary>
51 + /// <remarks>Note that this must be kept in sync with the eWebErrorParentType in scaweberror.h.</remarks>
52 + private enum WebErrorParentType
53 + {
54 + /// <summary>Custom WebError is to be applied to a Web Virtual Directory.</summary>
55 + WebVirtualDir = 1,
56 +
57 + /// <summary>Custom WebError is to be applied to a Web Site.</summary>
58 + WebSite = 2,
59 + }
60 +
61 + /// <summary>
62 + /// Processes an element for the Compiler.
63 + /// </summary>
64 + /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
65 + /// <param name="parentElement">Parent element of element to process.</param>
66 + /// <param name="element">Element to process.</param>
67 + /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
68 + public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
69 + {
70 + switch (parentElement.Name.LocalName)
71 + {
72 + case "Component":
73 + string componentId = context["ComponentId"];
74 + string directoryId = context["DirectoryId"];
75 +
76 + switch (element.Name.LocalName)
77 + {
78 + case "Certificate":
79 + this.ParseCertificateElement(element, componentId);
80 + break;
81 + case "WebAppPool":
82 + this.ParseWebAppPoolElement(element, componentId);
83 + break;
84 + case "WebDir":
85 + this.ParseWebDirElement(element, componentId, null);
86 + break;
87 + case "WebFilter":
88 + this.ParseWebFilterElement(element, componentId, null);
89 + break;
90 + case "WebProperty":
91 + this.ParseWebPropertyElement(element, componentId);
92 + break;
93 + case "WebServiceExtension":
94 + this.ParseWebServiceExtensionElement(element, componentId);
95 + break;
96 + case "WebSite":
97 + this.ParseWebSiteElement(element, componentId);
98 + break;
99 + case "WebVirtualDir":
100 + this.ParseWebVirtualDirElement(element, componentId, null, null);
101 + break;
102 + default:
103 + this.Core.UnexpectedElement(parentElement, element);
104 + break;
105 + }
106 + break;
107 + case "Fragment":
108 + case "Module":
109 + case "Product":
110 + switch (element.Name.LocalName)
111 + {
112 + case "WebApplication":
113 + this.ParseWebApplicationElement(element);
114 + break;
115 + case "WebAppPool":
116 + this.ParseWebAppPoolElement(element, null);
117 + break;
118 + case "WebDirProperties":
119 + this.ParseWebDirPropertiesElement(element);
120 + break;
121 + case "WebLog":
122 + this.ParseWebLogElement(element);
123 + break;
124 + case "WebSite":
125 + this.ParseWebSiteElement(element, null);
126 + break;
127 + default:
128 + this.Core.UnexpectedElement(parentElement, element);
129 + break;
130 + }
131 + break;
132 + default:
133 + this.Core.UnexpectedElement(parentElement, element);
134 + break;
135 + }
136 + }
137 +
138 + /// <summary>
139 + /// Parses a certificate element.
140 + /// </summary>
141 + /// <param name="node">Element to parse.</param>
142 + /// <param name="componentId">Identifier for parent component.</param>
143 + private void ParseCertificateElement(XElement node, string componentId)
144 + {
145 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
146 + string id = null;
147 + int attributes = 0;
148 + string binaryKey = null;
149 + string certificatePath = null;
150 + string name = null;
151 + string pfxPassword = null;
152 + int storeLocation = 0;
153 + string storeName = null;
154 +
155 + foreach (XAttribute attrib in node.Attributes())
156 + {
157 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
158 + {
159 + switch (attrib.Name.LocalName)
160 + {
161 + case "Id":
162 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
163 + break;
164 + case "BinaryKey":
165 + attributes |= 2; // SCA_CERT_ATTRIBUTE_BINARYDATA
166 + binaryKey = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
167 + this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", binaryKey);
168 + break;
169 + case "CertificatePath":
170 + certificatePath = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
171 + break;
172 + case "Name":
173 + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
174 + break;
175 + case "Overwrite":
176 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
177 + {
178 + attributes |= 4; // SCA_CERT_ATTRIBUTE_OVERWRITE
179 + }
180 + else
181 + {
182 + attributes &= ~4; // SCA_CERT_ATTRIBUTE_OVERWRITE
183 + }
184 + break;
185 + case "PFXPassword":
186 + pfxPassword = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
187 + break;
188 + case "Request":
189 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
190 + {
191 + attributes |= 1; // SCA_CERT_ATTRIBUTE_REQUEST
192 + }
193 + else
194 + {
195 + attributes &= ~1; // SCA_CERT_ATTRIBUTE_REQUEST
196 + }
197 + break;
198 + case "StoreLocation":
199 + string storeLocationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
200 + if (0 < storeLocationValue.Length)
201 + {
202 + switch (storeLocationValue)
203 + {
204 + case "currentUser":
205 + storeLocation = 1; // SCA_CERTSYSTEMSTORE_CURRENTUSER
206 + break;
207 + case "localMachine":
208 + storeLocation = 2; // SCA_CERTSYSTEMSTORE_LOCALMACHINE
209 + break;
210 + default:
211 + storeLocation = -1;
212 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreLocation", storeLocationValue, "currentUser", "localMachine"));
213 + break;
214 + }
215 + }
216 + break;
217 + case "StoreName":
218 + string storeNameValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
219 + if (0 < storeNameValue.Length)
220 + {
221 + switch (storeNameValue)
222 + {
223 + case "ca":
224 + storeName = "CA";
225 + break;
226 + case "my":
227 + case "personal":
228 + storeName = "MY";
229 + break;
230 + case "request":
231 + storeName = "REQUEST";
232 + break;
233 + case "root":
234 + storeName = "Root";
235 + break;
236 + case "otherPeople":
237 + storeName = "AddressBook";
238 + break;
239 + case "trustedPeople":
240 + storeName = "TrustedPeople";
241 + break;
242 + case "trustedPublisher":
243 + storeName = "TrustedPublisher";
244 + break;
245 + default:
246 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreName", storeNameValue, "ca", "my", "request", "root", "otherPeople", "trustedPeople", "trustedPublisher"));
247 + break;
248 + }
249 + }
250 + break;
251 + default:
252 + this.Core.UnexpectedAttribute(node, attrib);
253 + break;
254 + }
255 + }
256 + else
257 + {
258 + this.Core.ParseExtensionAttribute(node, attrib);
259 + }
260 + }
261 +
262 +
263 + if (null == id)
264 + {
265 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
266 + }
267 +
268 + if (null == name)
269 + {
270 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
271 + }
272 +
273 + if (0 == storeLocation)
274 + {
275 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreLocation"));
276 + }
277 +
278 + if (null == storeName)
279 + {
280 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreName"));
281 + }
282 +
283 + if (null != binaryKey && null != certificatePath)
284 + {
285 + this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath", certificatePath));
286 + }
287 + else if (null == binaryKey && null == certificatePath)
288 + {
289 + this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath"));
290 + }
291 +
292 + this.Core.ParseForExtensionElements(node);
293 +
294 + // Reference InstallCertificates and UninstallCertificates since nothing will happen without them
295 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "InstallCertificates");
296 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "UninstallCertificates");
297 + this.Core.EnsureTable(sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table
298 +
299 + if (!this.Core.EncounteredError)
300 + {
301 + Row row = this.Core.CreateRow(sourceLineNumbers, "Certificate");
302 + row[0] = id;
303 + row[1] = componentId;
304 + row[2] = name;
305 + row[3] = storeLocation;
306 + row[4] = storeName;
307 + row[5] = attributes;
308 + row[6] = binaryKey;
309 + row[7] = certificatePath;
310 + row[8] = pfxPassword;
311 + }
312 + }
313 +
314 + /// <summary>
315 + /// Parses a CertificateRef extension element.
316 + /// </summary>
317 + /// <param name="node">Element to parse.</param>
318 + /// <param name="webId">Identifier for parent web site.</param>
319 + private void ParseCertificateRefElement(XElement node, string webId)
320 + {
321 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
322 + string id = null;
323 +
324 + foreach (XAttribute attrib in node.Attributes())
325 + {
326 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
327 + {
328 + switch (attrib.Name.LocalName)
329 + {
330 + case "Id":
331 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
332 + this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id);
333 + break;
334 + default:
335 + this.Core.UnexpectedAttribute(node, attrib);
336 + break;
337 + }
338 + }
339 + else
340 + {
341 + this.Core.ParseExtensionAttribute(node, attrib);
342 + }
343 + }
344 +
345 + if (null == id)
346 + {
347 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
348 + }
349 +
350 + this.Core.ParseForExtensionElements(node);
351 +
352 + if (!this.Core.EncounteredError)
353 + {
354 + this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id);
355 +
356 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSiteCertificates");
357 + row[0] = webId;
358 + row[1] = id;
359 + }
360 + }
361 +
362 + /// <summary>
363 + /// Parses a mime map element.
364 + /// </summary>
365 + /// <param name="node">Element to parse.</param>
366 + /// <param name="parentId">Identifier for parent symbol.</param>
367 + /// <param name="parentType">Type that parentId refers to.</param>
368 + private void ParseMimeMapElement(XElement node, string parentId, MimeMapParentType parentType)
369 + {
370 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
371 + string id = null;
372 + string extension = null;
373 + string type = null;
374 +
375 + foreach (XAttribute attrib in node.Attributes())
376 + {
377 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
378 + {
379 + switch (attrib.Name.LocalName)
380 + {
381 + case "Id":
382 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
383 + break;
384 + case "Extension":
385 + extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
386 + break;
387 + case "Type":
388 + type = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
389 + break;
390 + default:
391 + this.Core.UnexpectedAttribute(node, attrib);
392 + break;
393 + }
394 + }
395 + else
396 + {
397 + this.Core.ParseExtensionAttribute(node, attrib);
398 + }
399 + }
400 +
401 + if (null == id)
402 + {
403 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
404 + }
405 +
406 + if (null == extension)
407 + {
408 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Extension"));
409 + }
410 + else if (0 < extension.Length)
411 + {
412 + if (!extension.StartsWith(".", StringComparison.Ordinal))
413 + {
414 + this.Core.OnMessage(IIsErrors.MimeMapExtensionMissingPeriod(sourceLineNumbers, node.Name.LocalName, "Extension", extension));
415 + }
416 + }
417 +
418 + if (null == type)
419 + {
420 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
421 + }
422 +
423 + this.Core.ParseForExtensionElements(node);
424 +
425 + if (!this.Core.EncounteredError)
426 + {
427 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsMimeMap");
428 + row[0] = id;
429 + row[1] = (int)parentType;
430 + row[2] = parentId;
431 + row[3] = type;
432 + row[4] = extension;
433 + }
434 + }
435 +
436 + /// <summary>
437 + /// Parses a recycle time element.
438 + /// </summary>
439 + /// <param name="node">Element to parse.</param>
440 + /// <returns>Recycle time value.</returns>
441 + private string ParseRecycleTimeElement(XElement node)
442 + {
443 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
444 + string value = null;
445 +
446 + foreach (XAttribute attrib in node.Attributes())
447 + {
448 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
449 + {
450 + switch (attrib.Name.LocalName)
451 + {
452 + case "Value":
453 + value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
454 + break;
455 + default:
456 + this.Core.UnexpectedAttribute(node, attrib);
457 + break;
458 + }
459 + }
460 + else
461 + {
462 + this.Core.ParseExtensionAttribute(node, attrib);
463 + }
464 + }
465 +
466 + if (null == value)
467 + {
468 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
469 + }
470 +
471 + this.Core.ParseForExtensionElements(node);
472 +
473 + return value;
474 + }
475 +
476 + /// <summary>
477 + /// Parses a web address element.
478 + /// </summary>
479 + /// <param name="node">Element to parse.</param>
480 + /// <param name="parentWeb">Identifier of parent web site.</param>
481 + /// <returns>Identifier for web address.</returns>
482 + private string ParseWebAddressElement(XElement node, string parentWeb)
483 + {
484 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
485 + string id = null;
486 + string header = null;
487 + string ip = null;
488 + string port = null;
489 + bool secure = false;
490 +
491 + foreach (XAttribute attrib in node.Attributes())
492 + {
493 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
494 + {
495 + switch (attrib.Name.LocalName)
496 + {
497 + case "Id":
498 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
499 + break;
500 + case "Header":
501 + header = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
502 + break;
503 + case "IP":
504 + ip = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
505 + break;
506 + case "Port":
507 + port = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
508 + break;
509 + case "Secure":
510 + secure = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
511 + break;
512 + default:
513 + this.Core.UnexpectedAttribute(node, attrib);
514 + break;
515 + }
516 + }
517 + else
518 + {
519 + this.Core.ParseExtensionAttribute(node, attrib);
520 + }
521 + }
522 +
523 + if (null == id)
524 + {
525 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
526 + }
527 +
528 + if (null == port)
529 + {
530 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Port"));
531 + }
532 +
533 + this.Core.ParseForExtensionElements(node);
534 +
535 + if (!this.Core.EncounteredError)
536 + {
537 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebAddress");
538 + row[0] = id;
539 + row[1] = parentWeb;
540 + row[2] = ip;
541 + row[3] = port;
542 + row[4] = header;
543 + row[5] = secure ? 1 : 0;
544 + }
545 +
546 + return id;
547 + }
548 +
549 + /// <summary>
550 + /// Parses a web application element.
551 + /// </summary>
552 + /// <param name="node">Element to parse.</param>
553 + /// <returns>Identifier for web application.</returns>
554 + private string ParseWebApplicationElement(XElement node)
555 + {
556 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
557 + string id = null;
558 + YesNoDefaultType allowSessions = YesNoDefaultType.Default;
559 + string appPool = null;
560 + YesNoDefaultType buffer = YesNoDefaultType.Default;
561 + YesNoDefaultType clientDebugging = YesNoDefaultType.Default;
562 + string defaultScript = null;
563 + int isolation = 0;
564 + string name = null;
565 + YesNoDefaultType parentPaths = YesNoDefaultType.Default;
566 + int scriptTimeout = CompilerConstants.IntegerNotSet;
567 + int sessionTimeout = CompilerConstants.IntegerNotSet;
568 + YesNoDefaultType serverDebugging = YesNoDefaultType.Default;
569 +
570 + foreach (XAttribute attrib in node.Attributes())
571 + {
572 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
573 + {
574 + switch (attrib.Name.LocalName)
575 + {
576 + case "Id":
577 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
578 + break;
579 + case "AllowSessions":
580 + allowSessions = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
581 + break;
582 + case "Buffer":
583 + buffer = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
584 + break;
585 + case "ClientDebugging":
586 + clientDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
587 + break;
588 + case "DefaultScript":
589 + defaultScript = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
590 + if (0 < defaultScript.Length)
591 + {
592 + switch (defaultScript)
593 + {
594 + case "JScript":
595 + case "VBScript":
596 + // these are valid values
597 + break;
598 + default:
599 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, defaultScript, "JScript", "VBScript"));
600 + break;
601 + }
602 + }
603 + break;
604 + case "Isolation":
605 + string isolationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
606 + if (0 < isolationValue.Length)
607 + {
608 + switch (isolationValue)
609 + {
610 + case "low":
611 + isolation = 0;
612 + break;
613 + case "medium":
614 + isolation = 2;
615 + break;
616 + case "high":
617 + isolation = 1;
618 + break;
619 + default:
620 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, isolationValue, "low", "medium", "high"));
621 + break;
622 + }
623 + }
624 + break;
625 + case "Name":
626 + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
627 + break;
628 + case "ParentPaths":
629 + parentPaths = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
630 + break;
631 + case "ScriptTimeout":
632 + scriptTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
633 + break;
634 + case "ServerDebugging":
635 + serverDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
636 + break;
637 + case "SessionTimeout":
638 + sessionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
639 + break;
640 + case "WebAppPool":
641 + appPool = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
642 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsAppPool", appPool);
643 + break;
644 + default:
645 + this.Core.UnexpectedAttribute(node, attrib);
646 + break;
647 + }
648 + }
649 + else
650 + {
651 + this.Core.ParseExtensionAttribute(node, attrib);
652 + }
653 + }
654 +
655 + if (null == id)
656 + {
657 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
658 + }
659 +
660 + if (null == name)
661 + {
662 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
663 + }
664 + else if (-1 != name.IndexOf("\\", StringComparison.Ordinal))
665 + {
666 + this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Name", name, '\\'));
667 + }
668 +
669 + foreach (XElement child in node.Elements())
670 + {
671 + if (this.Namespace == child.Name.Namespace)
672 + {
673 + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
674 + switch (child.Name.LocalName)
675 + {
676 + case "WebApplicationExtension":
677 + this.ParseWebApplicationExtensionElement(child, id);
678 + break;
679 + default:
680 + this.Core.UnexpectedElement(node, child);
681 + break;
682 + }
683 + }
684 + else
685 + {
686 + this.Core.ParseExtensionElement(node, child);
687 + }
688 + }
689 +
690 + if (!this.Core.EncounteredError)
691 + {
692 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplication");
693 + row[0] = id;
694 + row[1] = name;
695 + row[2] = isolation;
696 + if (YesNoDefaultType.Default != allowSessions)
697 + {
698 + row[3] = YesNoDefaultType.Yes == allowSessions ? 1 : 0;
699 + }
700 +
701 + if (CompilerConstants.IntegerNotSet != sessionTimeout)
702 + {
703 + row[4] = sessionTimeout;
704 + }
705 +
706 + if (YesNoDefaultType.Default != buffer)
707 + {
708 + row[5] = YesNoDefaultType.Yes == buffer ? 1 : 0;
709 + }
710 +
711 + if (YesNoDefaultType.Default != parentPaths)
712 + {
713 + row[6] = YesNoDefaultType.Yes == parentPaths ? 1 : 0;
714 + }
715 + row[7] = defaultScript;
716 + if (CompilerConstants.IntegerNotSet != scriptTimeout)
717 + {
718 + row[8] = scriptTimeout;
719 + }
720 +
721 + if (YesNoDefaultType.Default != serverDebugging)
722 + {
723 + row[9] = YesNoDefaultType.Yes == serverDebugging ? 1 : 0;
724 + }
725 +
726 + if (YesNoDefaultType.Default != clientDebugging)
727 + {
728 + row[10] = YesNoDefaultType.Yes == clientDebugging ? 1 : 0;
729 + }
730 + row[11] = appPool;
731 + }
732 +
733 + return id;
734 + }
735 +
736 + /// <summary>
737 + /// Parses a web application extension element.
738 + /// </summary>
739 + /// <param name="node">Element to parse.</param>
740 + /// <param name="application">Identifier for parent web application.</param>
741 + private void ParseWebApplicationExtensionElement(XElement node, string application)
742 + {
743 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
744 + int attributes = 0;
745 + string executable = null;
746 + string extension = null;
747 + string verbs = null;
748 +
749 + foreach (XAttribute attrib in node.Attributes())
750 + {
751 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
752 + {
753 + switch (attrib.Name.LocalName)
754 + {
755 + case "CheckPath":
756 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
757 + {
758 + attributes |= 4;
759 + }
760 + else
761 + {
762 + attributes &= ~4;
763 + }
764 + break;
765 + case "Executable":
766 + executable = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
767 + break;
768 + case "Extension":
769 + extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
770 + break;
771 + case "Script":
772 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
773 + {
774 + attributes |= 1;
775 + }
776 + else
777 + {
778 + attributes &= ~1;
779 + }
780 + break;
781 + case "Verbs":
782 + verbs = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
783 + break;
784 + default:
785 + this.Core.UnexpectedAttribute(node, attrib);
786 + break;
787 + }
788 + }
789 + else
790 + {
791 + this.Core.ParseExtensionAttribute(node, attrib);
792 + }
793 + }
794 +
795 + this.Core.ParseForExtensionElements(node);
796 +
797 + if (!this.Core.EncounteredError)
798 + {
799 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplicationExtension");
800 + row[0] = application;
801 + row[1] = extension;
802 + row[2] = verbs;
803 + row[3] = executable;
804 + if (0 < attributes)
805 + {
806 + row[4] = attributes;
807 + }
808 + }
809 + }
810 +
811 + /// <summary>
812 + /// Parses web application pool element.
813 + /// </summary>
814 + /// <param name="node">Element to parse.</param>
815 + /// <param name="componentId">Optional identifier of parent component.</param>
816 + private void ParseWebAppPoolElement(XElement node, string componentId)
817 + {
818 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
819 + string id = null;
820 + int attributes = 0;
821 + int cpuAction = CompilerConstants.IntegerNotSet;
822 + string cpuMon = null;
823 + int idleTimeout = CompilerConstants.IntegerNotSet;
824 + int maxCpuUsage = 0;
825 + int maxWorkerProcs = CompilerConstants.IntegerNotSet;
826 + string managedRuntimeVersion = null;
827 + string managedPipelineMode = null;
828 + string name = null;
829 + int privateMemory = CompilerConstants.IntegerNotSet;
830 + int queueLimit = CompilerConstants.IntegerNotSet;
831 + int recycleMinutes = CompilerConstants.IntegerNotSet;
832 + int recycleRequests = CompilerConstants.IntegerNotSet;
833 + string recycleTimes = null;
834 + int refreshCpu = CompilerConstants.IntegerNotSet;
835 + string user = null;
836 + int virtualMemory = CompilerConstants.IntegerNotSet;
837 +
838 + foreach (XAttribute attrib in node.Attributes())
839 + {
840 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
841 + {
842 + switch (attrib.Name.LocalName)
843 + {
844 + case "Id":
845 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
846 + break;
847 + case "CpuAction":
848 + if (null == componentId)
849 + {
850 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
851 + }
852 +
853 + string cpuActionValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
854 + if (0 < cpuActionValue.Length)
855 + {
856 + switch (cpuActionValue)
857 + {
858 + case "shutdown":
859 + cpuAction = 1;
860 + break;
861 + case "none":
862 + cpuAction = 0;
863 + break;
864 + default:
865 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, cpuActionValue, "shutdown", "none"));
866 + break;
867 + }
868 + }
869 + break;
870 + case "Identity":
871 + if (null == componentId)
872 + {
873 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
874 + }
875 +
876 + string identityValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
877 + if (0 < identityValue.Length)
878 + {
879 + switch (identityValue)
880 + {
881 + case "networkService":
882 + attributes |= 1;
883 + break;
884 + case "localService":
885 + attributes |= 2;
886 + break;
887 + case "localSystem":
888 + attributes |= 4;
889 + break;
890 + case "other":
891 + attributes |= 8;
892 + break;
893 + case "applicationPoolIdentity":
894 + attributes |= 0x10;
895 + break;
896 + default:
897 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, identityValue, "networkService", "localService", "localSystem", "other", "applicationPoolIdentity"));
898 + break;
899 + }
900 + }
901 + break;
902 + case "IdleTimeout":
903 + if (null == componentId)
904 + {
905 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
906 + }
907 +
908 + idleTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
909 + break;
910 + case "ManagedPipelineMode":
911 + if (null == componentId)
912 + {
913 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
914 + }
915 +
916 + managedPipelineMode = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
917 +
918 +
919 + if (!String.IsNullOrEmpty(managedPipelineMode))
920 + {
921 + switch (managedPipelineMode)
922 + {
923 + // In 3.5 we allowed lower case values (per camel case enum style), we now use formatted fields,
924 + // so the value needs to match exactly what we pass in to IIS which uses pascal case.
925 + case "classic":
926 + managedPipelineMode = "Classic";
927 + break;
928 + case "integrated":
929 + managedPipelineMode = "Integrated";
930 + break;
931 + case "Classic":
932 + break;
933 + case "Integrated":
934 + break;
935 + default:
936 + if (!this.Core.ContainsProperty(managedPipelineMode))
937 + {
938 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, managedPipelineMode, "Classic", "Integrated"));
939 + }
940 + break;
941 + }
942 + }
943 +
944 + break;
945 + case "ManagedRuntimeVersion":
946 + if (null == componentId)
947 + {
948 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
949 + }
950 +
951 + managedRuntimeVersion = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
952 + break;
953 + case "MaxCpuUsage":
954 + if (null == componentId)
955 + {
956 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
957 + }
958 +
959 + maxCpuUsage = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 100);
960 + break;
961 + case "MaxWorkerProcesses":
962 + if (null == componentId)
963 + {
964 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
965 + }
966 +
967 + maxWorkerProcs = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
968 + break;
969 + case "Name":
970 + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
971 + break;
972 + case "PrivateMemory":
973 + if (null == componentId)
974 + {
975 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
976 + }
977 +
978 + privateMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
979 + break;
980 + case "QueueLimit":
981 + if (null == componentId)
982 + {
983 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
984 + }
985 +
986 + queueLimit = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
987 + break;
988 + case "RecycleMinutes":
989 + if (null == componentId)
990 + {
991 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
992 + }
993 +
994 + recycleMinutes = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
995 + break;
996 + case "RecycleRequests":
997 + if (null == componentId)
998 + {
999 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1000 + }
1001 +
1002 + recycleRequests = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
1003 + break;
1004 + case "RefreshCpu":
1005 + if (null == componentId)
1006 + {
1007 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1008 + }
1009 +
1010 + refreshCpu = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1011 + break;
1012 + case "User":
1013 + if (null == componentId)
1014 + {
1015 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1016 + }
1017 +
1018 + user = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1019 + this.Core.CreateSimpleReference(sourceLineNumbers, "User", user);
1020 + break;
1021 + case "VirtualMemory":
1022 + if (null == componentId)
1023 + {
1024 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1025 + }
1026 +
1027 + virtualMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
1028 + break;
1029 + default:
1030 + this.Core.UnexpectedAttribute(node, attrib);
1031 + break;
1032 + }
1033 + }
1034 + else
1035 + {
1036 + this.Core.ParseExtensionAttribute(node, attrib);
1037 + }
1038 + }
1039 +
1040 + if (null == id)
1041 + {
1042 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1043 + }
1044 +
1045 + if (null == name)
1046 + {
1047 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1048 + }
1049 +
1050 + if (null == user && 8 == (attributes & 0x1F))
1051 + {
1052 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User", "Identity", "other"));
1053 + }
1054 +
1055 + if (null != user && 8 != (attributes & 0x1F))
1056 + {
1057 + this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "User", user, "Identity", "other"));
1058 + }
1059 +
1060 + cpuMon = maxCpuUsage.ToString(CultureInfo.InvariantCulture.NumberFormat);
1061 + if (CompilerConstants.IntegerNotSet != refreshCpu)
1062 + {
1063 + cpuMon = String.Concat(cpuMon, ",", refreshCpu.ToString(CultureInfo.InvariantCulture.NumberFormat));
1064 + if (CompilerConstants.IntegerNotSet != cpuAction)
1065 + {
1066 + cpuMon = String.Concat(cpuMon, ",", cpuAction.ToString(CultureInfo.InvariantCulture.NumberFormat));
1067 + }
1068 + }
1069 +
1070 + foreach (XElement child in node.Elements())
1071 + {
1072 + if (this.Namespace == child.Name.Namespace)
1073 + {
1074 + switch (child.Name.LocalName)
1075 + {
1076 + case "RecycleTime":
1077 + if (null == componentId)
1078 + {
1079 + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1080 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, node.Name.LocalName));
1081 + }
1082 +
1083 + if (null == recycleTimes)
1084 + {
1085 + recycleTimes = this.ParseRecycleTimeElement(child);
1086 + }
1087 + else
1088 + {
1089 + recycleTimes = String.Concat(recycleTimes, ",", this.ParseRecycleTimeElement(child));
1090 + }
1091 + break;
1092 + default:
1093 + this.Core.UnexpectedElement(node, child);
1094 + break;
1095 + }
1096 + }
1097 + else
1098 + {
1099 + this.Core.ParseExtensionElement(node, child);
1100 + }
1101 + }
1102 +
1103 + if (null != componentId)
1104 + {
1105 + // Reference ConfigureIIs since nothing will happen without it
1106 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1107 + }
1108 +
1109 + if (!this.Core.EncounteredError)
1110 + {
1111 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsAppPool");
1112 + row[0] = id;
1113 + row[1] = name;
1114 + row[2] = componentId;
1115 + row[3] = attributes;
1116 + row[4] = user;
1117 + if (CompilerConstants.IntegerNotSet != recycleMinutes)
1118 + {
1119 + row[5] = recycleMinutes;
1120 + }
1121 +
1122 + if (CompilerConstants.IntegerNotSet != recycleRequests)
1123 + {
1124 + row[6] = recycleRequests;
1125 + }
1126 + row[7] = recycleTimes;
1127 + if (CompilerConstants.IntegerNotSet != idleTimeout)
1128 + {
1129 + row[8] = idleTimeout;
1130 + }
1131 +
1132 + if (CompilerConstants.IntegerNotSet != queueLimit)
1133 + {
1134 + row[9] = queueLimit;
1135 + }
1136 + row[10] = cpuMon;
1137 + if (CompilerConstants.IntegerNotSet != maxWorkerProcs)
1138 + {
1139 + row[11] = maxWorkerProcs;
1140 + }
1141 +
1142 + if (CompilerConstants.IntegerNotSet != virtualMemory)
1143 + {
1144 + row[12] = virtualMemory;
1145 + }
1146 +
1147 + if (CompilerConstants.IntegerNotSet != privateMemory)
1148 + {
1149 + row[13] = privateMemory;
1150 + }
1151 + row[14] = managedRuntimeVersion;
1152 + row[15] = managedPipelineMode;
1153 + }
1154 + }
1155 +
1156 + /// <summary>
1157 + /// Parses a web directory element.
1158 + /// </summary>
1159 + /// <param name="node">Element to parse.</param>
1160 + /// <param name="componentId">Identifier for parent component.</param>
1161 + /// <param name="parentWeb">Optional identifier for parent web site.</param>
1162 + private void ParseWebDirElement(XElement node, string componentId, string parentWeb)
1163 + {
1164 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1165 + string id = null;
1166 + string dirProperties = null;
1167 + string path = null;
1168 + string application = null;
1169 +
1170 + foreach (XAttribute attrib in node.Attributes())
1171 + {
1172 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1173 + {
1174 + switch (attrib.Name.LocalName)
1175 + {
1176 + case "Id":
1177 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1178 + break;
1179 + case "DirProperties":
1180 + dirProperties = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1181 + break;
1182 + case "Path":
1183 + path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1184 + break;
1185 + case "WebApplication":
1186 + application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1187 + break;
1188 + case "WebSite":
1189 + if (null != parentWeb)
1190 + {
1191 + this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
1192 + }
1193 +
1194 + parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1195 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
1196 + break;
1197 + default:
1198 + this.Core.UnexpectedAttribute(node, attrib);
1199 + break;
1200 + }
1201 + }
1202 + else
1203 + {
1204 + this.Core.ParseExtensionAttribute(node, attrib);
1205 + }
1206 + }
1207 +
1208 + if (null == id)
1209 + {
1210 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1211 + }
1212 +
1213 + if (null == path)
1214 + {
1215 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path"));
1216 + }
1217 +
1218 + if (null == parentWeb)
1219 + {
1220 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite"));
1221 + }
1222 +
1223 + foreach (XElement child in node.Elements())
1224 + {
1225 + if (this.Namespace == child.Name.Namespace)
1226 + {
1227 + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1228 + switch (child.Name.LocalName)
1229 + {
1230 + case "WebApplication":
1231 + if (null != application)
1232 + {
1233 + this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
1234 + }
1235 +
1236 + application = this.ParseWebApplicationElement(child);
1237 + break;
1238 + case "WebDirProperties":
1239 + if (null == componentId)
1240 + {
1241 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
1242 + }
1243 +
1244 + string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
1245 + if (null == dirProperties)
1246 + {
1247 + dirProperties = childWebDirProperties;
1248 + }
1249 + else
1250 + {
1251 + this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
1252 + }
1253 + break;
1254 + default:
1255 + this.Core.UnexpectedElement(node, child);
1256 + break;
1257 + }
1258 + }
1259 + else
1260 + {
1261 + this.Core.ParseExtensionElement(node, child);
1262 + }
1263 + }
1264 +
1265 + if (null == dirProperties)
1266 + {
1267 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DirProperties"));
1268 + }
1269 +
1270 + if (null != application)
1271 + {
1272 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
1273 + }
1274 +
1275 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
1276 +
1277 + // Reference ConfigureIIs since nothing will happen without it
1278 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1279 +
1280 + if (!this.Core.EncounteredError)
1281 + {
1282 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDir");
1283 + row[0] = id;
1284 + row[1] = componentId;
1285 + row[2] = parentWeb;
1286 + row[3] = path;
1287 + row[4] = dirProperties;
1288 + row[5] = application;
1289 + }
1290 + }
1291 +
1292 + /// <summary>
1293 + /// Parses a web directory properties element.
1294 + /// </summary>
1295 + /// <param name="node">Element to parse.</param>
1296 + /// <returns>The identifier for this WebDirProperties.</returns>
1297 + private string ParseWebDirPropertiesElement(XElement node)
1298 + {
1299 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1300 + string id = null;
1301 + int access = 0;
1302 + bool accessSet = false;
1303 + int accessSSLFlags = 0;
1304 + bool accessSSLFlagsSet = false;
1305 + string anonymousUser = null;
1306 + YesNoType aspDetailedError = YesNoType.NotSet;
1307 + string authenticationProviders = null;
1308 + int authorization = 0;
1309 + bool authorizationSet = false;
1310 + string cacheControlCustom = null;
1311 + long cacheControlMaxAge = CompilerConstants.LongNotSet;
1312 + string defaultDocuments = null;
1313 + string httpExpires = null;
1314 + bool iisControlledPassword = false;
1315 + YesNoType index = YesNoType.NotSet;
1316 + YesNoType logVisits = YesNoType.NotSet;
1317 + YesNoType notCustomError = YesNoType.NotSet;
1318 +
1319 + foreach (XAttribute attrib in node.Attributes())
1320 + {
1321 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1322 + {
1323 + switch (attrib.Name.LocalName)
1324 + {
1325 + case "Id":
1326 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1327 + break;
1328 + case "AnonymousUser":
1329 + anonymousUser = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1330 + this.Core.CreateSimpleReference(sourceLineNumbers, "User", anonymousUser);
1331 + break;
1332 + case "AspDetailedError":
1333 + aspDetailedError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1334 + break;
1335 + case "AuthenticationProviders":
1336 + authenticationProviders = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1337 + break;
1338 + case "CacheControlCustom":
1339 + cacheControlCustom = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1340 + break;
1341 + case "CacheControlMaxAge":
1342 + cacheControlMaxAge = this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, uint.MaxValue); // 4294967295 (uint.MaxValue) represents unlimited
1343 + break;
1344 + case "ClearCustomError":
1345 + notCustomError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1346 + break;
1347 + case "DefaultDocuments":
1348 + defaultDocuments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1349 + break;
1350 + case "HttpExpires":
1351 + httpExpires = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1352 + break;
1353 + case "IIsControlledPassword":
1354 + iisControlledPassword = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1355 + break;
1356 + case "Index":
1357 + index = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1358 + break;
1359 + case "LogVisits":
1360 + logVisits = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1361 + break;
1362 +
1363 + // Access attributes
1364 + case "Execute":
1365 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1366 + {
1367 + access |= 4;
1368 + }
1369 + else
1370 + {
1371 + access &= ~4;
1372 + }
1373 + accessSet = true;
1374 + break;
1375 + case "Read":
1376 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1377 + {
1378 + access |= 1;
1379 + }
1380 + else
1381 + {
1382 + access &= ~1;
1383 + }
1384 + accessSet = true;
1385 + break;
1386 + case "Script":
1387 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1388 + {
1389 + access |= 512;
1390 + }
1391 + else
1392 + {
1393 + access &= ~512;
1394 + }
1395 + accessSet = true;
1396 + break;
1397 + case "Write":
1398 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1399 + {
1400 + access |= 2;
1401 + }
1402 + else
1403 + {
1404 + access &= ~2;
1405 + }
1406 + accessSet = true;
1407 + break;
1408 +
1409 + // AccessSSL Attributes
1410 + case "AccessSSL":
1411 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1412 + {
1413 + accessSSLFlags |= 8;
1414 + }
1415 + else
1416 + {
1417 + accessSSLFlags &= ~8;
1418 + }
1419 + accessSSLFlagsSet = true;
1420 + break;
1421 + case "AccessSSL128":
1422 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1423 + {
1424 + accessSSLFlags |= 256;
1425 + }
1426 + else
1427 + {
1428 + accessSSLFlags &= ~256;
1429 + }
1430 + accessSSLFlagsSet = true;
1431 + break;
1432 + case "AccessSSLMapCert":
1433 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1434 + {
1435 + accessSSLFlags |= 128;
1436 + }
1437 + else
1438 + {
1439 + accessSSLFlags &= ~128;
1440 + }
1441 + accessSSLFlagsSet = true;
1442 + break;
1443 + case "AccessSSLNegotiateCert":
1444 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1445 + {
1446 + accessSSLFlags |= 32;
1447 + }
1448 + else
1449 + {
1450 + accessSSLFlags &= ~32;
1451 + }
1452 + accessSSLFlagsSet = true;
1453 + break;
1454 + case "AccessSSLRequireCert":
1455 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1456 + {
1457 + accessSSLFlags |= 64;
1458 + }
1459 + else
1460 + {
1461 + accessSSLFlags &= ~64;
1462 + }
1463 + accessSSLFlagsSet = true;
1464 + break;
1465 +
1466 + // Authorization attributes
1467 + case "AnonymousAccess":
1468 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1469 + {
1470 + authorization |= 1;
1471 + }
1472 + else
1473 + {
1474 + authorization &= ~1;
1475 + }
1476 + authorizationSet = true;
1477 + break;
1478 + case "BasicAuthentication":
1479 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1480 + {
1481 + authorization |= 2;
1482 + }
1483 + else
1484 + {
1485 + authorization &= ~2;
1486 + }
1487 + authorizationSet = true;
1488 + break;
1489 + case "DigestAuthentication":
1490 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1491 + {
1492 + authorization |= 16;
1493 + }
1494 + else
1495 + {
1496 + authorization &= ~16;
1497 + }
1498 + authorizationSet = true;
1499 + break;
1500 + case "PassportAuthentication":
1501 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1502 + {
1503 + authorization |= 64;
1504 + }
1505 + else
1506 + {
1507 + authorization &= ~64;
1508 + }
1509 + authorizationSet = true;
1510 + break;
1511 + case "WindowsAuthentication":
1512 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1513 + {
1514 + authorization |= 4;
1515 + }
1516 + else
1517 + {
1518 + authorization &= ~4;
1519 + }
1520 + authorizationSet = true;
1521 + break;
1522 + default:
1523 + this.Core.UnexpectedAttribute(node, attrib);
1524 + break;
1525 + }
1526 + }
1527 + else
1528 + {
1529 + this.Core.ParseExtensionAttribute(node, attrib);
1530 + }
1531 + }
1532 +
1533 + if (null == id)
1534 + {
1535 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1536 + }
1537 +
1538 + this.Core.ParseForExtensionElements(node);
1539 +
1540 + if (!this.Core.EncounteredError)
1541 + {
1542 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDirProperties");
1543 + row[0] = id;
1544 + if (accessSet)
1545 + {
1546 + row[1] = access;
1547 + }
1548 +
1549 + if (authorizationSet)
1550 + {
1551 + row[2] = authorization;
1552 + }
1553 + row[3] = anonymousUser;
1554 + row[4] = iisControlledPassword ? 1 : 0;
1555 + if (YesNoType.NotSet != logVisits)
1556 + {
1557 + row[5] = YesNoType.Yes == logVisits ? 1 : 0;
1558 + }
1559 +
1560 + if (YesNoType.NotSet != index)
1561 + {
1562 + row[6] = YesNoType.Yes == index ? 1 : 0;
1563 + }
1564 + row[7] = defaultDocuments;
1565 + if (YesNoType.NotSet != aspDetailedError)
1566 + {
1567 + row[8] = YesNoType.Yes == aspDetailedError ? 1 : 0;
1568 + }
1569 + row[9] = httpExpires;
1570 + if (CompilerConstants.LongNotSet != cacheControlMaxAge)
1571 + {
1572 + row[10] = unchecked((int)cacheControlMaxAge);
1573 + }
1574 + row[11] = cacheControlCustom;
1575 + if (YesNoType.NotSet != notCustomError)
1576 + {
1577 + row[12] = YesNoType.Yes == notCustomError ? 1 : 0;
1578 + }
1579 +
1580 + if (accessSSLFlagsSet)
1581 + {
1582 + row[13] = accessSSLFlags;
1583 + }
1584 +
1585 + if (null != authenticationProviders)
1586 + {
1587 + row[14] = authenticationProviders;
1588 + }
1589 + }
1590 +
1591 + return id;
1592 + }
1593 +
1594 + /// <summary>
1595 + /// Parses a web error element.
1596 + /// </summary>
1597 + /// <param name="node">Element to parse.</param>
1598 + /// <param name="parentType">Type of the parent.</param>
1599 + /// <param name="parent">Id of the parent.</param>
1600 + private void ParseWebErrorElement(XElement node, WebErrorParentType parentType, string parent)
1601 + {
1602 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1603 + int errorCode = CompilerConstants.IntegerNotSet;
1604 + string file = null;
1605 + string url = null;
1606 + int subCode = CompilerConstants.IntegerNotSet;
1607 +
1608 + foreach (XAttribute attrib in node.Attributes())
1609 + {
1610 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1611 + {
1612 + switch (attrib.Name.LocalName)
1613 + {
1614 + case "ErrorCode":
1615 + errorCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 400, 599);
1616 + break;
1617 + case "File":
1618 + file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1619 + break;
1620 + case "SubCode":
1621 + subCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1622 + break;
1623 + case "URL":
1624 + url = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1625 + break;
1626 + default:
1627 + this.Core.UnexpectedAttribute(node, attrib);
1628 + break;
1629 + }
1630 + }
1631 + else
1632 + {
1633 + this.Core.ParseExtensionAttribute(node, attrib);
1634 + }
1635 + }
1636 +
1637 + if (CompilerConstants.IntegerNotSet == errorCode)
1638 + {
1639 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ErrorCode"));
1640 + errorCode = CompilerConstants.IllegalInteger;
1641 + }
1642 +
1643 + if (CompilerConstants.IntegerNotSet == subCode)
1644 + {
1645 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SubCode"));
1646 + subCode = CompilerConstants.IllegalInteger;
1647 + }
1648 +
1649 + if (String.IsNullOrEmpty(file) && String.IsNullOrEmpty(url))
1650 + {
1651 + this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "File", "URL"));
1652 + }
1653 +
1654 + this.Core.ParseForExtensionElements(node);
1655 +
1656 + // Reference ConfigureIIs since nothing will happen without it
1657 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1658 +
1659 + if (!this.Core.EncounteredError)
1660 + {
1661 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebError");
1662 + row[0] = errorCode;
1663 + row[1] = subCode;
1664 + row[2] = (int)parentType;
1665 + row[3] = parent;
1666 + row[4] = file;
1667 + row[5] = url;
1668 + }
1669 + }
1670 +
1671 + /// <summary>
1672 + /// Parses a web filter element.
1673 + /// </summary>
1674 + /// <param name="node">Element to parse.</param>
1675 + /// <param name="componentId">Identifier of parent component.</param>
1676 + /// <param name="parentWeb">Optional identifier of parent web site.</param>
1677 + private void ParseWebFilterElement(XElement node, string componentId, string parentWeb)
1678 + {
1679 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1680 + string id = null;
1681 + string description = null;
1682 + int flags = 0;
1683 + int loadOrder = CompilerConstants.IntegerNotSet;
1684 + string name = null;
1685 + string path = null;
1686 +
1687 + foreach (XAttribute attrib in node.Attributes())
1688 + {
1689 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1690 + {
1691 + switch (attrib.Name.LocalName)
1692 + {
1693 + case "Id":
1694 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1695 + break;
1696 + case "Description":
1697 + description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1698 + break;
1699 + case "Flags":
1700 + flags = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1701 + break;
1702 + case "LoadOrder":
1703 + string loadOrderValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1704 + if (0 < loadOrderValue.Length)
1705 + {
1706 + switch (loadOrderValue)
1707 + {
1708 + case "first":
1709 + loadOrder = 0;
1710 + break;
1711 + case "last":
1712 + loadOrder = -1;
1713 + break;
1714 + default:
1715 + loadOrder = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
1716 + break;
1717 + }
1718 + }
1719 + break;
1720 + case "Name":
1721 + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1722 + break;
1723 + case "Path":
1724 + path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1725 + break;
1726 + case "WebSite":
1727 + if (null != parentWeb)
1728 + {
1729 + this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
1730 + }
1731 +
1732 + parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1733 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
1734 + break;
1735 + default:
1736 + this.Core.UnexpectedAttribute(node, attrib);
1737 + break;
1738 + }
1739 + }
1740 + else
1741 + {
1742 + this.Core.ParseExtensionAttribute(node, attrib);
1743 + }
1744 + }
1745 +
1746 + if (null == id)
1747 + {
1748 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1749 + }
1750 +
1751 + if (null == name)
1752 + {
1753 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1754 + }
1755 +
1756 + if (null == path)
1757 + {
1758 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path"));
1759 + }
1760 +
1761 + this.Core.ParseForExtensionElements(node);
1762 +
1763 + // Reference ConfigureIIs since nothing will happen without it
1764 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1765 +
1766 + if (!this.Core.EncounteredError)
1767 + {
1768 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsFilter");
1769 + row[0] = id;
1770 + row[1] = name;
1771 + row[2] = componentId;
1772 + row[3] = path;
1773 + row[4] = parentWeb;
1774 + row[5] = description;
1775 + row[6] = flags;
1776 + if (CompilerConstants.IntegerNotSet != loadOrder)
1777 + {
1778 + row[7] = loadOrder;
1779 + }
1780 + }
1781 + }
1782 +
1783 + /// <summary>
1784 + /// Parses web log element.
1785 + /// </summary>
1786 + /// <param name="node">Node to be parsed.</param>
1787 + private void ParseWebLogElement(XElement node)
1788 + {
1789 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1790 + string id = null;
1791 + string type = null;
1792 +
1793 + foreach (XAttribute attrib in node.Attributes())
1794 + {
1795 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1796 + {
1797 + switch (attrib.Name.LocalName)
1798 + {
1799 + case "Id":
1800 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1801 + break;
1802 + case "Type":
1803 + string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1804 + if (0 < typeValue.Length)
1805 + {
1806 + switch (typeValue)
1807 + {
1808 + case "IIS":
1809 + type = "Microsoft IIS Log File Format";
1810 + break;
1811 + case "NCSA":
1812 + type = "NCSA Common Log File Format";
1813 + break;
1814 + case "none":
1815 + type = "none";
1816 + break;
1817 + case "ODBC":
1818 + type = "ODBC Logging";
1819 + break;
1820 + case "W3C":
1821 + type = "W3C Extended Log File Format";
1822 + break;
1823 + default:
1824 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "IIS", "NCSA", "none", "ODBC", "W3C"));
1825 + break;
1826 + }
1827 + }
1828 + break;
1829 + default:
1830 + this.Core.UnexpectedAttribute(node, attrib);
1831 + break;
1832 + }
1833 + }
1834 + else
1835 + {
1836 + this.Core.ParseExtensionAttribute(node, attrib);
1837 + }
1838 + }
1839 +
1840 + if (null == id)
1841 + {
1842 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1843 + }
1844 +
1845 + if (null == type)
1846 + {
1847 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
1848 + }
1849 +
1850 + this.Core.ParseForExtensionElements(node);
1851 +
1852 + if (!this.Core.EncounteredError)
1853 + {
1854 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebLog");
1855 + row[0] = id;
1856 + row[1] = type;
1857 + }
1858 + }
1859 +
1860 + /// <summary>
1861 + /// Parses a web property element.
1862 + /// </summary>
1863 + /// <param name="node">Element to parse.</param>
1864 + /// <param name="componentId">Identifier for parent component.</param>
1865 + private void ParseWebPropertyElement(XElement node, string componentId)
1866 + {
1867 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1868 + string id = null;
1869 + string value = null;
1870 +
1871 + foreach (XAttribute attrib in node.Attributes())
1872 + {
1873 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1874 + {
1875 + switch (attrib.Name.LocalName)
1876 + {
1877 + case "Id":
1878 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1879 + break;
1880 + case "Value":
1881 + value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1882 + break;
1883 + default:
1884 + this.Core.UnexpectedAttribute(node, attrib);
1885 + break;
1886 + }
1887 + }
1888 + else
1889 + {
1890 + this.Core.ParseExtensionAttribute(node, attrib);
1891 + }
1892 + }
1893 +
1894 + switch (id)
1895 + {
1896 + case "ETagChangeNumber":
1897 + case "MaxGlobalBandwidth":
1898 + // Must specify a value for these
1899 + if (null == value)
1900 + {
1901 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id));
1902 + }
1903 + break;
1904 + case "IIs5IsolationMode":
1905 + case "LogInUTF8":
1906 + // Can't specify a value for these
1907 + if (null != value)
1908 + {
1909 + this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id));
1910 + }
1911 + break;
1912 + default:
1913 + this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Id", id, "ETagChangeNumber", "IIs5IsolationMode", "LogInUTF8", "MaxGlobalBandwidth"));
1914 + break;
1915 + }
1916 +
1917 + this.Core.ParseForExtensionElements(node);
1918 +
1919 + // Reference ConfigureIIs since nothing will happen without it
1920 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1921 +
1922 + if (!this.Core.EncounteredError)
1923 + {
1924 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsProperty");
1925 + row[0] = id;
1926 + row[1] = componentId;
1927 + row[2] = 0;
1928 + row[3] = value;
1929 + }
1930 + }
1931 +
1932 + /// <summary>
1933 + /// Parses a web service extension element.
1934 + /// </summary>
1935 + /// <param name="node">Element to parse.</param>
1936 + /// <param name="componentId">Identifier for parent component.</param>
1937 + private void ParseWebServiceExtensionElement(XElement node, string componentId)
1938 + {
1939 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1940 + string id = null;
1941 + int attributes = 0;
1942 + string description = null;
1943 + string file = null;
1944 + string group = null;
1945 +
1946 + foreach (XAttribute attrib in node.Attributes())
1947 + {
1948 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1949 + {
1950 + switch (attrib.Name.LocalName)
1951 + {
1952 + case "Id":
1953 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1954 + break;
1955 + case "Allow":
1956 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1957 + {
1958 + attributes |= 1;
1959 + }
1960 + else
1961 + {
1962 + attributes &= ~1;
1963 + }
1964 + break;
1965 + case "Description":
1966 + description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1967 + break;
1968 + case "File":
1969 + file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1970 + break;
1971 + case "Group":
1972 + group = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1973 + break;
1974 + case "UIDeletable":
1975 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1976 + {
1977 + attributes |= 2;
1978 + }
1979 + else
1980 + {
1981 + attributes &= ~2;
1982 + }
1983 + break;
1984 + default:
1985 + this.Core.UnexpectedAttribute(node, attrib);
1986 + break;
1987 + }
1988 + }
1989 + else
1990 + {
1991 + this.Core.ParseExtensionAttribute(node, attrib);
1992 + }
1993 + }
1994 +
1995 + if (null == id)
1996 + {
1997 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1998 + }
1999 +
2000 + if (null == file)
2001 + {
2002 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
2003 + }
2004 +
2005 + this.Core.ParseForExtensionElements(node);
2006 +
2007 + // Reference ConfigureIIs since nothing will happen without it
2008 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2009 +
2010 + if (!this.Core.EncounteredError)
2011 + {
2012 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebServiceExtension");
2013 + row[0] = id;
2014 + row[1] = componentId;
2015 + row[2] = file;
2016 + row[3] = description;
2017 + row[4] = group;
2018 + row[5] = attributes;
2019 + }
2020 + }
2021 +
2022 + /// <summary>
2023 + /// Parses a web site element.
2024 + /// </summary>
2025 + /// <param name="node">Element to parse.</param>
2026 + /// <param name="componentId">Optional identifier of parent component.</param>
2027 + private void ParseWebSiteElement(XElement node, string componentId)
2028 + {
2029 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2030 + string id = null;
2031 + string application = null;
2032 + int attributes = 0;
2033 + int connectionTimeout = CompilerConstants.IntegerNotSet;
2034 + string description = null;
2035 + string directory = null;
2036 + string dirProperties = null;
2037 + string keyAddress = null;
2038 + string log = null;
2039 + string siteId = null;
2040 + int sequence = CompilerConstants.IntegerNotSet;
2041 + int state = CompilerConstants.IntegerNotSet;
2042 +
2043 + foreach (XAttribute attrib in node.Attributes())
2044 + {
2045 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2046 + {
2047 + switch (attrib.Name.LocalName)
2048 + {
2049 + case "Id":
2050 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2051 + break;
2052 + case "AutoStart":
2053 + if (null == componentId)
2054 + {
2055 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2056 + }
2057 +
2058 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2059 + {
2060 + state = 2;
2061 + }
2062 + else if (state != 1)
2063 + {
2064 + state = 0;
2065 + }
2066 + break;
2067 + case "ConfigureIfExists":
2068 + if (null == componentId)
2069 + {
2070 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2071 + }
2072 +
2073 + if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2074 + {
2075 + attributes &= ~2;
2076 + }
2077 + else
2078 + {
2079 + attributes |= 2;
2080 + }
2081 + break;
2082 + case "ConnectionTimeout":
2083 + connectionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2084 + break;
2085 + case "Description":
2086 + description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2087 + break;
2088 + case "Directory":
2089 + directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2090 + this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory);
2091 + break;
2092 + case "DirProperties":
2093 + if (null == componentId)
2094 + {
2095 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2096 + }
2097 +
2098 + dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2099 + break;
2100 + case "SiteId":
2101 + siteId = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2102 + if ("*" == siteId)
2103 + {
2104 + siteId = "-1";
2105 + }
2106 + break;
2107 + case "Sequence":
2108 + sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2109 + break;
2110 + case "StartOnInstall":
2111 + if (null == componentId)
2112 + {
2113 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2114 + }
2115 +
2116 + // when state is set to 2 it implies 1, so don't set it to 1
2117 + if (2 != state && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2118 + {
2119 + state = 1;
2120 + }
2121 + else if (2 != state)
2122 + {
2123 + state = 0;
2124 + }
2125 + break;
2126 + case "WebApplication":
2127 + if (null == componentId)
2128 + {
2129 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2130 + }
2131 +
2132 + application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2133 + break;
2134 + case "WebLog":
2135 + if (null == componentId)
2136 + {
2137 + this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2138 + }
2139 +
2140 + log = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2141 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebLog", log);
2142 + break;
2143 + default:
2144 + this.Core.UnexpectedAttribute(node, attrib);
2145 + break;
2146 + }
2147 + }
2148 + else
2149 + {
2150 + this.Core.ParseExtensionAttribute(node, attrib);
2151 + }
2152 + }
2153 +
2154 + if (null == id)
2155 + {
2156 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2157 + }
2158 +
2159 + if (null == description)
2160 + {
2161 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
2162 + }
2163 +
2164 + if (null == directory && null != componentId)
2165 + {
2166 + this.Core.OnMessage(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Directory"));
2167 + }
2168 +
2169 + foreach (XElement child in node.Elements())
2170 + {
2171 + if (this.Namespace == child.Name.Namespace)
2172 + {
2173 + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
2174 + switch (child.Name.LocalName)
2175 + {
2176 + case "CertificateRef":
2177 + if (null == componentId)
2178 + {
2179 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2180 + }
2181 +
2182 + this.ParseCertificateRefElement(child, id);
2183 + break;
2184 + case "HttpHeader":
2185 + if (null == componentId)
2186 + {
2187 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2188 + }
2189 +
2190 + this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebSite, id);
2191 + break;
2192 + case "WebAddress":
2193 + string address = this.ParseWebAddressElement(child, id);
2194 + if (null == keyAddress)
2195 + {
2196 + keyAddress = address;
2197 + }
2198 + break;
2199 + case "WebApplication":
2200 + if (null == componentId)
2201 + {
2202 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2203 + }
2204 +
2205 + if (null != application)
2206 + {
2207 + this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
2208 + }
2209 +
2210 + application = this.ParseWebApplicationElement(child);
2211 + break;
2212 + case "WebDir":
2213 + if (null == componentId)
2214 + {
2215 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2216 + }
2217 +
2218 + this.ParseWebDirElement(child, componentId, id);
2219 + break;
2220 + case "WebDirProperties":
2221 + if (null == componentId)
2222 + {
2223 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2224 + }
2225 +
2226 + string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
2227 + if (null == dirProperties)
2228 + {
2229 + dirProperties = childWebDirProperties;
2230 + }
2231 + else
2232 + {
2233 + this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, "WebSite", "DirProperties", child.Name.LocalName));
2234 + }
2235 + break;
2236 + case "WebError":
2237 + if (null == componentId)
2238 + {
2239 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2240 + }
2241 +
2242 + this.ParseWebErrorElement(child, WebErrorParentType.WebSite, id);
2243 + break;
2244 + case "WebFilter":
2245 + if (null == componentId)
2246 + {
2247 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2248 + }
2249 +
2250 + this.ParseWebFilterElement(child, componentId, id);
2251 + break;
2252 + case "WebVirtualDir":
2253 + if (null == componentId)
2254 + {
2255 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2256 + }
2257 +
2258 + this.ParseWebVirtualDirElement(child, componentId, id, null);
2259 + break;
2260 + case "MimeMap":
2261 + this.ParseMimeMapElement(child, id, MimeMapParentType.WebSite);
2262 + break;
2263 + default:
2264 + this.Core.UnexpectedElement(node, child);
2265 + break;
2266 + }
2267 + }
2268 + else
2269 + {
2270 + this.Core.ParseExtensionElement(node, child);
2271 + }
2272 + }
2273 +
2274 +
2275 + if (null == keyAddress)
2276 + {
2277 + this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "WebAddress"));
2278 + }
2279 +
2280 + if (null != application)
2281 + {
2282 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
2283 + }
2284 +
2285 + if (null != dirProperties)
2286 + {
2287 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2288 + }
2289 +
2290 + if (null != componentId)
2291 + {
2292 + // Reference ConfigureIIs since nothing will happen without it
2293 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2294 + }
2295 +
2296 + if (!this.Core.EncounteredError)
2297 + {
2298 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSite");
2299 + row[0] = id;
2300 + row[1] = componentId;
2301 + row[2] = description;
2302 + if (CompilerConstants.IntegerNotSet != connectionTimeout)
2303 + {
2304 + row[3] = connectionTimeout;
2305 + }
2306 + row[4] = directory;
2307 + if (CompilerConstants.IntegerNotSet != state)
2308 + {
2309 + row[5] = state;
2310 + }
2311 +
2312 + if (0 != attributes)
2313 + {
2314 + row[6] = attributes;
2315 + }
2316 + row[7] = keyAddress;
2317 + row[8] = dirProperties;
2318 + row[9] = application;
2319 + if (CompilerConstants.IntegerNotSet != sequence)
2320 + {
2321 + row[10] = sequence;
2322 + }
2323 + row[11] = log;
2324 + row[12] = siteId;
2325 + }
2326 + }
2327 +
2328 + /// <summary>
2329 + /// Parses a HTTP Header element.
2330 + /// </summary>
2331 + /// <param name="node">Element to parse.</param>
2332 + /// <param name="parentType">Type of the parent.</param>
2333 + /// <param name="parent">Id of the parent.</param>
2334 + private void ParseHttpHeaderElement(XElement node, HttpHeaderParentType parentType, string parent)
2335 + {
2336 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2337 + Identifier id = null;
2338 + string headerName = null;
2339 + string headerValue = null;
2340 +
2341 + foreach (XAttribute attrib in node.Attributes())
2342 + {
2343 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2344 + {
2345 + switch (attrib.Name.LocalName)
2346 + {
2347 + case "Id":
2348 + id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2349 + break;
2350 + case "Name":
2351 + headerName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2352 + break;
2353 + case "Value":
2354 + headerValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2355 + break;
2356 + default:
2357 + this.Core.UnexpectedAttribute(node, attrib);
2358 + break;
2359 + }
2360 + }
2361 + else
2362 + {
2363 + this.Core.ParseExtensionAttribute(node, attrib);
2364 + }
2365 + }
2366 +
2367 + if (null == headerName)
2368 + {
2369 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
2370 + }
2371 + else if (null == id)
2372 + {
2373 + id = this.Core.CreateIdentifierFromFilename(headerName);
2374 + }
2375 +
2376 + this.Core.ParseForExtensionElements(node);
2377 +
2378 + // Reference ConfigureIIs since nothing will happen without it
2379 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2380 +
2381 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsHttpHeader", id);
2382 + row[1] = (int)parentType;
2383 + row[2] = parent;
2384 + row[3] = headerName;
2385 + row[4] = headerValue;
2386 + row[5] = 0;
2387 + row[6] = null;
2388 + }
2389 +
2390 + /// <summary>
2391 + /// Parses a virtual directory element.
2392 + /// </summary>
2393 + /// <param name="node">Element to parse.</param>
2394 + /// <param name="componentId">Identifier of parent component.</param>
2395 + /// <param name="parentWeb">Identifier of parent web site.</param>
2396 + /// <param name="parentAlias">Alias of the parent web site.</param>
2397 + private void ParseWebVirtualDirElement(XElement node, string componentId, string parentWeb, string parentAlias)
2398 + {
2399 + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2400 + string id = null;
2401 + string alias = null;
2402 + string application = null;
2403 + string directory = null;
2404 + string dirProperties = null;
2405 +
2406 + foreach (XAttribute attrib in node.Attributes())
2407 + {
2408 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2409 + {
2410 + switch (attrib.Name.LocalName)
2411 + {
2412 + case "Id":
2413 + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2414 + break;
2415 + case "Alias":
2416 + alias = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2417 + break;
2418 + case "Directory":
2419 + directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2420 + this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory);
2421 + break;
2422 + case "DirProperties":
2423 + dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2424 + break;
2425 + case "WebApplication":
2426 + application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2427 + break;
2428 + case "WebSite":
2429 + if (null != parentWeb)
2430 + {
2431 + this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
2432 + }
2433 +
2434 + parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2435 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
2436 + break;
2437 + default:
2438 + this.Core.UnexpectedAttribute(node, attrib);
2439 + break;
2440 + }
2441 + }
2442 + else
2443 + {
2444 + this.Core.ParseExtensionAttribute(node, attrib);
2445 + }
2446 + }
2447 +
2448 + if (null == id)
2449 + {
2450 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2451 + }
2452 +
2453 + if (null == alias)
2454 + {
2455 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Alias"));
2456 + }
2457 + else if (-1 != alias.IndexOf("\\", StringComparison.Ordinal))
2458 + {
2459 + this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Alias", alias, '\\'));
2460 + }
2461 +
2462 + if (null == directory)
2463 + {
2464 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory"));
2465 + }
2466 +
2467 + if (null == parentWeb)
2468 + {
2469 + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite"));
2470 + }
2471 +
2472 + if (null == componentId)
2473 + {
2474 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(sourceLineNumbers, node.Name.LocalName));
2475 + }
2476 +
2477 + if (null != parentAlias)
2478 + {
2479 + alias = String.Concat(parentAlias, "/", alias);
2480 + }
2481 +
2482 + foreach (XElement child in node.Elements())
2483 + {
2484 + if (this.Namespace == child.Name.Namespace)
2485 + {
2486 + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
2487 + switch (child.Name.LocalName)
2488 + {
2489 + case "WebApplication":
2490 + if (null != application)
2491 + {
2492 + this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
2493 + }
2494 +
2495 + application = this.ParseWebApplicationElement(child);
2496 + break;
2497 + case "WebDirProperties":
2498 + if (null == componentId)
2499 + {
2500 + this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2501 + }
2502 +
2503 + string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
2504 + if (null == dirProperties)
2505 + {
2506 + dirProperties = childWebDirProperties;
2507 + }
2508 + else
2509 + {
2510 + this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
2511 + }
2512 + break;
2513 +
2514 + case "WebError":
2515 + this.ParseWebErrorElement(child, WebErrorParentType.WebVirtualDir, id);
2516 + break;
2517 + case "WebVirtualDir":
2518 + this.ParseWebVirtualDirElement(child, componentId, parentWeb, alias);
2519 + break;
2520 + case "HttpHeader":
2521 + this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebVirtualDir, id);
2522 + break;
2523 + case "MimeMap":
2524 + this.ParseMimeMapElement(child, id, MimeMapParentType.WebVirtualDir);
2525 + break;
2526 + default:
2527 + this.Core.UnexpectedElement(node, child);
2528 + break;
2529 + }
2530 + }
2531 + else
2532 + {
2533 + this.Core.ParseExtensionElement(node, child);
2534 + }
2535 + }
2536 +
2537 + if (null != dirProperties)
2538 + {
2539 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2540 + }
2541 +
2542 + if (null != application)
2543 + {
2544 + this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
2545 + }
2546 +
2547 + // Reference ConfigureIIs since nothing will happen without it
2548 + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2549 +
2550 + if (!this.Core.EncounteredError)
2551 + {
2552 + Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebVirtualDir");
2553 + row[0] = id;
2554 + row[1] = componentId;
2555 + row[2] = parentWeb;
2556 + row[3] = alias;
2557 + row[4] = directory;
2558 + row[5] = dirProperties;
2559 + row[6] = application;
2560 + }
2561 + }
2562 + }
2563 +}
src/wixext/IIsDecompiler.cs new
+1547
@@ -0,0 +1,1547 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.Extensions
4 +{
5 + using System;
6 + using System.Collections;
7 + using System.Globalization;
8 + using WixToolset.Data;
9 + using WixToolset.Extensibility;
10 + using IIs = WixToolset.Extensions.Serialize.IIs;
11 + using Wix = WixToolset.Data.Serialize;
12 +
13 + /// <summary>
14 + /// The decompiler for the WiX Toolset Internet Information Services Extension.
15 + /// </summary>
16 + public sealed class IIsDecompiler : DecompilerExtension
17 + {
18 + /// <summary>
19 + /// Creates a decompiler for IIs Extension.
20 + /// </summary>
21 + public IIsDecompiler()
22 + {
23 + this.TableDefinitions = IIsExtensionData.GetExtensionTableDefinitions();
24 + }
25 +
26 + /// <summary>
27 + /// Get the extensions library to be removed.
28 + /// </summary>
29 + /// <param name="tableDefinitions">Table definitions for library.</param>
30 + /// <returns>Library to remove from decompiled output.</returns>
31 + public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions)
32 + {
33 + return IIsExtensionData.GetExtensionLibrary(tableDefinitions);
34 + }
35 +
36 + /// <summary>
37 + /// Decompiles an extension table.
38 + /// </summary>
39 + /// <param name="table">The table to decompile.</param>
40 + public override void DecompileTable(Table table)
41 + {
42 + switch (table.Name)
43 + {
44 + case "Certificate":
45 + this.DecompileCertificateTable(table);
46 + break;
47 + case "CertificateHash":
48 + // There is nothing to do for this table, it contains no authored data
49 + // to be decompiled.
50 + break;
51 + case "IIsAppPool":
52 + this.DecompileIIsAppPoolTable(table);
53 + break;
54 + case "IIsFilter":
55 + this.DecompileIIsFilterTable(table);
56 + break;
57 + case "IIsProperty":
58 + this.DecompileIIsPropertyTable(table);
59 + break;
60 + case "IIsHttpHeader":
61 + this.DecompileIIsHttpHeaderTable(table);
62 + break;
63 + case "IIsMimeMap":
64 + this.DecompileIIsMimeMapTable(table);
65 + break;
66 + case "IIsWebAddress":
67 + this.DecompileIIsWebAddressTable(table);
68 + break;
69 + case "IIsWebApplication":
70 + this.DecompileIIsWebApplicationTable(table);
71 + break;
72 + case "IIsWebDirProperties":
73 + this.DecompileIIsWebDirPropertiesTable(table);
74 + break;
75 + case "IIsWebError":
76 + this.DecompileIIsWebErrorTable(table);
77 + break;
78 + case "IIsWebLog":
79 + this.DecompileIIsWebLogTable(table);
80 + break;
81 + case "IIsWebServiceExtension":
82 + this.DecompileIIsWebServiceExtensionTable(table);
83 + break;
84 + case "IIsWebSite":
85 + this.DecompileIIsWebSiteTable(table);
86 + break;
87 + case "IIsWebVirtualDir":
88 + this.DecompileIIsWebVirtualDirTable(table);
89 + break;
90 + case "IIsWebSiteCertificates":
91 + this.DecompileIIsWebSiteCertificatesTable(table);
92 + break;
93 + default:
94 + base.DecompileTable(table);
95 + break;
96 + }
97 + }
98 +
99 + /// <summary>
100 + /// Finalize decompilation.
101 + /// </summary>
102 + /// <param name="tables">The collection of all tables.</param>
103 + public override void Finish(TableIndexedCollection tables)
104 + {
105 + this.FinalizeIIsMimeMapTable(tables);
106 + this.FinalizeIIsHttpHeaderTable(tables);
107 + this.FinalizeIIsWebApplicationTable(tables);
108 + this.FinalizeIIsWebErrorTable(tables);
109 + this.FinalizeIIsWebVirtualDirTable(tables);
110 + this.FinalizeIIsWebSiteCertificatesTable(tables);
111 + this.FinalizeWebAddressTable(tables);
112 + }
113 +
114 + /// <summary>
115 + /// Decompile the Certificate table.
116 + /// </summary>
117 + /// <param name="table">The table to decompile.</param>
118 + private void DecompileCertificateTable(Table table)
119 + {
120 + foreach (Row row in table.Rows)
121 + {
122 + IIs.Certificate certificate = new IIs.Certificate();
123 +
124 + certificate.Id = (string)row[0];
125 + certificate.Name = (string)row[2];
126 +
127 + switch ((int)row[3])
128 + {
129 + case 1:
130 + certificate.StoreLocation = IIs.Certificate.StoreLocationType.currentUser;
131 + break;
132 + case 2:
133 + certificate.StoreLocation = IIs.Certificate.StoreLocationType.localMachine;
134 + break;
135 + default:
136 + // TODO: warn
137 + break;
138 + }
139 +
140 + switch ((string)row[4])
141 + {
142 + case "CA":
143 + certificate.StoreName = IIs.Certificate.StoreNameType.ca;
144 + break;
145 + case "MY":
146 + certificate.StoreName = IIs.Certificate.StoreNameType.my;
147 + break;
148 + case "REQUEST":
149 + certificate.StoreName = IIs.Certificate.StoreNameType.request;
150 + break;
151 + case "Root":
152 + certificate.StoreName = IIs.Certificate.StoreNameType.root;
153 + break;
154 + case "AddressBook":
155 + certificate.StoreName = IIs.Certificate.StoreNameType.otherPeople;
156 + break;
157 + case "TrustedPeople":
158 + certificate.StoreName = IIs.Certificate.StoreNameType.trustedPeople;
159 + break;
160 + case "TrustedPublisher":
161 + certificate.StoreName = IIs.Certificate.StoreNameType.trustedPublisher;
162 + break;
163 + default:
164 + // TODO: warn
165 + break;
166 + }
167 +
168 + int attribute = (int)row[5];
169 +
170 + if (0x1 == (attribute & 0x1))
171 + {
172 + certificate.Request = IIs.YesNoType.yes;
173 + }
174 +
175 + if (0x2 == (attribute & 0x2))
176 + {
177 + if (null != row[6])
178 + {
179 + certificate.BinaryKey = (string)row[6];
180 + }
181 + else
182 + {
183 + // TODO: warn about expected value in row 5
184 + }
185 + }
186 + else if (null != row[7])
187 + {
188 + certificate.CertificatePath = (string)row[7];
189 + }
190 +
191 + if (0x4 == (attribute & 0x4))
192 + {
193 + certificate.Overwrite = IIs.YesNoType.yes;
194 + }
195 +
196 + if (null != row[8])
197 + {
198 + certificate.PFXPassword = (string)row[8];
199 + }
200 +
201 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
202 + if (null != component)
203 + {
204 + component.AddChild(certificate);
205 + }
206 + else
207 + {
208 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
209 + }
210 + }
211 + }
212 +
213 + /// <summary>
214 + /// Decompile the IIsAppPool table.
215 + /// </summary>
216 + /// <param name="table">The table to decompile.</param>
217 + private void DecompileIIsAppPoolTable(Table table)
218 + {
219 + foreach (Row row in table.Rows)
220 + {
221 + IIs.WebAppPool webAppPool = new IIs.WebAppPool();
222 +
223 + webAppPool.Id = (string)row[0];
224 +
225 + webAppPool.Name = (string)row[1];
226 +
227 + switch ((int)row[3] & 0x1F)
228 + {
229 + case 1:
230 + webAppPool.Identity = IIs.WebAppPool.IdentityType.networkService;
231 + break;
232 + case 2:
233 + webAppPool.Identity = IIs.WebAppPool.IdentityType.localService;
234 + break;
235 + case 4:
236 + webAppPool.Identity = IIs.WebAppPool.IdentityType.localSystem;
237 + break;
238 + case 8:
239 + webAppPool.Identity = IIs.WebAppPool.IdentityType.other;
240 + break;
241 + case 0x10:
242 + webAppPool.Identity = IIs.WebAppPool.IdentityType.applicationPoolIdentity;
243 + break;
244 + default:
245 + // TODO: warn
246 + break;
247 + }
248 +
249 + if (null != row[4])
250 + {
251 + webAppPool.User = (string)row[4];
252 + }
253 +
254 + if (null != row[5])
255 + {
256 + webAppPool.RecycleMinutes = (int)row[5];
257 + }
258 +
259 + if (null != row[6])
260 + {
261 + webAppPool.RecycleRequests = (int)row[6];
262 + }
263 +
264 + if (null != row[7])
265 + {
266 + string[] recycleTimeValues = ((string)row[7]).Split(',');
267 +
268 + foreach (string recycleTimeValue in recycleTimeValues)
269 + {
270 + IIs.RecycleTime recycleTime = new IIs.RecycleTime();
271 +
272 + recycleTime.Value = recycleTimeValue;
273 +
274 + webAppPool.AddChild(recycleTime);
275 + }
276 + }
277 +
278 + if (null != row[8])
279 + {
280 + webAppPool.IdleTimeout = (int)row[8];
281 + }
282 +
283 + if (null != row[9])
284 + {
285 + webAppPool.QueueLimit = (int)row[9];
286 + }
287 +
288 + if (null != row[10])
289 + {
290 + string[] cpuMon = ((string)row[10]).Split(',');
291 +
292 + if (0 < cpuMon.Length && "0" != cpuMon[0])
293 + {
294 + webAppPool.MaxCpuUsage = Convert.ToInt32(cpuMon[0], CultureInfo.InvariantCulture);
295 + }
296 +
297 + if (1 < cpuMon.Length)
298 + {
299 + webAppPool.RefreshCpu = Convert.ToInt32(cpuMon[1], CultureInfo.InvariantCulture);
300 + }
301 +
302 + if (2 < cpuMon.Length)
303 + {
304 + switch (Convert.ToInt32(cpuMon[2], CultureInfo.InvariantCulture))
305 + {
306 + case 0:
307 + webAppPool.CpuAction = IIs.WebAppPool.CpuActionType.none;
308 + break;
309 + case 1:
310 + webAppPool.CpuAction = IIs.WebAppPool.CpuActionType.shutdown;
311 + break;
312 + default:
313 + // TODO: warn
314 + break;
315 + }
316 + }
317 +
318 + if (3 < cpuMon.Length)
319 + {
320 + // TODO: warn
321 + }
322 + }
323 +
324 + if (null != row[11])
325 + {
326 + webAppPool.MaxWorkerProcesses = (int)row[11];
327 + }
328 +
329 + if (null != row[12])
330 + {
331 + webAppPool.VirtualMemory = (int)row[12];
332 + }
333 +
334 + if (null != row[13])
335 + {
336 + webAppPool.PrivateMemory = (int)row[13];
337 + }
338 +
339 + if (null != row[14])
340 + {
341 + webAppPool.ManagedRuntimeVersion = (string)row[14];
342 + }
343 +
344 + if (null != row[15])
345 + {
346 + webAppPool.ManagedPipelineMode = (string)row[15];
347 + }
348 +
349 + if (null != row[2])
350 + {
351 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]);
352 +
353 + if (null != component)
354 + {
355 + component.AddChild(webAppPool);
356 + }
357 + else
358 + {
359 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component"));
360 + }
361 + }
362 + else
363 + {
364 + this.Core.RootElement.AddChild(webAppPool);
365 + }
366 + }
367 + }
368 +
369 + /// <summary>
370 + /// Decompile the IIsProperty table.
371 + /// </summary>
372 + /// <param name="table">The table to decompile.</param>
373 + private void DecompileIIsPropertyTable(Table table)
374 + {
375 + foreach (Row row in table.Rows)
376 + {
377 + IIs.WebProperty webProperty = new IIs.WebProperty();
378 +
379 + switch ((string)row[0])
380 + {
381 + case "ETagChangeNumber":
382 + webProperty.Id = IIs.WebProperty.IdType.ETagChangeNumber;
383 + break;
384 + case "IIs5IsolationMode":
385 + webProperty.Id = IIs.WebProperty.IdType.IIs5IsolationMode;
386 + break;
387 + case "LogInUTF8":
388 + webProperty.Id = IIs.WebProperty.IdType.LogInUTF8;
389 + break;
390 + case "MaxGlobalBandwidth":
391 + webProperty.Id = IIs.WebProperty.IdType.MaxGlobalBandwidth;
392 + break;
393 + }
394 +
395 + if (0 != (int)row[2])
396 + {
397 + // TODO: warn about value in unused column
398 + }
399 +
400 + if (null != row[3])
401 + {
402 + webProperty.Value = (string)row[3];
403 + }
404 +
405 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
406 + if (null != component)
407 + {
408 + component.AddChild(webProperty);
409 + }
410 + else
411 + {
412 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
413 + }
414 + }
415 + }
416 +
417 + /// <summary>
418 + /// Decompile the IIsHttpHeader table.
419 + /// </summary>
420 + /// <param name="table">The table to decompile.</param>
421 + private void DecompileIIsHttpHeaderTable(Table table)
422 + {
423 + foreach (Row row in table.Rows)
424 + {
425 + IIs.HttpHeader httpHeader = new IIs.HttpHeader();
426 +
427 + httpHeader.Name = (string)row[3];
428 +
429 + // the ParentType and Parent columns are handled in FinalizeIIsHttpHeaderTable
430 +
431 + httpHeader.Value = (string)row[4];
432 +
433 + this.Core.IndexElement(row, httpHeader);
434 + }
435 + }
436 +
437 + /// <summary>
438 + /// Decompile the IIsMimeMap table.
439 + /// </summary>
440 + /// <param name="table">The table to decompile.</param>
441 + private void DecompileIIsMimeMapTable(Table table)
442 + {
443 + foreach (Row row in table.Rows)
444 + {
445 + IIs.MimeMap mimeMap = new IIs.MimeMap();
446 +
447 + mimeMap.Id = (string)row[0];
448 +
449 + // the ParentType and ParentValue columns are handled in FinalizeIIsMimeMapTable
450 +
451 + mimeMap.Type = (string)row[3];
452 +
453 + mimeMap.Extension = (string)row[4];
454 +
455 + this.Core.IndexElement(row, mimeMap);
456 + }
457 + }
458 +
459 + /// <summary>
460 + /// Decompile the IIsWebAddress table.
461 + /// </summary>
462 + /// <param name="table">The table to decompile.</param>
463 + private void DecompileIIsWebAddressTable(Table table)
464 + {
465 + foreach (Row row in table.Rows)
466 + {
467 + IIs.WebAddress webAddress = new IIs.WebAddress();
468 +
469 + webAddress.Id = (string)row[0];
470 +
471 + if (null != row[2])
472 + {
473 + webAddress.IP = (string)row[2];
474 + }
475 +
476 + webAddress.Port = (string)row[3];
477 +
478 + if (null != row[4])
479 + {
480 + webAddress.Header = (string)row[4];
481 + }
482 +
483 + if (null != row[5] && 1 == (int)row[5])
484 + {
485 + webAddress.Secure = IIs.YesNoType.yes;
486 + }
487 +
488 + this.Core.IndexElement(row, webAddress);
489 + }
490 + }
491 +
492 + /// <summary>
493 + /// Decompile the IIsWebApplication table.
494 + /// </summary>
495 + /// <param name="table">The table to decompile.</param>
496 + private void DecompileIIsWebApplicationTable(Table table)
497 + {
498 + foreach (Row row in table.Rows)
499 + {
500 + IIs.WebApplication webApplication = new IIs.WebApplication();
501 +
502 + webApplication.Id = (string)row[0];
503 +
504 + webApplication.Name = (string)row[1];
505 +
506 + // these are not listed incorrectly - the order is low, high, medium
507 + switch ((int)row[2])
508 + {
509 + case 0:
510 + webApplication.Isolation = IIs.WebApplication.IsolationType.low;
511 + break;
512 + case 1:
513 + webApplication.Isolation = IIs.WebApplication.IsolationType.high;
514 + break;
515 + case 2:
516 + webApplication.Isolation = IIs.WebApplication.IsolationType.medium;
517 + break;
518 + default:
519 + // TODO: warn
520 + break;
521 + }
522 +
523 + if (null != row[3])
524 + {
525 + switch ((int)row[3])
526 + {
527 + case 0:
528 + webApplication.AllowSessions = IIs.YesNoDefaultType.no;
529 + break;
530 + case 1:
531 + webApplication.AllowSessions = IIs.YesNoDefaultType.yes;
532 + break;
533 + default:
534 + // TODO: warn
535 + break;
536 + }
537 + }
538 +
539 + if (null != row[4])
540 + {
541 + webApplication.SessionTimeout = (int)row[4];
542 + }
543 +
544 + if (null != row[5])
545 + {
546 + switch ((int)row[5])
547 + {
548 + case 0:
549 + webApplication.Buffer = IIs.YesNoDefaultType.no;
550 + break;
551 + case 1:
552 + webApplication.Buffer = IIs.YesNoDefaultType.yes;
553 + break;
554 + default:
555 + // TODO: warn
556 + break;
557 + }
558 + }
559 +
560 + if (null != row[6])
561 + {
562 + switch ((int)row[6])
563 + {
564 + case 0:
565 + webApplication.ParentPaths = IIs.YesNoDefaultType.no;
566 + break;
567 + case 1:
568 + webApplication.ParentPaths = IIs.YesNoDefaultType.yes;
569 + break;
570 + default:
571 + // TODO: warn
572 + break;
573 + }
574 + }
575 +
576 + if (null != row[7])
577 + {
578 + switch ((string)row[7])
579 + {
580 + case "JScript":
581 + webApplication.DefaultScript = IIs.WebApplication.DefaultScriptType.JScript;
582 + break;
583 + case "VBScript":
584 + webApplication.DefaultScript = IIs.WebApplication.DefaultScriptType.VBScript;
585 + break;
586 + default:
587 + // TODO: warn
588 + break;
589 + }
590 + }
591 +
592 + if (null != row[8])
593 + {
594 + webApplication.ScriptTimeout = (int)row[8];
595 + }
596 +
597 + if (null != row[9])
598 + {
599 + switch ((int)row[9])
600 + {
601 + case 0:
602 + webApplication.ServerDebugging = IIs.YesNoDefaultType.no;
603 + break;
604 + case 1:
605 + webApplication.ServerDebugging = IIs.YesNoDefaultType.yes;
606 + break;
607 + default:
608 + // TODO: warn
609 + break;
610 + }
611 + }
612 +
613 + if (null != row[10])
614 + {
615 + switch ((int)row[10])
616 + {
617 + case 0:
618 + webApplication.ClientDebugging = IIs.YesNoDefaultType.no;
619 + break;
620 + case 1:
621 + webApplication.ClientDebugging = IIs.YesNoDefaultType.yes;
622 + break;
623 + default:
624 + // TODO: warn
625 + break;
626 + }
627 + }
628 +
629 + if (null != row[11])
630 + {
631 + webApplication.WebAppPool = (string)row[11];
632 + }
633 +
634 + this.Core.IndexElement(row, webApplication);
635 + }
636 + }
637 +
638 + /// <summary>
639 + /// Decompile the IIsWebDirProperties table.
640 + /// </summary>
641 + /// <param name="table">The table to decompile.</param>
642 + private void DecompileIIsWebDirPropertiesTable(Table table)
643 + {
644 + foreach (Row row in table.Rows)
645 + {
646 + IIs.WebDirProperties webDirProperties = new IIs.WebDirProperties();
647 +
648 + webDirProperties.Id = (string)row[0];
649 +
650 + if (null != row[1])
651 + {
652 + int access = (int)row[1];
653 +
654 + if (0x1 == (access & 0x1))
655 + {
656 + webDirProperties.Read = IIs.YesNoType.yes;
657 + }
658 +
659 + if (0x2 == (access & 0x2))
660 + {
661 + webDirProperties.Write = IIs.YesNoType.yes;
662 + }
663 +
664 + if (0x4 == (access & 0x4))
665 + {
666 + webDirProperties.Execute = IIs.YesNoType.yes;
667 + }
668 +
669 + if (0x200 == (access & 0x200))
670 + {
671 + webDirProperties.Script = IIs.YesNoType.yes;
672 + }
673 + }
674 +
675 + if (null != row[2])
676 + {
677 + int authorization = (int)row[2];
678 +
679 + if (0x1 == (authorization & 0x1))
680 + {
681 + webDirProperties.AnonymousAccess = IIs.YesNoType.yes;
682 + }
683 + else // set one of the properties to 'no' to force the output value to be '0' if not other attributes are set
684 + {
685 + webDirProperties.AnonymousAccess = IIs.YesNoType.no;
686 + }
687 +
688 + if (0x2 == (authorization & 0x2))
689 + {
690 + webDirProperties.BasicAuthentication = IIs.YesNoType.yes;
691 + }
692 +
693 + if (0x4 == (authorization & 0x4))
694 + {
695 + webDirProperties.WindowsAuthentication = IIs.YesNoType.yes;
696 + }
697 +
698 + if (0x10 == (authorization & 0x10))
699 + {
700 + webDirProperties.DigestAuthentication = IIs.YesNoType.yes;
701 + }
702 +
703 + if (0x40 == (authorization & 0x40))
704 + {
705 + webDirProperties.PassportAuthentication = IIs.YesNoType.yes;
706 + }
707 + }
708 +
709 + if (null != row[3])
710 + {
711 + webDirProperties.AnonymousUser = (string)row[3];
712 + }
713 +
714 + if (null != row[4] && 1 == (int)row[4])
715 + {
716 + webDirProperties.IIsControlledPassword = IIs.YesNoType.yes;
717 + }
718 +
719 + if (null != row[5])
720 + {
721 + switch ((int)row[5])
722 + {
723 + case 0:
724 + webDirProperties.LogVisits = IIs.YesNoType.no;
725 + break;
726 + case 1:
727 + webDirProperties.LogVisits = IIs.YesNoType.yes;
728 + break;
729 + default:
730 + // TODO: warn
731 + break;
732 + }
733 + }
734 +
735 + if (null != row[6])
736 + {
737 + switch ((int)row[6])
738 + {
739 + case 0:
740 + webDirProperties.Index = IIs.YesNoType.no;
741 + break;
742 + case 1:
743 + webDirProperties.Index = IIs.YesNoType.yes;
744 + break;
745 + default:
746 + // TODO: warn
747 + break;
748 + }
749 + }
750 +
751 + if (null != row[7])
752 + {
753 + webDirProperties.DefaultDocuments = (string)row[7];
754 + }
755 +
756 + if (null != row[8])
757 + {
758 + switch ((int)row[8])
759 + {
760 + case 0:
761 + webDirProperties.AspDetailedError = IIs.YesNoType.no;
762 + break;
763 + case 1:
764 + webDirProperties.AspDetailedError = IIs.YesNoType.yes;
765 + break;
766 + default:
767 + // TODO: warn
768 + break;
769 + }
770 + }
771 +
772 + if (null != row[9])
773 + {
774 + webDirProperties.HttpExpires = (string)row[9];
775 + }
776 +
777 + if (null != row[10])
778 + {
779 + // force the value to be a positive number
780 + webDirProperties.CacheControlMaxAge = unchecked((uint)(int)row[10]);
781 + }
782 +
783 + if (null != row[11])
784 + {
785 + webDirProperties.CacheControlCustom = (string)row[11];
786 + }
787 +
788 + if (null != row[12])
789 + {
790 + switch ((int)row[8])
791 + {
792 + case 0:
793 + webDirProperties.ClearCustomError = IIs.YesNoType.no;
794 + break;
795 + case 1:
796 + webDirProperties.ClearCustomError = IIs.YesNoType.yes;
797 + break;
798 + default:
799 + // TODO: warn
800 + break;
801 + }
802 + }
803 +
804 + if (null != row[13])
805 + {
806 + int accessSSLFlags = (int)row[13];
807 +
808 + if (0x8 == (accessSSLFlags & 0x8))
809 + {
810 + webDirProperties.AccessSSL = IIs.YesNoType.yes;
811 + }
812 +
813 + if (0x20 == (accessSSLFlags & 0x20))
814 + {
815 + webDirProperties.AccessSSLNegotiateCert = IIs.YesNoType.yes;
816 + }
817 +
818 + if (0x40 == (accessSSLFlags & 0x40))
819 + {
820 + webDirProperties.AccessSSLRequireCert = IIs.YesNoType.yes;
821 + }
822 +
823 + if (0x80 == (accessSSLFlags & 0x80))
824 + {
825 + webDirProperties.AccessSSLMapCert = IIs.YesNoType.yes;
826 + }
827 +
828 + if (0x100 == (accessSSLFlags & 0x100))
829 + {
830 + webDirProperties.AccessSSL128 = IIs.YesNoType.yes;
831 + }
832 + }
833 +
834 + if (null != row[14])
835 + {
836 + webDirProperties.AuthenticationProviders = (string)row[14];
837 + }
838 +
839 + this.Core.RootElement.AddChild(webDirProperties);
840 + }
841 + }
842 +
843 + /// <summary>
844 + /// Decompile the IIsWebError table.
845 + /// </summary>
846 + /// <param name="table">The table to decompile.</param>
847 + private void DecompileIIsWebErrorTable(Table table)
848 + {
849 + foreach (Row row in table.Rows)
850 + {
851 + IIs.WebError webError = new IIs.WebError();
852 +
853 + webError.ErrorCode = (int)row[0];
854 +
855 + webError.SubCode = (int)row[1];
856 +
857 + // the ParentType and ParentValue columns are handled in FinalizeIIsWebErrorTable
858 +
859 + if (null != row[4])
860 + {
861 + webError.File = (string)row[4];
862 + }
863 +
864 + if (null != row[5])
865 + {
866 + webError.URL = (string)row[5];
867 + }
868 +
869 + this.Core.IndexElement(row, webError);
870 + }
871 + }
872 +
873 + /// <summary>
874 + /// Decompile the IIsFilter table.
875 + /// </summary>
876 + /// <param name="table">The table to decompile.</param>
877 + private void DecompileIIsFilterTable(Table table)
878 + {
879 + foreach (Row row in table.Rows)
880 + {
881 + IIs.WebFilter webFilter = new IIs.WebFilter();
882 +
883 + webFilter.Id = (string)row[0];
884 +
885 + webFilter.Name = (string)row[1];
886 +
887 + if (null != row[3])
888 + {
889 + webFilter.Path = (string)row[3];
890 + }
891 +
892 + if (null != row[5])
893 + {
894 + webFilter.Description = (string)row[5];
895 + }
896 +
897 + webFilter.Flags = (int)row[6];
898 +
899 + if (null != row[7])
900 + {
901 + switch ((int)row[7])
902 + {
903 + case (-1):
904 + webFilter.LoadOrder = "last";
905 + break;
906 + case 0:
907 + webFilter.LoadOrder = "first";
908 + break;
909 + default:
910 + webFilter.LoadOrder = Convert.ToString((int)row[7], CultureInfo.InvariantCulture);
911 + break;
912 + }
913 + }
914 +
915 + if (null != row[4])
916 + {
917 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[4]);
918 +
919 + if (null != webSite)
920 + {
921 + webSite.AddChild(webFilter);
922 + }
923 + else
924 + {
925 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Web_", (string)row[4], "IIsWebSite"));
926 + }
927 + }
928 + else // Component parent
929 + {
930 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]);
931 +
932 + if (null != component)
933 + {
934 + component.AddChild(webFilter);
935 + }
936 + else
937 + {
938 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component"));
939 + }
940 + }
941 + }
942 + }
943 +
944 + /// <summary>
945 + /// Decompile the IIsWebLog table.
946 + /// </summary>
947 + /// <param name="table">The table to decompile.</param>
948 + private void DecompileIIsWebLogTable(Table table)
949 + {
950 + foreach (Row row in table.Rows)
951 + {
952 + IIs.WebLog webLog = new IIs.WebLog();
953 +
954 + webLog.Id = (string)row[0];
955 +
956 + switch ((string)row[1])
957 + {
958 + case "Microsoft IIS Log File Format":
959 + webLog.Type = IIs.WebLog.TypeType.IIS;
960 + break;
961 + case "NCSA Common Log File Format":
962 + webLog.Type = IIs.WebLog.TypeType.NCSA;
963 + break;
964 + case "none":
965 + webLog.Type = IIs.WebLog.TypeType.none;
966 + break;
967 + case "ODBC Logging":
968 + webLog.Type = IIs.WebLog.TypeType.ODBC;
969 + break;
970 + case "W3C Extended Log File Format":
971 + webLog.Type = IIs.WebLog.TypeType.W3C;
972 + break;
973 + default:
974 + // TODO: warn
975 + break;
976 + }
977 +
978 + this.Core.RootElement.AddChild(webLog);
979 + }
980 + }
981 +
982 + /// <summary>
983 + /// Decompile the IIsWebServiceExtension table.
984 + /// </summary>
985 + /// <param name="table">The table to decompile.</param>
986 + private void DecompileIIsWebServiceExtensionTable(Table table)
987 + {
988 + foreach (Row row in table.Rows)
989 + {
990 + IIs.WebServiceExtension webServiceExtension = new IIs.WebServiceExtension();
991 +
992 + webServiceExtension.Id = (string)row[0];
993 +
994 + webServiceExtension.File = (string)row[2];
995 +
996 + if (null != row[3])
997 + {
998 + webServiceExtension.Description = (string)row[3];
999 + }
1000 +
1001 + if (null != row[4])
1002 + {
1003 + webServiceExtension.Group = (string)row[4];
1004 + }
1005 +
1006 + int attributes = (int)row[5];
1007 +
1008 + if (0x1 == (attributes & 0x1))
1009 + {
1010 + webServiceExtension.Allow = IIs.YesNoType.yes;
1011 + }
1012 + else
1013 + {
1014 + webServiceExtension.Allow = IIs.YesNoType.no;
1015 + }
1016 +
1017 + if (0x2 == (attributes & 0x2))
1018 + {
1019 + webServiceExtension.UIDeletable = IIs.YesNoType.yes;
1020 + }
1021 +
1022 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
1023 + if (null != component)
1024 + {
1025 + component.AddChild(webServiceExtension);
1026 + }
1027 + else
1028 + {
1029 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
1030 + }
1031 + }
1032 + }
1033 +
1034 + /// <summary>
1035 + /// Decompile the IIsWebSite table.
1036 + /// </summary>
1037 + /// <param name="table">The table to decompile.</param>
1038 + private void DecompileIIsWebSiteTable(Table table)
1039 + {
1040 + foreach (Row row in table.Rows)
1041 + {
1042 + IIs.WebSite webSite = new IIs.WebSite();
1043 +
1044 + webSite.Id = (string)row[0];
1045 +
1046 + if (null != row[2])
1047 + {
1048 + webSite.Description = (string)row[2];
1049 + }
1050 +
1051 + if (null != row[3])
1052 + {
1053 + webSite.ConnectionTimeout = (int)row[3];
1054 + }
1055 +
1056 + if (null != row[4])
1057 + {
1058 + webSite.Directory = (string)row[4];
1059 + }
1060 +
1061 + if (null != row[5])
1062 + {
1063 + switch ((int)row[5])
1064 + {
1065 + case 0:
1066 + // this is the default
1067 + break;
1068 + case 1:
1069 + webSite.StartOnInstall = IIs.YesNoType.yes;
1070 + break;
1071 + case 2:
1072 + webSite.AutoStart = IIs.YesNoType.yes;
1073 + break;
1074 + default:
1075 + // TODO: warn
1076 + break;
1077 + }
1078 + }
1079 +
1080 + if (null != row[6])
1081 + {
1082 + int attributes = (int)row[6];
1083 +
1084 + if (0x2 == (attributes & 0x2))
1085 + {
1086 + webSite.ConfigureIfExists = IIs.YesNoType.no;
1087 + }
1088 + }
1089 +
1090 + // the KeyAddress_ column is handled in FinalizeWebAddressTable
1091 +
1092 + if (null != row[8])
1093 + {
1094 + webSite.DirProperties = (string)row[8];
1095 + }
1096 +
1097 + // the Application_ column is handled in FinalizeIIsWebApplicationTable
1098 +
1099 + if (null != row[10])
1100 + {
1101 + if (-1 != (int)row[10])
1102 + {
1103 + webSite.Sequence = (int)row[10];
1104 + }
1105 + }
1106 +
1107 + if (null != row[11])
1108 + {
1109 + webSite.WebLog = (string)row[11];
1110 + }
1111 +
1112 + if (null != row[12])
1113 + {
1114 + webSite.SiteId = (string)row[12];
1115 + }
1116 +
1117 + if (null != row[1])
1118 + {
1119 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
1120 +
1121 + if (null != component)
1122 + {
1123 + component.AddChild(webSite);
1124 + }
1125 + else
1126 + {
1127 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
1128 + }
1129 + }
1130 + else
1131 + {
1132 + this.Core.RootElement.AddChild(webSite);
1133 + }
1134 + this.Core.IndexElement(row, webSite);
1135 + }
1136 + }
1137 +
1138 + /// <summary>
1139 + /// Decompile the IIsWebVirtualDir table.
1140 + /// </summary>
1141 + /// <param name="table">The table to decompile.</param>
1142 + private void DecompileIIsWebVirtualDirTable(Table table)
1143 + {
1144 + foreach (Row row in table.Rows)
1145 + {
1146 + IIs.WebVirtualDir webVirtualDir = new IIs.WebVirtualDir();
1147 +
1148 + webVirtualDir.Id = (string)row[0];
1149 +
1150 + // the Component_ and Web_ columns are handled in FinalizeIIsWebVirtualDirTable
1151 +
1152 + webVirtualDir.Alias = (string)row[3];
1153 +
1154 + webVirtualDir.Directory = (string)row[4];
1155 +
1156 + if (null != row[5])
1157 + {
1158 + webVirtualDir.DirProperties = (string)row[5];
1159 + }
1160 +
1161 + // the Application_ column is handled in FinalizeIIsWebApplicationTable
1162 +
1163 + this.Core.IndexElement(row, webVirtualDir);
1164 + }
1165 + }
1166 +
1167 + /// <summary>
1168 + /// Decompile the IIsWebSiteCertificates table.
1169 + /// </summary>
1170 + /// <param name="table">The table to decompile.</param>
1171 + private void DecompileIIsWebSiteCertificatesTable(Table table)
1172 + {
1173 + foreach (Row row in table.Rows)
1174 + {
1175 + IIs.CertificateRef certificateRef = new IIs.CertificateRef();
1176 +
1177 + certificateRef.Id = (string)row[1];
1178 +
1179 + this.Core.IndexElement(row, certificateRef);
1180 + }
1181 + }
1182 +
1183 + /// <summary>
1184 + /// Finalize the IIsHttpHeader table.
1185 + /// </summary>
1186 + /// <param name="tables">The collection of all tables.</param>
1187 + /// <remarks>
1188 + /// The IIsHttpHeader table supports multiple parent types so no foreign key
1189 + /// is declared and thus nesting must be done late.
1190 + /// </remarks>
1191 + private void FinalizeIIsHttpHeaderTable(TableIndexedCollection tables)
1192 + {
1193 + Table iisHttpHeaderTable = tables["IIsHttpHeader"];
1194 +
1195 + if (null != iisHttpHeaderTable)
1196 + {
1197 + foreach (Row row in iisHttpHeaderTable.Rows)
1198 + {
1199 + IIs.HttpHeader httpHeader = (IIs.HttpHeader)this.Core.GetIndexedElement(row);
1200 +
1201 + if (1 == (int)row[1])
1202 + {
1203 + IIs.WebVirtualDir webVirtualDir = (IIs.WebVirtualDir)this.Core.GetIndexedElement("IIsWebVirtualDir", (string)row[2]);
1204 + if (null != webVirtualDir)
1205 + {
1206 + webVirtualDir.AddChild(httpHeader);
1207 + }
1208 + else
1209 + {
1210 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisHttpHeaderTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ParentValue", (string)row[2], "IIsWebVirtualDir"));
1211 + }
1212 + }
1213 + else if (2 == (int)row[1])
1214 + {
1215 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[2]);
1216 + if (null != webSite)
1217 + {
1218 + webSite.AddChild(httpHeader);
1219 + }
1220 + else
1221 + {
1222 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisHttpHeaderTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ParentValue", (string)row[2], "IIsWebSite"));
1223 + }
1224 + }
1225 + }
1226 + }
1227 + }
1228 +
1229 + /// <summary>
1230 + /// Finalize the IIsMimeMap table.
1231 + /// </summary>
1232 + /// <param name="tables">The collection of all tables.</param>
1233 + /// <remarks>
1234 + /// The IIsMimeMap table supports multiple parent types so no foreign key
1235 + /// is declared and thus nesting must be done late.
1236 + /// </remarks>
1237 + private void FinalizeIIsMimeMapTable(TableIndexedCollection tables)
1238 + {
1239 + Table iisMimeMapTable = tables["IIsMimeMap"];
1240 +
1241 + if (null != iisMimeMapTable)
1242 + {
1243 + foreach (Row row in iisMimeMapTable.Rows)
1244 + {
1245 + IIs.MimeMap mimeMap = (IIs.MimeMap)this.Core.GetIndexedElement(row);
1246 +
1247 + if (2 < (int)row[1] || 0 >= (int)row[1])
1248 + {
1249 + // TODO: warn about unknown parent type
1250 + }
1251 +
1252 + IIs.WebVirtualDir webVirtualDir = (IIs.WebVirtualDir)this.Core.GetIndexedElement("IIsWebVirtualDir", (string)row[2]);
1253 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[2]);
1254 + if (null != webVirtualDir)
1255 + {
1256 + webVirtualDir.AddChild(mimeMap);
1257 + }
1258 + else if (null != webSite)
1259 + {
1260 + webSite.AddChild(mimeMap);
1261 + }
1262 + else
1263 + {
1264 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisMimeMapTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ParentValue", (string)row[2], "IIsWebVirtualDir"));
1265 + }
1266 + }
1267 + }
1268 + }
1269 +
1270 + /// <summary>
1271 + /// Finalize the IIsWebApplication table.
1272 + /// </summary>
1273 + /// <param name="tables">The collection of all tables.</param>
1274 + /// <remarks>
1275 + /// Since WebApplication elements may nest under a specific WebSite or
1276 + /// WebVirtualDir (or just the root element), the nesting must be done late.
1277 + /// </remarks>
1278 + private void FinalizeIIsWebApplicationTable(TableIndexedCollection tables)
1279 + {
1280 + Table iisWebApplicationTable = tables["IIsWebApplication"];
1281 + Table iisWebSiteTable = tables["IIsWebSite"];
1282 + Table iisWebVirtualDirTable = tables["IIsWebVirtualDir"];
1283 +
1284 + Hashtable addedWebApplications = new Hashtable();
1285 +
1286 + if (null != iisWebSiteTable)
1287 + {
1288 + foreach (Row row in iisWebSiteTable.Rows)
1289 + {
1290 + if (null != row[9])
1291 + {
1292 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement(row);
1293 +
1294 + IIs.WebApplication webApplication = (IIs.WebApplication)this.Core.GetIndexedElement("IIsWebApplication", (string)row[9]);
1295 + if (null != webApplication)
1296 + {
1297 + webSite.AddChild(webApplication);
1298 + addedWebApplications[webApplication] = null;
1299 + }
1300 + else
1301 + {
1302 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebSiteTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Application_", (string)row[9], "IIsWebApplication"));
1303 + }
1304 + }
1305 + }
1306 + }
1307 +
1308 + if (null != iisWebVirtualDirTable)
1309 + {
1310 + foreach (Row row in iisWebVirtualDirTable.Rows)
1311 + {
1312 + if (null != row[6])
1313 + {
1314 + IIs.WebVirtualDir webVirtualDir = (IIs.WebVirtualDir)this.Core.GetIndexedElement(row);
1315 +
1316 + IIs.WebApplication webApplication = (IIs.WebApplication)this.Core.GetIndexedElement("IIsWebApplication", (string)row[6]);
1317 + if (null != webApplication)
1318 + {
1319 + webVirtualDir.AddChild(webApplication);
1320 + addedWebApplications[webApplication] = null;
1321 + }
1322 + else
1323 + {
1324 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebVirtualDirTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Application_", (string)row[6], "IIsWebApplication"));
1325 + }
1326 + }
1327 + }
1328 + }
1329 +
1330 + if (null != iisWebApplicationTable)
1331 + {
1332 + foreach (Row row in iisWebApplicationTable.Rows)
1333 + {
1334 + IIs.WebApplication webApplication = (IIs.WebApplication)this.Core.GetIndexedElement(row);
1335 +
1336 + if (!addedWebApplications.Contains(webApplication))
1337 + {
1338 + this.Core.RootElement.AddChild(webApplication);
1339 + }
1340 + }
1341 + }
1342 + }
1343 +
1344 + /// <summary>
1345 + /// Finalize the IIsWebError table.
1346 + /// </summary>
1347 + /// <param name="tables">The collection of all tables.</param>
1348 + /// <remarks>
1349 + /// Since there is no foreign key relationship declared for this table
1350 + /// (because it takes various parent types), it must be nested late.
1351 + /// </remarks>
1352 + private void FinalizeIIsWebErrorTable(TableIndexedCollection tables)
1353 + {
1354 + Table iisWebErrorTable = tables["IIsWebError"];
1355 +
1356 + if (null != iisWebErrorTable)
1357 + {
1358 + foreach (Row row in iisWebErrorTable.Rows)
1359 + {
1360 + IIs.WebError webError = (IIs.WebError)this.Core.GetIndexedElement(row);
1361 +
1362 + if (1 == (int)row[2]) // WebVirtualDir parent
1363 + {
1364 + IIs.WebVirtualDir webVirtualDir = (IIs.WebVirtualDir)this.Core.GetIndexedElement("IIsWebVirtualDir", (string)row[3]);
1365 +
1366 + if (null != webVirtualDir)
1367 + {
1368 + webVirtualDir.AddChild(webError);
1369 + }
1370 + else
1371 + {
1372 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebErrorTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ParentValue", (string)row[3], "IIsWebVirtualDir"));
1373 + }
1374 + }
1375 + else if (2 == (int)row[2]) // WebSite parent
1376 + {
1377 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[3]);
1378 +
1379 + if (null != webSite)
1380 + {
1381 + webSite.AddChild(webError);
1382 + }
1383 + else
1384 + {
1385 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebErrorTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ParentValue", (string)row[3], "IIsWebSite"));
1386 + }
1387 + }
1388 + else
1389 + {
1390 + // TODO: warn unknown parent type
1391 + }
1392 + }
1393 + }
1394 + }
1395 +
1396 + /// <summary>
1397 + /// Finalize the IIsWebVirtualDir table.
1398 + /// </summary>
1399 + /// <param name="tables">The collection of all tables.</param>
1400 + /// <remarks>
1401 + /// WebVirtualDir elements nest under either a WebSite or component
1402 + /// depending upon whether the component in the IIsWebVirtualDir row
1403 + /// is the same as the one in the parent IIsWebSite row.
1404 + /// </remarks>
1405 + private void FinalizeIIsWebVirtualDirTable(TableIndexedCollection tables)
1406 + {
1407 + Table iisWebSiteTable = tables["IIsWebSite"];
1408 + Table iisWebVirtualDirTable = tables["IIsWebVirtualDir"];
1409 +
1410 + Hashtable iisWebSiteRows = new Hashtable();
1411 +
1412 + // index the IIsWebSite rows by their primary keys
1413 + if (null != iisWebSiteTable)
1414 + {
1415 + foreach (Row row in iisWebSiteTable.Rows)
1416 + {
1417 + iisWebSiteRows.Add(row[0], row);
1418 + }
1419 + }
1420 +
1421 + if (null != iisWebVirtualDirTable)
1422 + {
1423 + foreach (Row row in iisWebVirtualDirTable.Rows)
1424 + {
1425 + IIs.WebVirtualDir webVirtualDir = (IIs.WebVirtualDir)this.Core.GetIndexedElement(row);
1426 + Row iisWebSiteRow = (Row)iisWebSiteRows[row[2]];
1427 +
1428 + if (null != iisWebSiteRow)
1429 + {
1430 + if ((string)iisWebSiteRow[1] == (string)row[1])
1431 + {
1432 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement(iisWebSiteRow);
1433 +
1434 + webSite.AddChild(webVirtualDir);
1435 + }
1436 + else
1437 + {
1438 + Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
1439 +
1440 + if (null != component)
1441 + {
1442 + webVirtualDir.WebSite = (string)row[2];
1443 + component.AddChild(webVirtualDir);
1444 + }
1445 + else
1446 + {
1447 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebVirtualDirTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
1448 + }
1449 + }
1450 + }
1451 + else
1452 + {
1453 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebVirtualDirTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Web_", (string)row[2], "IIsWebSite"));
1454 + }
1455 + }
1456 + }
1457 + }
1458 +
1459 + /// <summary>
1460 + /// Finalize the IIsWebSiteCertificates table.
1461 + /// </summary>
1462 + /// <param name="tables">The collection of all tables.</param>
1463 + /// <remarks>
1464 + /// This table creates CertificateRef elements which nest under WebSite
1465 + /// elements.
1466 + /// </remarks>
1467 + private void FinalizeIIsWebSiteCertificatesTable(TableIndexedCollection tables)
1468 + {
1469 + Table IIsWebSiteCertificatesTable = tables["IIsWebSiteCertificates"];
1470 +
1471 + if (null != IIsWebSiteCertificatesTable)
1472 + {
1473 + foreach (Row row in IIsWebSiteCertificatesTable.Rows)
1474 + {
1475 + IIs.CertificateRef certificateRef = (IIs.CertificateRef)this.Core.GetIndexedElement(row);
1476 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[0]);
1477 +
1478 + if (null != webSite)
1479 + {
1480 + webSite.AddChild(certificateRef);
1481 + }
1482 + else
1483 + {
1484 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, IIsWebSiteCertificatesTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Web_", (string)row[0], "IIsWebSite"));
1485 + }
1486 + }
1487 + }
1488 + }
1489 +
1490 + /// <summary>
1491 + /// Finalize the WebAddress table.
1492 + /// </summary>
1493 + /// <param name="tables">The collection of all tables.</param>
1494 + /// <remarks>
1495 + /// There is a circular dependency between the WebAddress and WebSite
1496 + /// tables, so nesting must be handled here.
1497 + /// </remarks>
1498 + private void FinalizeWebAddressTable(TableIndexedCollection tables)
1499 + {
1500 + Table iisWebAddressTable = tables["IIsWebAddress"];
1501 + Table iisWebSiteTable = tables["IIsWebSite"];
1502 +
1503 + Hashtable addedWebAddresses = new Hashtable();
1504 +
1505 + if (null != iisWebSiteTable)
1506 + {
1507 + foreach (Row row in iisWebSiteTable.Rows)
1508 + {
1509 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement(row);
1510 +
1511 + IIs.WebAddress webAddress = (IIs.WebAddress)this.Core.GetIndexedElement("IIsWebAddress", (string)row[7]);
1512 + if (null != webAddress)
1513 + {
1514 + webSite.AddChild(webAddress);
1515 + addedWebAddresses[webAddress] = null;
1516 + }
1517 + else
1518 + {
1519 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebSiteTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "KeyAddress_", (string)row[7], "IIsWebAddress"));
1520 + }
1521 + }
1522 + }
1523 +
1524 + if (null != iisWebAddressTable)
1525 + {
1526 + foreach (Row row in iisWebAddressTable.Rows)
1527 + {
1528 + IIs.WebAddress webAddress = (IIs.WebAddress)this.Core.GetIndexedElement(row);
1529 +
1530 + if (!addedWebAddresses.Contains(webAddress))
1531 + {
1532 + IIs.WebSite webSite = (IIs.WebSite)this.Core.GetIndexedElement("IIsWebSite", (string)row[1]);
1533 +
1534 + if (null != webSite)
1535 + {
1536 + webSite.AddChild(webAddress);
1537 + }
1538 + else
1539 + {
1540 + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, iisWebAddressTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Web_", (string)row[1], "IIsWebSite"));
1541 + }
1542 + }
1543 + }
1544 + }
1545 + }
1546 + }
1547 +}
src/wixext/IIsExtensionData.cs new
+64
@@ -0,0 +1,64 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.Extensions
4 +{
5 + using System;
6 + using System.Reflection;
7 + using WixToolset.Data;
8 + using WixToolset.Extensibility;
9 +
10 + /// <summary>
11 + /// The WiX Toolset Internet Information Services Extension.
12 + /// </summary>
13 + public sealed class IIsExtensionData : ExtensionData
14 + {
15 + /// <summary>
16 + /// Gets the default culture.
17 + /// </summary>
18 + /// <value>The default culture.</value>
19 + public override string DefaultCulture
20 + {
21 + get { return "en-us"; }
22 + }
23 +
24 + /// <summary>
25 + /// Gets the optional table definitions for this extension.
26 + /// </summary>
27 + /// <value>The optional table definitions for this extension.</value>
28 + public override TableDefinitionCollection TableDefinitions
29 + {
30 + get
31 + {
32 + return IIsExtensionData.GetExtensionTableDefinitions();
33 + }
34 + }
35 +
36 + /// <summary>
37 + /// Gets the library associated with this extension.
38 + /// </summary>
39 + /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40 + /// <returns>The loaded library.</returns>
41 + public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42 + {
43 + return IIsExtensionData.GetExtensionLibrary(tableDefinitions);
44 + }
45 +
46 + /// <summary>
47 + /// Internal mechanism to access the extension's table definitions.
48 + /// </summary>
49 + /// <returns>Extension's table definitions.</returns>
50 + internal static TableDefinitionCollection GetExtensionTableDefinitions()
51 + {
52 + return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
53 + }
54 +
55 + /// <summary>
56 + /// Internal mechanism to access the extension's library.
57 + /// </summary>
58 + /// <returns>Extension's library.</returns>
59 + internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
60 + {
61 + return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.iis.wixlib", tableDefinitions);
62 + }
63 + }
64 +}
src/wixext/iis.xsd new
+1104
@@ -0,0 +1,1104 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<xs:schema xmlns:html="http://www.w3.org/1999/xhtml"
6 + xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
7 + xmlns:xs="http://www.w3.org/2001/XMLSchema"
8 + xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
9 + targetNamespace="http://wixtoolset.org/schemas/v4/wxs/iis"
10 + xmlns="http://wixtoolset.org/schemas/v4/wxs/iis">
11 + <xs:annotation>
12 + <xs:documentation>
13 + The source code schema for the WiX Toolset Internet Information Services Extension.
14 + </xs:documentation>
15 + </xs:annotation>
16 +
17 + <xs:import namespace="http://wixtoolset.org/schemas/v4/wxs" />
18 +
19 + <xs:element name="WebDirProperties">
20 + <xs:annotation>
21 + <xs:appinfo>
22 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
23 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
24 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
25 + </xs:appinfo>
26 + <xs:documentation>
27 + WebDirProperties used by one or more WebSites. Lists properties common to IIS web sites and vroots. Corresponding properties can be viewed through the IIS Manager snap-in. One property entry can be reused by multiple sites or vroots using the Id field as a reference, using WebVirtualDir.DirProperties, WebSite.DirProperties, or WebDir.DirProperties.
28 + </xs:documentation>
29 + </xs:annotation>
30 + <xs:complexType>
31 + <xs:attribute name="Id" type="xs:string" use="required"/>
32 + <xs:attribute name="Read" type="YesNoType"/>
33 + <xs:attribute name="Write" type="YesNoType"/>
34 + <xs:attribute name="Script" type="YesNoType"/>
35 + <xs:attribute name="Execute" type="YesNoType"/>
36 + <xs:attribute name="AnonymousAccess" type="YesNoType">
37 + <xs:annotation>
38 + <xs:documentation>Sets the Enable Anonymous Access checkbox, which maps anonymous users to a Windows user account. When setting this to 'yes' you should also provide the user account using the AnonymousUser attribute, and determine what setting to use for the IIsControlledPassword attribute. Defaults to 'no.'</xs:documentation>
39 + </xs:annotation>
40 + </xs:attribute>
41 + <xs:attribute name="AnonymousUser" type="xs:string">
42 + <xs:annotation>
43 + <xs:documentation>Reference to the Id attribute on the User element to be used as the anonymous user for the directory. See the User element for more information.</xs:documentation>
44 + </xs:annotation>
45 + </xs:attribute>
46 + <xs:attribute name="IIsControlledPassword" type="YesNoType">
47 + <xs:annotation>
48 + <xs:documentation>Sets whether IIS should control the password used for the Windows account specified in the AnonymousUser attribute. Defaults to 'no.'</xs:documentation>
49 + </xs:annotation>
50 + </xs:attribute>
51 + <xs:attribute name="WindowsAuthentication" type="YesNoType">
52 + <xs:annotation>
53 + <xs:documentation>Sets the Windows Authentication option, which enables integrated Windows authentication to be used on the site. Defaults to 'no.'</xs:documentation>
54 + </xs:annotation>
55 + </xs:attribute>
56 + <xs:attribute name="DigestAuthentication" type="YesNoType">
57 + <xs:annotation>
58 + <xs:documentation>Sets the Digest Authentication option, which allows using digest authentication with domain user accounts. Defaults to 'no.'</xs:documentation>
59 + </xs:annotation>
60 + </xs:attribute>
61 + <xs:attribute name="BasicAuthentication" type="YesNoType">
62 + <xs:annotation>
63 + <xs:documentation>Sets the Basic Authentication option, which allows clients to provide credentials in plaintext over the wire. Defaults to 'no.'</xs:documentation>
64 + </xs:annotation>
65 + </xs:attribute>
66 + <xs:attribute name="PassportAuthentication" type="YesNoType">
67 + <xs:annotation>
68 + <xs:documentation>Sets the Passport Authentication option, which allows clients to provide credentials via a .Net Passport account. Defaults to 'no.'</xs:documentation>
69 + </xs:annotation>
70 + </xs:attribute>
71 + <xs:attribute name="LogVisits" type="YesNoType">
72 + <xs:annotation>
73 + <xs:documentation>Sets whether visits to this site should be logged. Defaults to 'no.'</xs:documentation>
74 + </xs:annotation>
75 + </xs:attribute>
76 + <xs:attribute name="Index" type="YesNoType">
77 + <xs:annotation>
78 + <xs:documentation>Sets the Index Resource option, which specifies whether this web directory should be indexed. Defaults to 'no.'</xs:documentation>
79 + </xs:annotation>
80 + </xs:attribute>
81 + <xs:attribute name="DefaultDocuments" type="xs:string">
82 + <xs:annotation>
83 + <xs:documentation>The list of default documents to set for this web directory, in comma-delimited format.</xs:documentation>
84 + </xs:annotation>
85 + </xs:attribute>
86 + <xs:attribute name="AspDetailedError" type="YesNoType">
87 + <xs:annotation>
88 + <xs:documentation>Sets the option for whether to send detailed ASP errors back to the client on script error. Default is 'no.'</xs:documentation>
89 + </xs:annotation>
90 + </xs:attribute>
91 + <xs:attribute name="HttpExpires" type="xs:string">
92 + <xs:annotation>
93 + <xs:documentation>Value to set the HttpExpires attribute to for a Web Dir in the metabase.</xs:documentation>
94 + </xs:annotation>
95 + </xs:attribute>
96 + <xs:attribute name="CacheControlMaxAge" type="xs:nonNegativeInteger">
97 + <xs:annotation>
98 + <xs:documentation>Integer value specifying the cache control maximum age value.</xs:documentation>
99 + </xs:annotation>
100 + </xs:attribute>
101 + <xs:attribute name="CacheControlCustom" type="xs:string">
102 + <xs:annotation>
103 + <xs:documentation>Custom HTTP 1.1 cache control directives.</xs:documentation>
104 + </xs:annotation>
105 + </xs:attribute>
106 + <xs:attribute name="ClearCustomError" type="YesNoType">
107 + <xs:annotation>
108 + <xs:documentation>Specifies whether IIs will return custom errors for this directory.</xs:documentation>
109 + </xs:annotation>
110 + </xs:attribute>
111 + <xs:attribute name="AccessSSL" type="YesNoType">
112 + <xs:annotation>
113 + <xs:documentation>A value of true indicates that file access requires SSL file permission processing, with or without a client certificate. This corresponds to AccessSSL flag for AccessSSLFlags IIS metabase property.</xs:documentation>
114 + </xs:annotation>
115 + </xs:attribute>
116 + <xs:attribute name="AccessSSL128" type="YesNoType">
117 + <xs:annotation>
118 + <xs:documentation>A value of true indicates that file access requires SSL file permission processing with a minimum key size of 128 bits, with or without a client certificate. This corresponds to AccessSSL128 flag for AccessSSLFlags IIS metabase property.</xs:documentation>
119 + </xs:annotation>
120 + </xs:attribute>
121 + <xs:attribute name="AccessSSLMapCert" type="YesNoType">
122 + <xs:annotation>
123 + <xs:documentation>This corresponds to AccessSSLMapCert flag for AccessSSLFlags IIS metabase property.</xs:documentation>
124 + </xs:annotation>
125 + </xs:attribute>
126 + <xs:attribute name="AccessSSLNegotiateCert" type="YesNoType">
127 + <xs:annotation>
128 + <xs:documentation>This corresponds to AccessSSLNegotiateCert flag for AccessSSLFlags IIS metabase property.</xs:documentation>
129 + </xs:annotation>
130 + </xs:attribute>
131 + <xs:attribute name="AccessSSLRequireCert" type="YesNoType">
132 + <xs:annotation>
133 + <xs:documentation>This corresponds to AccessSSLRequireCert flag for AccessSSLFlags IIS metabase property.</xs:documentation>
134 + </xs:annotation>
135 + </xs:attribute>
136 + <xs:attribute name="AuthenticationProviders" type="xs:string">
137 + <xs:annotation>
138 + <xs:documentation>Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others.</xs:documentation>
139 + </xs:annotation>
140 + </xs:attribute>
141 + </xs:complexType>
142 + </xs:element>
143 +
144 + <xs:element name="WebError">
145 + <xs:annotation>
146 + <xs:documentation>Custom Web Errors used by WebSites and Virtual Directories.</xs:documentation>
147 + <xs:appinfo>
148 + <xse:remarks>
149 + You can only use error code and sub code combinations which are supported by IIS. Attempting to set a custom error for
150 + an error code and sub code combination that is not supported by IIS (in the default list of error codes) will result in
151 + an installation failure.
152 + </xse:remarks>
153 + </xs:appinfo>
154 + </xs:annotation>
155 + <xs:complexType>
156 + <xs:attribute name="ErrorCode" use="required" type="xs:integer">
157 + <xs:annotation>
158 + <xs:documentation>HTTP 1.1 error code.</xs:documentation>
159 + </xs:annotation>
160 + </xs:attribute>
161 + <xs:attribute name="SubCode" use="required" type="xs:integer">
162 + <xs:annotation>
163 + <xs:documentation>Error sub code. Set to 0 to get the wild card "*".</xs:documentation>
164 + </xs:annotation>
165 + </xs:attribute>
166 + <xs:attribute name="File" type="xs:string">
167 + <xs:annotation>
168 + <xs:documentation>File to be sent to the client for this error code and sub code. This can be formatted. For example: [#FileId].</xs:documentation>
169 + </xs:annotation>
170 + </xs:attribute>
171 + <xs:attribute name="URL" type="xs:string">
172 + <xs:annotation>
173 + <xs:documentation>URL to be sent to the client for this error code and sub code. This can be formatted.</xs:documentation>
174 + </xs:annotation>
175 + </xs:attribute>
176 + </xs:complexType>
177 + </xs:element>
178 +
179 + <xs:element name="HttpHeader">
180 + <xs:annotation>
181 + <xs:documentation>Custom HTTP Header definition for IIS resources such as WebSite and WebVirtualDir.</xs:documentation>
182 + </xs:annotation>
183 + <xs:complexType>
184 + <xs:attribute name="Id" type="xs:string">
185 + <xs:annotation>
186 + <xs:documentation>Primary key for custom HTTP Header entry. This will default to the Name attribute.</xs:documentation>
187 + </xs:annotation>
188 + </xs:attribute>
189 + <xs:attribute name="Name" use="required" type="xs:string">
190 + <xs:annotation>
191 + <xs:documentation>Name of the custom HTTP Header.</xs:documentation>
192 + </xs:annotation>
193 + </xs:attribute>
194 + <xs:attribute name="Value" type="xs:string">
195 + <xs:annotation>
196 + <xs:documentation>Value for the custom HTTP Header. This attribute can contain a formatted string that is processed at install time to insert the values of properties using [PropertyName] syntax. Also supported are environment variables, file installation paths, and component installation directories; see <a href="http://msdn.microsoft.com/library/aa368609.aspx" target="_blank">Formatted</a> for details.</xs:documentation>
197 + </xs:annotation>
198 + </xs:attribute>
199 + </xs:complexType>
200 + </xs:element>
201 +
202 + <xs:element name="MimeMap">
203 + <xs:annotation>
204 + <xs:documentation>MimeMap definition for IIS resources.</xs:documentation>
205 + </xs:annotation>
206 + <xs:complexType>
207 + <xs:attribute name="Id" use="required" type="xs:string">
208 + <xs:annotation>
209 + <xs:documentation>Id for the MimeMap.</xs:documentation>
210 + </xs:annotation>
211 + </xs:attribute>
212 + <xs:attribute name="Type" use="required" type="xs:string">
213 + <xs:annotation>
214 + <xs:documentation>Mime-type covered by the MimeMap.</xs:documentation>
215 + </xs:annotation>
216 + </xs:attribute>
217 + <xs:attribute name="Extension" use="required" type="xs:string">
218 + <xs:annotation>
219 + <xs:documentation>Extension covered by the MimeMap. Must begin with a dot.</xs:documentation>
220 + </xs:annotation>
221 + </xs:attribute>
222 + </xs:complexType>
223 + </xs:element>
224 +
225 + <xs:element name="WebFilter">
226 + <xs:annotation>
227 + <xs:appinfo>
228 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
229 + </xs:appinfo>
230 + <xs:documentation>IIs Filter for a Component</xs:documentation>
231 + </xs:annotation>
232 + <xs:complexType>
233 + <xs:attribute name="Id" use="required" type="xs:string">
234 + <xs:annotation>
235 + <xs:documentation>The unique Id for the web filter.</xs:documentation>
236 + </xs:annotation>
237 + </xs:attribute>
238 + <xs:attribute name="Name" use="required" type="xs:string">
239 + <xs:annotation>
240 + <xs:documentation>The name of the filter to be used in IIS.</xs:documentation>
241 + </xs:annotation>
242 + </xs:attribute>
243 + <xs:attribute name="Path" use="required" type="xs:string">
244 + <xs:annotation>
245 + <xs:documentation>
246 + The path of the filter executable file.
247 + This should usually be a value like '[!FileId]', where 'FileId' is the file identifier
248 + of the filter executable file.
249 + </xs:documentation>
250 + </xs:annotation>
251 + </xs:attribute>
252 + <xs:attribute name="WebSite" type="xs:string">
253 + <xs:annotation>
254 + <xs:documentation>
255 + Specifies the parent website for this filter (if there is one).
256 + If this is a global filter, then this attribute should not be specified.
257 + </xs:documentation>
258 + </xs:annotation>
259 + </xs:attribute>
260 + <xs:attribute name="Description" type="xs:string">
261 + <xs:annotation>
262 + <xs:documentation>Description of the filter.</xs:documentation>
263 + </xs:annotation>
264 + </xs:attribute>
265 + <xs:attribute name="Flags" type="xs:integer">
266 + <xs:annotation>
267 + <xs:documentation>Sets the MD_FILTER_FLAGS metabase key for the filter. This must be an integer. See MSDN 'FilterFlags' documentation for more details.</xs:documentation>
268 + </xs:annotation>
269 + </xs:attribute>
270 + <xs:attribute name="LoadOrder" type="xs:string">
271 + <xs:annotation>
272 + <xs:documentation>
273 + The legal values are "first", "last", or a number.
274 + If a number is specified, it must be greater than 0.
275 + </xs:documentation>
276 + </xs:annotation>
277 + </xs:attribute>
278 + </xs:complexType>
279 + </xs:element>
280 +
281 + <xs:element name="WebApplicationExtension">
282 + <xs:annotation>
283 + <xs:documentation>Extension for WebApplication</xs:documentation>
284 + </xs:annotation>
285 + <xs:complexType>
286 + <xs:attribute name="Executable" use="required" type="xs:string">
287 + <xs:annotation>
288 + <xs:documentation>usually a Property that resolves to short file name path</xs:documentation>
289 + </xs:annotation>
290 + </xs:attribute>
291 + <xs:attribute name="Extension" type="xs:string">
292 + <xs:annotation>
293 + <xs:documentation>Extension being registered. Do not prefix with a '.' (e.g. you should use "html", not ".html"). To register for all extensions, use Extension="*". To register a wildcard application map (which handles all requests, even those for directories or files with no extension) omit the Extension attribute completely.</xs:documentation>
294 + </xs:annotation>
295 + </xs:attribute>
296 + <xs:attribute name="Verbs" type="xs:string">
297 + </xs:attribute>
298 + <xs:attribute name="Script" type="YesNoType">
299 + </xs:attribute>
300 + <xs:attribute name="CheckPath" type="YesNoType">
301 + </xs:attribute>
302 + </xs:complexType>
303 + </xs:element>
304 +
305 + <xs:element name="WebAppPool">
306 + <xs:annotation>
307 + <xs:appinfo>
308 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
309 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
310 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
311 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
312 + </xs:appinfo>
313 + <xs:documentation>IIS6 Application Pool</xs:documentation>
314 + </xs:annotation>
315 + <xs:complexType>
316 + <xs:sequence>
317 + <xs:element ref="RecycleTime" minOccurs="0" maxOccurs="unbounded"/>
318 + </xs:sequence>
319 + <xs:attribute name="Id" use="required" type="xs:string">
320 + <xs:annotation>
321 + <xs:documentation>Id of the AppPool.</xs:documentation>
322 + </xs:annotation>
323 + </xs:attribute>
324 + <xs:attribute name="Name" use="required" type="xs:string">
325 + <xs:annotation>
326 + <xs:documentation>Name of the AppPool to be shown in IIs.</xs:documentation>
327 + </xs:annotation>
328 + </xs:attribute>
329 + <xs:attribute name="User" type="xs:string">
330 + <xs:annotation>
331 + <xs:documentation>User account to run the AppPool as. To use this, you must set the Identity attribute to 'other'.</xs:documentation>
332 + </xs:annotation>
333 + </xs:attribute>
334 + <xs:attribute name="RecycleMinutes" type="xs:integer">
335 + <xs:annotation>
336 + <xs:documentation>How often, in minutes, you want the AppPool to be recycled.</xs:documentation>
337 + </xs:annotation>
338 + </xs:attribute>
339 + <xs:attribute name="RecycleRequests" type="xs:integer">
340 + <xs:annotation>
341 + <xs:documentation>How often, in requests, you want the AppPool to be recycled.</xs:documentation>
342 + </xs:annotation>
343 + </xs:attribute>
344 + <xs:attribute name="VirtualMemory" type="xs:integer">
345 + <xs:annotation>
346 + <xs:documentation>Specifies the amount of virtual memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.</xs:documentation>
347 + </xs:annotation>
348 + </xs:attribute>
349 + <xs:attribute name="PrivateMemory" type="xs:integer">
350 + <xs:annotation>
351 + <xs:documentation>Specifies the amount of private memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.</xs:documentation>
352 + </xs:annotation>
353 + </xs:attribute>
354 + <xs:attribute name="IdleTimeout" type="xs:integer">
355 + <xs:annotation>
356 + <xs:documentation>Shutdown worker process after being idle for (time in minutes).</xs:documentation>
357 + </xs:annotation>
358 + </xs:attribute>
359 + <xs:attribute name="QueueLimit" type="xs:integer">
360 + <xs:annotation>
361 + <xs:documentation>Limit the kernel request queue (number of requests).</xs:documentation>
362 + </xs:annotation>
363 + </xs:attribute>
364 + <xs:attribute name="MaxCpuUsage" type="PercentType">
365 + <xs:annotation>
366 + <xs:documentation>Maximum CPU usage (percent).</xs:documentation>
367 + </xs:annotation>
368 + </xs:attribute>
369 + <xs:attribute name="RefreshCpu" type="xs:integer">
370 + <xs:annotation>
371 + <xs:documentation>Refresh CPU usage numbers (in minutes).</xs:documentation>
372 + </xs:annotation>
373 + </xs:attribute>
374 + <xs:attribute name="CpuAction">
375 + <xs:annotation>
376 + <xs:documentation>Action taken when CPU exceeds maximum CPU use (as defined with MaxCpuUsage and RefreshCpu).</xs:documentation>
377 + </xs:annotation>
378 + <xs:simpleType>
379 + <xs:restriction base="xs:string">
380 + <xs:enumeration value="none"/>
381 + <xs:enumeration value="shutdown"/>
382 + </xs:restriction>
383 + </xs:simpleType>
384 + </xs:attribute>
385 + <xs:attribute name="MaxWorkerProcesses" type="xs:integer">
386 + <xs:annotation>
387 + <xs:documentation>Maximum number of worker processes.</xs:documentation>
388 + </xs:annotation>
389 + </xs:attribute>
390 + <xs:attribute name="Identity">
391 + <xs:annotation>
392 + <xs:documentation>Identity you want the AppPool to run under (applicationPoolIdentity is only available on IIS7). Use the 'other' value in conjunction with the User attribute to specify non-standard user.</xs:documentation>
393 + </xs:annotation>
394 + <xs:simpleType>
395 + <xs:restriction base="xs:string">
396 + <xs:enumeration value="networkService"/>
397 + <xs:enumeration value="localService"/>
398 + <xs:enumeration value="localSystem"/>
399 + <xs:enumeration value="other"/>
400 + <xs:enumeration value="applicationPoolIdentity"/>
401 + </xs:restriction>
402 + </xs:simpleType>
403 + </xs:attribute>
404 + <xs:attribute name="ManagedPipelineMode" type="xs:string">
405 + <xs:annotation>
406 + <xs:documentation>
407 + Specifies the request-processing mode that is used to process requests for managed content. Only available on IIS7, ignored on IIS6.
408 + See <a href="http://www.iis.net/configreference/system.applicationhost/applicationpools/applicationpooldefaults" target="_blank">http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/applicationPoolDefaults</a> for valid values.
409 + This attribute may be set via a formatted Property (e.g. [MyProperty]).
410 + </xs:documentation>
411 + </xs:annotation>
412 + </xs:attribute>
413 + <xs:attribute name="ManagedRuntimeVersion" type="xs:string">
414 + <xs:annotation>
415 + <xs:documentation>
416 + Specifies the .NET Framework version to be used by the application pool. Only available on IIS7, ignored on IIS6.
417 + See <a href="http://www.iis.net/configreference/system.applicationhost/applicationpools/applicationpooldefaults" target="_blank">http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/applicationPoolDefaults</a> for valid values.
418 + This attribute may be set via a formatted Property (e.g. [MyProperty]).
419 + </xs:documentation>
420 + </xs:annotation>
421 + </xs:attribute>
422 + </xs:complexType>
423 + </xs:element>
424 +
425 + <xs:element name="RecycleTime">
426 + <xs:annotation>
427 + <xs:documentation>IIS6 Application Pool Recycle Times on 24 hour clock.</xs:documentation>
428 + </xs:annotation>
429 + <xs:complexType>
430 + <xs:attribute name="Value" use="required">
431 + <xs:simpleType>
432 + <xs:restriction base="xs:string">
433 + <xs:pattern value="\d{1,2}:\d{2}"/>
434 + </xs:restriction>
435 + </xs:simpleType>
436 + </xs:attribute>
437 + </xs:complexType>
438 + </xs:element>
439 +
440 + <xs:element name="Certificate">
441 + <xs:annotation>
442 + <xs:documentation>
443 + Used to install and uninstall certificates.
444 + </xs:documentation>
445 + <xs:appinfo>
446 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
447 + <xse:seeAlso ref="CertificateRef"/>
448 + </xs:appinfo>
449 + </xs:annotation>
450 + <xs:complexType>
451 + <xs:attribute name="Id" use="required" type="xs:string">
452 + <xs:annotation>
453 + <xs:documentation>
454 + Unique identifier for this certificate in the installation package.
455 + </xs:documentation>
456 + </xs:annotation>
457 + </xs:attribute>
458 + <xs:attribute name="Name" use="required" type="xs:string">
459 + <xs:annotation>
460 + <xs:documentation>
461 + Name of the certificate that will be installed or uninstalled in the specified store.
462 + This attribute may be set via a formatted Property (e.g. [MyProperty]).
463 + </xs:documentation>
464 + </xs:annotation>
465 + </xs:attribute>
466 + <xs:attribute name="StoreName" use="required">
467 + <xs:simpleType>
468 + <xs:restriction base="xs:string">
469 + <xs:enumeration value="ca">
470 + <xs:annotation>
471 + <xs:documentation>
472 + Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator.
473 + </xs:documentation>
474 + </xs:annotation>
475 + </xs:enumeration>
476 + <xs:enumeration value="my">
477 + <xs:annotation>
478 + <xs:documentation>
479 + Use the "personal" value instead.
480 + </xs:documentation>
481 + </xs:annotation>
482 + </xs:enumeration>
483 + <xs:enumeration value="personal">
484 + <xs:annotation>
485 + <xs:documentation>
486 + Contains personal certificates. These certificates will usually have an associated private key. This store is often
487 + referred to as the "MY" certificate store.
488 + </xs:documentation>
489 + </xs:annotation>
490 + </xs:enumeration>
491 + <xs:enumeration value="request"/>
492 + <xs:enumeration value="root">
493 + <xs:annotation>
494 + <xs:documentation>
495 + Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator. Certificates in this store are typically self-signed.
496 + </xs:documentation>
497 + </xs:annotation>
498 + </xs:enumeration>
499 + <xs:enumeration value="otherPeople">
500 + <xs:annotation>
501 + <xs:documentation>
502 + Contains the certificates of those that the user normally sends enveloped messages to or receives signed messages from.
503 + See <a href="http://msdn.microsoft.com/library/aa388160.aspx" target="_blank">MSDN documentation</a> for more information.
504 + </xs:documentation>
505 + </xs:annotation>
506 + </xs:enumeration>
507 + <xs:enumeration value="trustedPeople">
508 + <xs:annotation>
509 + <xs:documentation>
510 + Contains the certificates of those directly trusted people and resources.
511 + See <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.storename.aspx" target="_blank">MSDN documentation</a> for more information.
512 + </xs:documentation>
513 + </xs:annotation>
514 + </xs:enumeration>
515 + <xs:enumeration value="trustedPublisher">
516 + <xs:annotation>
517 + <xs:documentation>
518 + Contains the certificates of those publishers who are trusted.
519 + See <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.storename.aspx" target="_blank">MSDN documentation</a> for more information.
520 + </xs:documentation>
521 + </xs:annotation>
522 + </xs:enumeration>
523 + </xs:restriction>
524 + </xs:simpleType>
525 + </xs:attribute>
526 + <xs:attribute name="StoreLocation" use="required">
527 + <xs:simpleType>
528 + <xs:restriction base="xs:string">
529 + <xs:enumeration value="currentUser"/>
530 + <xs:enumeration value="localMachine"/>
531 + </xs:restriction>
532 + </xs:simpleType>
533 + </xs:attribute>
534 + <xs:attribute name="Overwrite" type="YesNoType"/>
535 + <xs:attribute name="Request" type="YesNoType">
536 + <xs:annotation>
537 + <xs:documentation>
538 + This attribute controls whether the CertificatePath attribute is a path to a certificate file (Request=&apos;no&apos;) or the
539 + certificate authority to request the certificate from (Request=&apos;yes&apos;).
540 + </xs:documentation>
541 + </xs:annotation>
542 + </xs:attribute>
543 + <xs:attribute name="BinaryKey" type="xs:string">
544 + <xs:annotation>
545 + <xs:documentation>
546 + Reference to a Binary element that will store the certificate as a stream inside the package. This attribute cannot be specified with
547 + the CertificatePath attribute.
548 + </xs:documentation>
549 + <xs:appinfo>
550 + <xse:seeAlso ref="Binary"/>
551 + </xs:appinfo>
552 + </xs:annotation>
553 + </xs:attribute>
554 + <xs:attribute name="CertificatePath" type="xs:string">
555 + <xs:annotation>
556 + <xs:documentation>
557 + If the Request attribute is "no" then this attribute is the path to the certificate file outside of the package.
558 + If the Request attribute is "yes" then this atribute is the certificate authority to request the certificate from.
559 + This attribute may be set via a formatted Property (e.g. [MyProperty]).
560 + </xs:documentation>
561 + </xs:annotation>
562 + </xs:attribute>
563 + <xs:attribute name="PFXPassword" type="xs:string">
564 + <xs:annotation>
565 + <xs:documentation>
566 + If the Binary stream or path to the file outside of the package is a password protected PFX file, the password for that
567 + PFX must be specified here. This attribute may be set via a formatted Property (e.g. [MyProperty]).
568 + </xs:documentation>
569 + </xs:annotation>
570 + </xs:attribute>
571 + </xs:complexType>
572 + </xs:element>
573 +
574 + <xs:element name="CertificateRef">
575 + <xs:annotation>
576 + <xs:documentation>
577 + Associates a certificate with the parent WebSite. The Certificate element should be
578 + in the same Component as the parent WebSite.
579 + </xs:documentation>
580 + <xs:appinfo>
581 + <xse:seeAlso ref="Certificate"/>
582 + </xs:appinfo>
583 + </xs:annotation>
584 + <xs:complexType>
585 + <xs:attribute name="Id" use="required" type="xs:string">
586 + <xs:annotation>
587 + <xs:documentation>
588 + The identifier of the referenced Certificate.
589 + </xs:documentation>
590 + </xs:annotation>
591 + </xs:attribute>
592 + </xs:complexType>
593 + </xs:element>
594 +
595 + <xs:element name="WebProperty">
596 + <xs:annotation>
597 + <xs:appinfo>
598 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
599 + <xse:remarks>
600 + Here is an explanation of the acceptable values for each property and their meaning:
601 + <html:ul>
602 + <html:li>
603 + For the Ids IIs5IsolationMode and LogInUTF8, no value should be specified since
604 + the presence of this property indicates that the setting should be set.
605 + </html:li>
606 + <html:li>
607 + For the MaxGlobalBandwidth Id, the value should be specified in kilobytes. The
608 + value should be a base 10 number.
609 + </html:li>
610 + <html:li>
611 + ETagChangeNumber sets the machine-specific portion of ETag as a number. This value,
612 + when synchronized across servers in a web farm, allows the web farm to return an
613 + identical ETag for a given resource regardless of the server that handled the
614 + request. The value should be a base 10 number.
615 + </html:li>
616 + </html:ul>
617 + </xse:remarks>
618 + </xs:appinfo>
619 + <xs:documentation>IIS Properties</xs:documentation>
620 + </xs:annotation>
621 + <xs:complexType>
622 + <xs:attribute name="Id" use="required">
623 + <xs:simpleType>
624 + <xs:restriction base="xs:string">
625 + <xs:enumeration value="ETagChangeNumber"/>
626 + <xs:enumeration value="IIs5IsolationMode"/>
627 + <xs:enumeration value="MaxGlobalBandwidth"/>
628 + <xs:enumeration value="LogInUTF8"/>
629 + </xs:restriction>
630 + </xs:simpleType>
631 + </xs:attribute>
632 + <xs:attribute name="Value" type="xs:string">
633 + <xs:annotation>
634 + <xs:documentation>
635 + The value to be used for the WebProperty specified in the Id attribute. See
636 + the remarks section for information on acceptable values for each Id.
637 + </xs:documentation>
638 + </xs:annotation>
639 + </xs:attribute>
640 + </xs:complexType>
641 + </xs:element>
642 +
643 + <xs:element name="WebApplication">
644 + <xs:annotation>
645 + <xs:appinfo>
646 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
647 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
648 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
649 + </xs:appinfo>
650 + <xs:documentation>Defines properties for a web application. These properties can be used for more than one application defined in a web site or vroot, by defining this element in a common location and referring to it by setting the WebApplication attribute of the WebSite and WebVirtualDir elements.</xs:documentation>
651 + </xs:annotation>
652 + <xs:complexType>
653 + <xs:sequence>
654 + <xs:element ref="WebApplicationExtension" minOccurs="0" maxOccurs="unbounded"/>
655 + </xs:sequence>
656 + <xs:attribute name="Id" use="required" type="xs:string"/>
657 + <xs:attribute name="Name" use="required" type="xs:string">
658 + <xs:annotation>
659 + <xs:documentation>Sets the name of this application.</xs:documentation>
660 + </xs:annotation>
661 + </xs:attribute>
662 + <xs:attribute name="Isolation">
663 + <xs:annotation>
664 + <xs:documentation>
665 + Sets the application isolation level for this application for pre-IIS 6 applications.
666 + </xs:documentation>
667 + </xs:annotation>
668 + <xs:simpleType>
669 + <xs:restriction base="xs:NMTOKEN">
670 + <xs:enumeration value="low">
671 + <xs:annotation>
672 + <xs:documentation>
673 + Means the application executes within the IIS process.
674 + </xs:documentation>
675 + </xs:annotation>
676 + </xs:enumeration>
677 + <xs:enumeration value="medium">
678 + <xs:annotation>
679 + <xs:documentation>
680 + Executes pooled in a separate process.
681 + </xs:documentation>
682 + </xs:annotation>
683 + </xs:enumeration>
684 + <xs:enumeration value="high">
685 + <xs:annotation>
686 + <xs:documentation>
687 + Means execution alone in a separate process.
688 + </xs:documentation>
689 + </xs:annotation>
690 + </xs:enumeration>
691 + </xs:restriction>
692 + </xs:simpleType>
693 + </xs:attribute>
694 + <xs:attribute name="AllowSessions" type="YesNoDefaultType">
695 + <xs:annotation>
696 + <xs:documentation>Sets the Enable Session State option. When enabled, you can set the session timeout using the SessionTimeout attribute.</xs:documentation>
697 + </xs:annotation>
698 + </xs:attribute>
699 + <xs:attribute name="SessionTimeout" type="xs:integer">
700 + <xs:annotation>
701 + <xs:documentation>Sets the timeout value for sessions in minutes.</xs:documentation>
702 + </xs:annotation>
703 + </xs:attribute>
704 + <xs:attribute name="Buffer" type="YesNoDefaultType">
705 + <xs:annotation>
706 + <xs:documentation>Sets the option that enables response buffering in the application, which allows ASP script to set response headers anywhere in the script.</xs:documentation>
707 + </xs:annotation>
708 + </xs:attribute>
709 + <xs:attribute name="ParentPaths" type="YesNoDefaultType">
710 + <xs:annotation>
711 + <xs:documentation>Sets the parent paths option, which allows a client to use relative paths to reach parent directories from this application.</xs:documentation>
712 + </xs:annotation>
713 + </xs:attribute>
714 + <xs:attribute name="DefaultScript">
715 + <xs:annotation>
716 + <xs:documentation>Sets the default script language for the site.</xs:documentation>
717 + </xs:annotation>
718 + <xs:simpleType>
719 + <xs:restriction base="xs:NMTOKEN">
720 + <xs:enumeration value="VBScript"/>
721 + <xs:enumeration value="JScript"/>
722 + </xs:restriction>
723 + </xs:simpleType>
724 + </xs:attribute>
725 + <xs:attribute name="ScriptTimeout" type="xs:integer">
726 + <xs:annotation>
727 + <xs:documentation>Sets the timeout value in seconds for executing ASP scripts.</xs:documentation>
728 + </xs:annotation>
729 + </xs:attribute>
730 + <xs:attribute name="ServerDebugging" type="YesNoDefaultType">
731 + <xs:annotation>
732 + <xs:documentation>Enable ASP server-side script debugging.</xs:documentation>
733 + </xs:annotation>
734 + </xs:attribute>
735 + <xs:attribute name="ClientDebugging" type="YesNoDefaultType">
736 + <xs:annotation>
737 + <xs:documentation>Enable ASP client-side script debugging.</xs:documentation>
738 + </xs:annotation>
739 + </xs:attribute>
740 + <xs:attribute name="WebAppPool" type="xs:string">
741 + <xs:annotation>
742 + <xs:documentation>References the Id attribute of a WebAppPool element to use as the application pool for this application in IIS 6 applications.</xs:documentation>
743 + </xs:annotation>
744 + </xs:attribute>
745 + </xs:complexType>
746 + </xs:element>
747 +
748 + <xs:element name="WebAddress">
749 + <xs:annotation>
750 + <xs:documentation>WebAddress for WebSite</xs:documentation>
751 + </xs:annotation>
752 + <xs:complexType>
753 + <xs:attribute name="Id" use="required" type="xs:string"/>
754 + <xs:attribute name="IP" type="xs:string">
755 + <xs:annotation>
756 + <xs:documentation>
757 + The IP address to locate an existing WebSite or create a new WebSite. When the WebAddress is part of a WebSite element
758 + used to locate an existing web site the following rules are used:
759 + <html:ul>
760 + <html:li>When this attribute is not specified only the "All Unassigned" IP address will be located.</html:li>
761 + <html:li>When this attribute is explicitly specified only the specified IP address will be located.</html:li>
762 + <html:li>When this attribute has the value "*" then any IP address including the "All Unassigned" IP address will be located</html:li>
763 + </html:ul>
764 + When the WebAddress is part of a WebSite element used to create a new web site the following rules are used:
765 + <html:ul>
766 + <html:li>When this attribute is not specified or the value is "*" the "All Unassigned" IP address will be used.</html:li>
767 + <html:li>When this attribute is explicitly specified the IP address will use that value.</html:li>
768 + </html:ul>
769 + The IP attribute can contain a formatted string that is processed at install time to insert the values of properties using
770 + [PropertyName] syntax.
771 + </xs:documentation>
772 + </xs:annotation>
773 + </xs:attribute>
774 + <xs:attribute name="Port" use="required" type="xs:string"/>
775 + <xs:attribute name="Header" type="xs:string"/>
776 + <xs:attribute name="Secure" type="YesNoType">
777 + <xs:annotation>
778 + <xs:documentation>Determines if this address represents a secure binding. The default is 'no'.</xs:documentation>
779 + </xs:annotation>
780 + </xs:attribute>
781 + </xs:complexType>
782 + </xs:element>
783 +
784 + <xs:element name="WebVirtualDir">
785 + <xs:annotation>
786 + <xs:appinfo>
787 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
788 + </xs:appinfo>
789 + <xs:documentation>Defines an IIS virtual directory. When this element is a child of WebSite element, the virtual directory is defined within that web site. Otherwise this virtual directory must reference a WebSite element via the WebSite attribute</xs:documentation>
790 + </xs:annotation>
791 + <xs:complexType>
792 + <xs:choice minOccurs="0" maxOccurs="unbounded">
793 + <xs:element ref="WebApplication" minOccurs="0" maxOccurs="1" />
794 + <xs:element ref="WebDirProperties" minOccurs="0" maxOccurs="1" />
795 + <xs:element ref="WebError" minOccurs="0" maxOccurs="unbounded"/>
796 + <xs:element ref="WebVirtualDir" minOccurs="0" maxOccurs="unbounded"/>
797 + <xs:element ref="HttpHeader" minOccurs="0" maxOccurs="unbounded"/>
798 + <xs:element ref="MimeMap" minOccurs="0" maxOccurs="unbounded"/>
799 + </xs:choice>
800 + <xs:attribute name="Id" use="required" type="xs:string"/>
801 + <xs:attribute name="WebSite" type="xs:string">
802 + <xs:annotation>
803 + <xs:documentation>References the Id attribute for a WebSite in which this virtual directory belongs. Required when this element is not a child of WebSite element.</xs:documentation>
804 + </xs:annotation>
805 + </xs:attribute>
806 + <xs:attribute name="Alias" use="required" type="xs:string">
807 + <xs:annotation>
808 + <xs:documentation>Sets the application name, which is the URL relative path used to access this virtual directory</xs:documentation>
809 + </xs:annotation>
810 + </xs:attribute>
811 + <xs:attribute name="Directory" use="required" type="xs:string">
812 + <xs:annotation>
813 + <xs:documentation>References the Id attribute for a Directory element that points to the content for this virtual directory.</xs:documentation>
814 + </xs:annotation>
815 + </xs:attribute>
816 + <xs:attribute name="DirProperties" type="xs:string">
817 + <xs:annotation>
818 + <xs:documentation>
819 + References the Id attribute for a WebDirProperties element that specifies the security and access properties for this virtual directory.
820 + This attribute may not be specified if a WebDirProperties element is directly nested in this element.
821 + </xs:documentation>
822 + </xs:annotation>
823 + </xs:attribute>
824 + <xs:attribute name="WebApplication" type="xs:string">
825 + <xs:annotation>
826 + <xs:documentation>References the Id attribute for a WebApplication element that specifies web application settings for this virtual directory. If a WebApplication child is not specified, the virtual directory does not host web applications.</xs:documentation>
827 + </xs:annotation>
828 + </xs:attribute>
829 + </xs:complexType>
830 + </xs:element>
831 +
832 + <xs:element name="WebDir">
833 + <xs:annotation>
834 + <xs:appinfo>
835 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
836 + </xs:appinfo>
837 + <xs:documentation>Defines a subdirectory within an IIS web site. When this element is a child of WebSite, the web directory is defined within that web site. Otherwise the web directory must reference a WebSite element via the WebSite attribute.</xs:documentation>
838 + </xs:annotation>
839 + <xs:complexType>
840 + <xs:choice minOccurs="0" maxOccurs="unbounded">
841 + <xs:element ref="WebApplication" minOccurs="0" maxOccurs="1" />
842 + <xs:element ref="WebDirProperties" minOccurs="0" maxOccurs="1" />
843 + </xs:choice>
844 + <xs:attribute name="Id" use="required" type="xs:string"/>
845 + <xs:attribute name="WebSite" type="xs:string">
846 + <xs:annotation>
847 + <xs:documentation>References the Id attribute for a WebSite element in which this directory belongs. Required when this element is not a child of a WebSite element.</xs:documentation>
848 + </xs:annotation>
849 + </xs:attribute>
850 + <xs:attribute name="Path" type="xs:string" use="required">
851 + <xs:annotation>
852 + <xs:documentation>Specifies the name of this web directory.</xs:documentation>
853 + </xs:annotation>
854 + </xs:attribute>
855 + <xs:attribute name="DirProperties" type="xs:string">
856 + <xs:annotation>
857 + <xs:documentation>
858 + References the Id attribute for a WebDirProperties element that specifies the security and access properties for this web directory.
859 + This attribute may not be specified if a WebDirProperties element is directly nested in this element.
860 + </xs:documentation>
861 + </xs:annotation>
862 + </xs:attribute>
863 + </xs:complexType>
864 + </xs:element>
865 +
866 + <xs:element name="WebSite">
867 + <xs:annotation>
868 + <xs:appinfo>
869 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
870 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
871 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
872 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
873 + <xse:remarks>
874 + <html:dl>
875 + <html:dd>Nesting WebSite under a Component element will result in a WebSite being installed to the machine as the package is installed.</html:dd>
876 + <html:dd>
877 + Nesting WebSite under Product, Fragment, or Module
878 + results in a web site "locator" record being created in
879 + the IIsWebSite table. This means that the web site
880 + itself is neither installed nor uninstalled by the MSI
881 + package. It does make the database available for referencing
882 + from a WebApplication, WebVirtualDir or WebDir record. This allows an MSI to install
883 + WebApplications, WebVirtualDirs or WebDirs to already existing web sites on the machine.
884 + The install will fail if the web site does not exist in these cases.
885 + </html:dd>
886 + </html:dl>
887 + </xse:remarks>
888 + </xs:appinfo>
889 + <xs:documentation>IIs Web Site</xs:documentation>
890 + </xs:annotation>
891 + <xs:complexType>
892 + <xs:choice minOccurs="0" maxOccurs="unbounded">
893 + <xs:element ref="WebAddress" minOccurs="1" maxOccurs="unbounded"/>
894 + <xs:element ref="WebApplication" minOccurs="0" maxOccurs="1" />
895 + <xs:element ref="WebDirProperties" minOccurs="0" maxOccurs="1" />
896 + <xs:element ref="MimeMap" minOccurs="0" maxOccurs="unbounded"/>
897 + <xs:element ref="CertificateRef"/>
898 + <xs:element ref="HttpHeader"/>
899 + <xs:element ref="WebDir"/>
900 + <xs:element ref="WebError"/>
901 + <xs:element ref="WebFilter"/>
902 + <xs:element ref="WebVirtualDir"/>
903 + </xs:choice>
904 +
905 + <xs:attribute name="Id" use="required" type="xs:string">
906 + <xs:annotation>
907 + <xs:documentation>Identifier for the WebSite. Used within the MSI package only.</xs:documentation>
908 + </xs:annotation>
909 + </xs:attribute>
910 + <xs:attribute name="AutoStart" type="YesNoType">
911 + <xs:annotation>
912 + <xs:documentation>Specifies whether to automatically start the web site.</xs:documentation>
913 + </xs:annotation>
914 + </xs:attribute>
915 + <xs:attribute name="ConfigureIfExists" type="YesNoType">
916 + <xs:annotation>
917 + <xs:documentation>Specifies whether to configure the web site if it already exists. Note: This will not affect uninstall behavior. If the web site exists on uninstall, it will be removed.</xs:documentation>
918 + </xs:annotation>
919 + </xs:attribute>
920 + <xs:attribute name="ConnectionTimeout" type="xs:nonNegativeInteger">
921 + <xs:annotation>
922 + <xs:documentation>Sets the timeout value for connections in seconds.</xs:documentation>
923 + </xs:annotation>
924 + </xs:attribute>
925 + <xs:attribute name="Description" use="required" type="xs:string">
926 + <xs:annotation>
927 + <xs:documentation>This is the name of the web site that will show up in the IIS management console.</xs:documentation>
928 + </xs:annotation>
929 + </xs:attribute>
930 + <xs:attribute name="Directory" type="xs:string">
931 + <xs:annotation>
932 + <xs:documentation>Root directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions.</xs:documentation>
933 + </xs:annotation>
934 + </xs:attribute>
935 + <xs:attribute name="DirProperties" type="xs:string">
936 + <xs:annotation>
937 + <xs:documentation>
938 + References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory.
939 + This attribute may not be specified if a WebDirProperties element is directly nested in this element.
940 + </xs:documentation>
941 + </xs:annotation>
942 + </xs:attribute>
943 + <xs:attribute name="Sequence" type="xs:integer">
944 + <xs:annotation>
945 + <xs:documentation>Sequence that the web site is to be created in.</xs:documentation>
946 + </xs:annotation>
947 + </xs:attribute>
948 + <xs:attribute name="SiteId" type="xs:string">
949 + <xs:annotation>
950 + <xs:documentation>
951 + Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web
952 + sites in a web garden get the same site id. If a number is provided, the site id must be unique
953 + on all target machines. If "*" is used, the Description attribute will be hashed to create a unique
954 + value for the site id. This value must be a positive number or a "*" or a formatted value that resolves
955 + to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then
956 + the web site will be located using the WebAddress element associated with the web site.
957 + </xs:documentation>
958 + </xs:annotation>
959 + </xs:attribute>
960 + <xs:attribute name="StartOnInstall" type="YesNoType">
961 + <xs:annotation>
962 + <xs:documentation>Specifies whether to start the web site on install.</xs:documentation>
963 + </xs:annotation>
964 + </xs:attribute>
965 + <xs:attribute name="WebApplication" type="xs:string">
966 + <xs:annotation>
967 + <xs:documentation>Reference to a WebApplication that is to be installed as part of this web site.</xs:documentation>
968 + </xs:annotation>
969 + </xs:attribute>
970 + <xs:attribute name="WebLog" type="xs:string">
971 + <xs:annotation>
972 + <xs:documentation>Reference to WebLog definition.</xs:documentation>
973 + </xs:annotation>
974 + </xs:attribute>
975 + </xs:complexType>
976 + </xs:element>
977 +
978 + <xs:element name="WebLog">
979 + <xs:annotation>
980 + <xs:appinfo>
981 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
982 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
983 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
984 + </xs:appinfo>
985 + <xs:documentation>WebLog definition.</xs:documentation>
986 + </xs:annotation>
987 + <xs:complexType>
988 + <xs:attribute name="Id" use="required" type="xs:string">
989 + <xs:annotation>
990 + <xs:documentation>Identifier for the WebLog.</xs:documentation>
991 + </xs:annotation>
992 + </xs:attribute>
993 + <xs:attribute name="Type" use="required">
994 + <xs:simpleType>
995 + <xs:restriction base="xs:NMTOKEN">
996 + <xs:enumeration value="IIS">
997 + <xs:annotation>
998 + <xs:documentation>
999 + Microsoft IIS Log File Format
1000 + </xs:documentation>
1001 + </xs:annotation>
1002 + </xs:enumeration>
1003 + <xs:enumeration value="NCSA">
1004 + <xs:annotation>
1005 + <xs:documentation>
1006 + NCSA Common Log File Format
1007 + </xs:documentation>
1008 + </xs:annotation>
1009 + </xs:enumeration>
1010 + <xs:enumeration value="none">
1011 + <xs:annotation>
1012 + <xs:documentation>
1013 + Disables logging.
1014 + </xs:documentation>
1015 + </xs:annotation>
1016 + </xs:enumeration>
1017 + <xs:enumeration value="ODBC">
1018 + <xs:annotation>
1019 + <xs:documentation>
1020 + ODBC Logging
1021 + </xs:documentation>
1022 + </xs:annotation>
1023 + </xs:enumeration>
1024 + <xs:enumeration value="W3C">
1025 + <xs:annotation>
1026 + <xs:documentation>
1027 + W3C Extended Log File Format
1028 + </xs:documentation>
1029 + </xs:annotation>
1030 + </xs:enumeration>
1031 + </xs:restriction>
1032 + </xs:simpleType>
1033 + </xs:attribute>
1034 + </xs:complexType>
1035 + </xs:element>
1036 +
1037 + <xs:element name="WebServiceExtension">
1038 + <xs:annotation>
1039 + <xs:appinfo>
1040 + <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
1041 + </xs:appinfo>
1042 + <xs:documentation>The WebServiceExtension property is used by the Web server to determine whether a Web service extension is permitted to run.</xs:documentation>
1043 + </xs:annotation>
1044 + <xs:complexType>
1045 + <xs:attribute name="Id" use="required" type="xs:string"/>
1046 + <xs:attribute name="File" use="required" type="xs:string">
1047 + <xs:annotation>
1048 + <xs:documentation>Usually a Property that resolves to short file name path</xs:documentation>
1049 + </xs:annotation>
1050 + </xs:attribute>
1051 + <xs:attribute name="Description" type="xs:string">
1052 + <xs:annotation>
1053 + <xs:documentation>Description of the extension.</xs:documentation>
1054 + </xs:annotation>
1055 + </xs:attribute>
1056 + <xs:attribute name="Group" type="xs:string">
1057 + <xs:annotation>
1058 + <xs:documentation>String used to identify groups of extensions.</xs:documentation>
1059 + </xs:annotation>
1060 + </xs:attribute>
1061 + <xs:attribute name="Allow" use="required" type="YesNoType">
1062 + <xs:annotation>
1063 + <xs:documentation>Indicates if the extension is allowed or denied.</xs:documentation>
1064 + </xs:annotation>
1065 + </xs:attribute>
1066 + <xs:attribute name="UIDeletable" type="YesNoType">
1067 + <xs:annotation>
1068 + <xs:documentation>Indicates if the UI is allowed to delete the extension from the list of not. Default: Not deletable.</xs:documentation>
1069 + </xs:annotation>
1070 + </xs:attribute>
1071 + </xs:complexType>
1072 + </xs:element>
1073 +
1074 + <xs:simpleType name="PercentType">
1075 + <xs:annotation>
1076 + <xs:documentation>Values of this type are any integers between 0 and 100, inclusive.</xs:documentation>
1077 + </xs:annotation>
1078 + <xs:restriction base="xs:nonNegativeInteger">
1079 + <xs:maxInclusive value="100"/>
1080 + </xs:restriction>
1081 + </xs:simpleType>
1082 +
1083 + <xs:simpleType name="YesNoType">
1084 + <xs:annotation>
1085 + <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
1086 + </xs:annotation>
1087 + <xs:restriction base='xs:NMTOKEN'>
1088 + <xs:enumeration value="no"/>
1089 + <xs:enumeration value="yes"/>
1090 + </xs:restriction>
1091 + </xs:simpleType>
1092 +
1093 + <xs:simpleType name="YesNoDefaultType">
1094 + <xs:annotation>
1095 + <xs:documentation>Values of this type will either be "default", "yes", or "no".</xs:documentation>
1096 + </xs:annotation>
1097 + <xs:restriction base='xs:NMTOKEN'>
1098 + <xs:enumeration value="default"/>
1099 + <xs:enumeration value="no"/>
1100 + <xs:enumeration value="yes"/>
1101 + </xs:restriction>
1102 + </xs:simpleType>
1103 +
1104 +</xs:schema>
src/wixext/messages.cs new
+237
@@ -0,0 +1,237 @@
1 +//------------------------------------------------------------------------------
2 +// <auto-generated>
3 +// This code was generated by a tool.
4 +// Runtime Version:4.0.30319.42000
5 +//
6 +// Changes to this file may cause incorrect behavior and will be lost if
7 +// the code is regenerated.
8 +// </auto-generated>
9 +//------------------------------------------------------------------------------
10 +
11 +namespace WixToolset.Extensions
12 +{
13 + using System;
14 + using System.Reflection;
15 + using System.Resources;
16 + using WixToolset.Data;
17 +
18 +
19 + public class IIsErrorEventArgs : MessageEventArgs
20 + {
21 +
22 + private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
23 +
24 + public IIsErrorEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
25 + base(sourceLineNumbers, id, resourceName, messageArgs)
26 + {
27 + base.ResourceManager = resourceManager;
28 + }
29 + }
30 +
31 + public sealed class IIsErrors
32 + {
33 +
34 + private IIsErrors()
35 + {
36 + }
37 +
38 + public static MessageEventArgs MimeMapExtensionMissingPeriod(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
39 + {
40 + return new IIsErrorEventArgs(sourceLineNumbers, 5150, "IIsErrors_MimeMapExtensionMissingPeriod_1", elementName, attributeName, attributeValue);
41 + }
42 +
43 + public static MessageEventArgs IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
44 + {
45 + return new IIsErrorEventArgs(sourceLineNumbers, 5151, "IIsErrors_IllegalAttributeWithoutComponent_1", elementName, attributeName);
46 + }
47 +
48 + public static MessageEventArgs IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
49 + {
50 + return new IIsErrorEventArgs(sourceLineNumbers, 5152, "IIsErrors_IllegalElementWithoutComponent_1", elementName);
51 + }
52 +
53 + public static MessageEventArgs OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
54 + {
55 + return new IIsErrorEventArgs(sourceLineNumbers, 5153, "IIsErrors_OneOfAttributesRequiredUnderComponent_1", elementName, attributeName1, attributeName2, attributeName3, attributeName4);
56 + }
57 +
58 + public static MessageEventArgs WebSiteAttributeUnderWebSite(SourceLineNumber sourceLineNumbers, string elementName)
59 + {
60 + return new IIsErrorEventArgs(sourceLineNumbers, 5154, "IIsErrors_WebSiteAttributeUnderWebSite_1", elementName);
61 + }
62 +
63 + public static MessageEventArgs WebApplicationAlreadySpecified(SourceLineNumber sourceLineNumbers, string elementName)
64 + {
65 + return new IIsErrorEventArgs(sourceLineNumbers, 5155, "IIsErrors_WebApplicationAlreadySpecified_1", elementName);
66 + }
67 +
68 + public static MessageEventArgs IllegalCharacterInAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, char illegalCharacter)
69 + {
70 + return new IIsErrorEventArgs(sourceLineNumbers, 5156, "IIsErrors_IllegalCharacterInAttributeValue_1", elementName, attributeName, value, illegalCharacter);
71 + }
72 +
73 + public static MessageEventArgs DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
74 + {
75 + return new IIsErrorEventArgs(sourceLineNumbers, 5157, "IIsErrors_DeprecatedBinaryChildElement_1", elementName);
76 + }
77 +
78 + public static MessageEventArgs WebSiteNotFound(string webSiteDescription)
79 + {
80 + return new IIsErrorEventArgs(null, 5158, "IIsErrors_WebSiteNotFound_1", webSiteDescription);
81 + }
82 +
83 + public static MessageEventArgs InsufficientPermissionHarvestWebSite()
84 + {
85 + return new IIsErrorEventArgs(null, 5159, "IIsErrors_InsufficientPermissionHarvestWebSite_1");
86 + }
87 +
88 + public static MessageEventArgs CannotHarvestWebSite()
89 + {
90 + return new IIsErrorEventArgs(null, 5160, "IIsErrors_CannotHarvestWebSite_1");
91 + }
92 +
93 + public static MessageEventArgs RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
94 + {
95 + return new IIsErrorEventArgs(sourceLineNumbers, 5161, "IIsErrors_RequiredAttributeUnderComponent_1", elementName, attributeName);
96 + }
97 + }
98 +
99 + public class IIsWarningEventArgs : MessageEventArgs
100 + {
101 +
102 + private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
103 +
104 + public IIsWarningEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
105 + base(sourceLineNumbers, id, resourceName, messageArgs)
106 + {
107 + base.ResourceManager = resourceManager;
108 + }
109 + }
110 +
111 + public sealed class IIsWarnings
112 + {
113 +
114 + private IIsWarnings()
115 + {
116 + }
117 +
118 + public static MessageEventArgs EncounteredNullDirectoryForWebSite(string directory)
119 + {
120 + return new IIsWarningEventArgs(null, 5400, "IIsWarnings_EncounteredNullDirectoryForWebSite_1", directory);
121 + }
122 + }
123 +
124 + public class IIsVerboseEventArgs : MessageEventArgs
125 + {
126 +
127 + private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
128 +
129 + public IIsVerboseEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
130 + base(sourceLineNumbers, id, resourceName, messageArgs)
131 + {
132 + base.ResourceManager = resourceManager;
133 + }
134 + }
135 +
136 + public sealed class IIsVerboses
137 + {
138 +
139 + private IIsVerboses()
140 + {
141 + }
142 + }
143 +}
144 +
145 +/*
146 +<?xml version='1.0' encoding='utf-8'?>
147 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
148 +
149 +
150 +<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
151 + <Class Name="IIsErrors" ContainerName="IIsErrorEventArgs" BaseContainerName="MessageEventArgs">
152 + <Message Id="MimeMapExtensionMissingPeriod" Number="5150">
153 + <Instance>The {0}/@{1} attribute's value, '{2}', is not a valid mime map extension. It must begin with a period.
154 + <Parameter Type="System.String" Name="elementName" />
155 + <Parameter Type="System.String" Name="attributeName" />
156 + <Parameter Type="System.String" Name="attributeValue" />
157 + </Instance>
158 + </Message>
159 + <Message Id="IllegalAttributeWithoutComponent" Number="5151">
160 + <Instance>The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
161 + <Parameter Type="System.String" Name="elementName" />
162 + <Parameter Type="System.String" Name="attributeName" />
163 + </Instance>
164 + </Message>
165 + <Message Id="IllegalElementWithoutComponent" Number="5152">
166 + <Instance>The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
167 + <Parameter Type="System.String" Name="elementName" />
168 + </Instance>
169 + </Message>
170 + <Message Id="OneOfAttributesRequiredUnderComponent" Number="5153">
171 + <Instance>When nested under a Component, the {0} element must have one of the following attributes specified: {1}, {2}, {3} or {4}.
172 + <Parameter Type="System.String" Name="elementName" />
173 + <Parameter Type="System.String" Name="attributeName1" />
174 + <Parameter Type="System.String" Name="attributeName2" />
175 + <Parameter Type="System.String" Name="attributeName3" />
176 + <Parameter Type="System.String" Name="attributeName4" />
177 + </Instance>
178 + </Message>
179 + <Message Id="WebSiteAttributeUnderWebSite" Number="5154">
180 + <Instance>The {0}/@WebSite attribute cannot be specified when the {0} element is nested under a WebSite element.
181 + <Parameter Type="System.String" Name="elementName" />
182 + </Instance>
183 + </Message>
184 + <Message Id="WebApplicationAlreadySpecified" Number="5155">
185 + <Instance>The {0} element can have at most a single WebApplication specified. This can be either through the WebApplication attribute, or through a nested WebApplication element, but not both.
186 + <Parameter Type="System.String" Name="elementName" />
187 + </Instance>
188 + </Message>
189 + <Message Id="IllegalCharacterInAttributeValue" Number="5156">
190 + <Instance>
191 + The {0}/@{1} attribute's value, '{2}', is invalid. It cannot contain the character '{3}'.
192 + <Parameter Type="System.String" Name="elementName" />
193 + <Parameter Type="System.String" Name="attributeName" />
194 + <Parameter Type="System.String" Name="value" />
195 + <Parameter Type="System.Char" Name="illegalCharacter" />
196 + </Instance>
197 + </Message>
198 + <Message Id="DeprecatedBinaryChildElement" Number="5157">
199 + <Instance>The {0} element contains a deprecated child Binary element. Please move the Binary element under a Fragment, Module, or Product element and set the {0}/@BinaryKey attribute to the value of the Binary/@Id attribute.
200 + <Parameter Type="System.String" Name="elementName" />
201 + </Instance>
202 + </Message>
203 + <Message Id="WebSiteNotFound" Number="5158" SourceLineNumbers="no">
204 + <Instance>
205 + The web site '{0}' could not be found. Please check that the web site exists, and that it is spelled correctly (please note, you must use the correct case).
206 + <Parameter Type="System.String" Name="webSiteDescription" />
207 + </Instance>
208 + </Message>
209 + <Message Id="InsufficientPermissionHarvestWebSite" Number="5159" SourceLineNumbers="no">
210 + <Instance>
211 + Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated.
212 + </Instance>
213 + </Message>
214 + <Message Id="CannotHarvestWebSite" Number="5160" SourceLineNumbers="no">
215 + <Instance>
216 + Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility.
217 + </Instance>
218 + </Message>
219 + <Message Id="RequiredAttributeUnderComponent" Number="5161">
220 + <Instance>The {0}/@{1} attribute must be specified when the element has a Component as an ancestor.
221 + <Parameter Type="System.String" Name="elementName" />
222 + <Parameter Type="System.String" Name="attributeName" />
223 + </Instance>
224 + </Message>
225 + </Class>
226 + <Class Name="IIsWarnings" ContainerName="IIsWarningEventArgs" BaseContainerName="MessageEventArgs">
227 + <Message Id="EncounteredNullDirectoryForWebSite" Number="5400" SourceLineNumbers="no">
228 + <Instance>
229 + Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.
230 + <Parameter Type="System.String" Name="directory" />
231 + </Instance>
232 + </Message>
233 + </Class>
234 + <Class Name="IIsVerboses" ContainerName="IIsVerboseEventArgs" BaseContainerName="MessageEventArgs">
235 + </Class>
236 +</Messages>
237 +*/
\ No newline at end of file
src/wixext/tables.xml new
+304
@@ -0,0 +1,304 @@
1 +<?xml version="1.0" encoding="utf-8" ?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables">
6 + <tableDefinition name="Certificate" createSymbols="yes">
7 + <columnDefinition name="Certificate" type="string" length="72" primaryKey="yes" modularize="column"
8 + keyColumn="1" category="identifier" description="Identifier for the certificate in the package."/>
9 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
10 + category="identifier" description="Foreign key into the Component table used to determine install state"/>
11 + <columnDefinition name="Name" type="string" length="255"
12 + category="formatted" description="Name to be used for the Certificate."/>
13 + <columnDefinition name="StoreLocation" type="number" length="2"
14 + minValue="1" maxValue="2" description="Location of the target certificate store (CurrentUser == 1, LocalMachine == 2)"/>
15 + <columnDefinition name="StoreName" type="string" length="64"
16 + category="formatted" description="Name of the target certificate store"/>
17 + <columnDefinition name="Attributes" type="number" length="4"
18 + minValue="0" maxValue="2147483647" description="Attributes of the certificate"/>
19 + <columnDefinition name="Binary_" type="string" length="72" nullable="yes" modularize="column"
20 + keyTable="Binary" keyColumn="1" category="identifier" description="Identifier to Binary table containing certificate."/>
21 + <columnDefinition name="CertificatePath" type="string" length="0" nullable="yes" modularize="property"
22 + category="formatted" description="Property to path of certificate."/>
23 + <columnDefinition name="PFXPassword" type="string" length="0" nullable="yes" modularize="property"
24 + category="formatted" description="Hidden property to a pfx password"/>
25 + </tableDefinition>
26 + <tableDefinition name="CertificateHash" createSymbols="yes">
27 + <columnDefinition name="Certificate_" type="string" length="72" primaryKey="yes" modularize="column"
28 + keyColumn="1" category="identifier" description="Foreign key to certificate in Certificate table."/>
29 + <columnDefinition name="Hash" type="string" length="0" nullable="yes"
30 + category="text" description="Base64 encoded SHA1 hash of certificate populated at run-time."/>
31 + </tableDefinition>
32 + <tableDefinition name="IIsWebSiteCertificates">
33 + <columnDefinition name="Web_" type="string" length="72" primaryKey="yes" modularize="column"
34 + keyTable="IIsWebSite" keyColumn="1" category="identifier" description="The index into the IIsWebSite table."/>
35 + <columnDefinition name="Certificate_" type="string" length="72" primaryKey="yes" modularize="column"
36 + keyTable="Certificate" keyColumn="1" category="text" description="The index into the Certificate table."/>
37 + </tableDefinition>
38 + <tableDefinition name="IIsAppPool" createSymbols="yes">
39 + <columnDefinition name="AppPool" type="string" length="72" primaryKey="yes" modularize="column"
40 + category="identifier" description="Primary key, non-localized token for apppool"/>
41 + <columnDefinition name="Name" type="string" length="72" modularize="property"
42 + category="formatted" description="Name to be used for the IIs AppPool."/>
43 + <columnDefinition name="Component_" type="string" length="72" modularize="column" nullable="yes"
44 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the app pool"/>
45 + <columnDefinition name="Attributes" type="number" length="2"
46 + description="Attributes of the AppPool"/>
47 + <columnDefinition name="User_" type="string" length="72" nullable="yes" modularize="column"
48 + keyTable="User" keyColumn="1" category="identifier" description="User account to run the app pool as"/>
49 + <columnDefinition name="RecycleMinutes" type="number" length="2" nullable="yes"
50 + description="Number of minutes between recycling app pool"/>
51 + <columnDefinition name="RecycleRequests" type="number" length="2" nullable="yes"
52 + description="Number of requests between recycling app pool"/>
53 + <columnDefinition name="RecycleTimes" type="string" length="72" nullable="yes"
54 + description="Times to recycle app pool (comma delimited - i.e. 1:45,13:30)"/>
55 + <columnDefinition name="IdleTimeout" type="number" length="2" nullable="yes"
56 + description="Amount of idle time before shutting down"/>
57 + <columnDefinition name="QueueLimit" type="number" length="2" nullable="yes"
58 + description="Reject requests after queue gets how large"/>
59 + <columnDefinition name="CPUMon" type="string" length="72" nullable="yes"
60 + description="CPUMon is a comma delimeted list of the following format: &lt;percent CPU usage&gt;,&lt;refress minutes&gt;,&lt;Action&gt;. The values for Action are 1 (Shutdown) and 0 (No Action)."/>
61 + <columnDefinition name="MaxProc" type="number" length="2" nullable="yes"
62 + description="Maximum number of processes to use"/>
63 + <columnDefinition name="VirtualMemory" type="number" length="4" nullable="yes"
64 + description="Amount of virtual memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this field is 4,294,967 KB."/>
65 + <columnDefinition name="PrivateMemory" type="number" length="4" nullable="yes"
66 + description="Amount of private memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this field is 4,294,967 KB."/>
67 + <columnDefinition name="ManagedRuntimeVersion" type="string" length="72" nullable="yes"
68 + description="Specifies the .NET Framework version to be used by the application pool."/>
69 + <columnDefinition name="ManagedPipelineMode" type="string" length="72" nullable="yes"
70 + description="Specifies the request-processing mode that is used to process requests for managed content."/>
71 + </tableDefinition>
72 + <tableDefinition name="IIsMimeMap">
73 + <columnDefinition name="MimeMap" type="string" length="72" primaryKey="yes" modularize="column"
74 + category="identifier" description="Primary key, non-localized token for Mime Map definitions"/>
75 + <columnDefinition name="ParentType" type="number" length="2"
76 + set="1;2" description="Type of parent: 1=vdir 2=website"/>
77 + <columnDefinition name="ParentValue" type="string" length="72" modularize="column"
78 + category="identifier" description="Name of the parent value."/>
79 + <columnDefinition name="MimeType" type="string" length="72"
80 + category="text" description="Mime-type covered by the MimeMap."/>
81 + <columnDefinition name="Extension" type="string" length="72"
82 + category="text" description="Extension covered by the MimeMap."/>
83 + </tableDefinition>
84 + <tableDefinition name="IIsProperty">
85 + <columnDefinition name="Property" type="string" length="72" primaryKey="yes"
86 + category="identifier" description="Unique name of the IIsProperty"/>
87 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
88 + keyTable="Component" keyColumn="1" category="identifier" description="Component that the property is linked to" />
89 + <columnDefinition name="Attributes" type="number" length="2"
90 + description="Attributes of the IIsProperty (unused)"/>
91 + <columnDefinition name="Value" type="string" length="72" nullable="yes"
92 + description="Value of the IIsProperty"/>
93 + </tableDefinition>
94 + <tableDefinition name="IIsWebDirProperties" createSymbols="yes">
95 + <columnDefinition name="DirProperties" type="string" length="72" primaryKey="yes" modularize="column"
96 + category="identifier" description="Primary key, non-localized token for Web Properties"/>
97 + <columnDefinition name="Access" type="number" length="2" nullable="yes"
98 + description="Access rights to the web server"/>
99 + <columnDefinition name="Authorization" type="number" length="2" nullable="yes"
100 + description="Authorization policy to web server (anonymous access, NTLM, etc)"/>
101 + <columnDefinition name="AnonymousUser_" type="string" length="72" nullable="yes" modularize="column"
102 + keyTable="User" keyColumn="1" category="identifier" description="Foreign key, User used to log into database"/>
103 + <columnDefinition name="IIsControlledPassword" type="number" length="2" nullable="yes"
104 + set="0;1" description="Specifies whether IIs is allowed to set the AnonymousUser_ password"/>
105 + <columnDefinition name="LogVisits" type="number" length="2" nullable="yes"
106 + set="0;1" description="Specifies whether IIs tracks all access to the directory"/>
107 + <columnDefinition name="Index" type="number" length="2" nullable="yes"
108 + set="0;1" description="Specifies whether IIs searches the directory"/>
109 + <columnDefinition name="DefaultDoc" type="string" length="255" nullable="yes"
110 + category="text" description="Comma delimited list of file names to act as a default document"/>
111 + <columnDefinition name="AspDetailedError" type="number" length="2" nullable="yes"
112 + set="0;1" description="Specifies whether detailed ASP errors are sent to browser"/>
113 + <columnDefinition name="HttpExpires" type="string" length="255" nullable="yes" escapeIdtCharacters="yes"
114 + category="text" description="Value to set the HttpExpires attribute to for a Web Dir in the metabase"/>
115 + <columnDefinition name="CacheControlMaxAge" type="number" length="4" nullable="yes"
116 + description="Integer value specifying the cache control maximum age value."/>
117 + <columnDefinition name="CacheControlCustom" type="string" length="255" nullable="yes" escapeIdtCharacters="yes"
118 + category="text" description="Custom HTTP 1.1 cache control directives."/>
119 + <columnDefinition name="NoCustomError" type="number" length="2" nullable="yes"
120 + set="0;1" description="Specifies whether IIs will return custom errors for this directory."/>
121 + <columnDefinition name="AccessSSLFlags" type="number" length="2" nullable="yes"
122 + description="Specifies AccessSSLFlags IIS metabase property."/>
123 + <columnDefinition name="AuthenticationProviders" type="string" length="255" nullable="yes"
124 + category="text" description="Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others."/>
125 + </tableDefinition>
126 + <tableDefinition name="IIsWebAddress" createSymbols="yes">
127 + <columnDefinition name="Address" type="string" length="72" primaryKey="yes" modularize="column"
128 + category="identifier" description="Primary key, non-localized token"/>
129 + <columnDefinition name="Web_" type="string" length="72" modularize="column"
130 + keyTable="IIsWebSite" keyColumn="1" category="identifier" description="Foreign key referencing Web that uses the address."/>
131 + <columnDefinition name="IP" type="string" length="255" nullable="yes" modularize="property"
132 + category="text" description="String representing IP address (#.#.#.#) or NT machine name (fooserver)"/>
133 + <columnDefinition name="Port" type="string" length="72" modularize="property"
134 + category="formatted" description="Port web site listens on"/>
135 + <columnDefinition name="Header" type="string" length="255" nullable="yes"
136 + category="text" description="Special header information for the web site"/>
137 + <columnDefinition name="Secure" type="number" length="2" nullable="yes"
138 + set="0;1" description="Specifies whether SSL is used to communicate with web site"/>
139 + </tableDefinition>
140 + <tableDefinition name="IIsWebSite" createSymbols="yes">
141 + <columnDefinition name="Web" type="string" length="72" primaryKey="yes" modularize="column"
142 + category="identifier" description="Primary key, non-localized token"/>
143 + <columnDefinition name="Component_" type="string" length="72" nullable="yes" modularize="column"
144 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the web site"/>
145 + <columnDefinition name="Description" type="string" length="255" nullable="yes"
146 + category="formatted" description="Description displayed in IIS MMC applet"/>
147 + <columnDefinition name="ConnectionTimeout" type="number" length="2" nullable="yes"
148 + description="Time connection is maintained without activity (in seconds)"/>
149 + <columnDefinition name="Directory_" type="string" length="72" nullable="yes" modularize="column"
150 + keyTable="Directory" keyColumn="1" category="identifier" description="Foreign key referencing directory that the web site points at"/>
151 + <columnDefinition name="State" type="number" length="2" nullable="yes"
152 + set="0;1;2" description="Sets intial state of web site"/>
153 + <columnDefinition name="Attributes" type="number" length="2" nullable="yes"
154 + set="2" description="Control the install behavior of web site"/>
155 + <columnDefinition name="KeyAddress_" type="string" length="72" modularize="column"
156 + keyTable="IIsWebAddress" keyColumn="1" category="identifier" description="Foreign key referencing primary address for the web site"/>
157 + <columnDefinition name="DirProperties_" type="string" length="72" nullable="yes" modularize="column"
158 + keyTable="IIsWebDirProperties" keyColumn="1" category="identifier" description="Foreign key referencing possible security information for the web site"/>
159 + <columnDefinition name="Application_" type="string" length="72" nullable="yes" modularize="column"
160 + keyTable="IIsWebApplication" keyColumn="1" category="identifier" description="Foreign key referencing possible ASP application for the web site."/>
161 + <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
162 + description="Allows ordering of web site install"/>
163 + <columnDefinition name="Log_" type="string" length="72" nullable="yes" modularize="column"
164 + keyTable="IIsWebLog" keyColumn="1" description="Foreign key reference to IIsWebLog data"/>
165 + <columnDefinition name="Id" type="string" length="74" nullable="yes"
166 + category="formatted" description="Optional number or formatted value that resolves to number that acts as the WebSite Id."/>
167 + </tableDefinition>
168 + <tableDefinition name="IIsWebApplication" createSymbols="yes">
169 + <columnDefinition name="Application" type="string" length="72" primaryKey="yes" modularize="column"
170 + category="identifier" description="Primary key, non-localized token for ASP Application"/>
171 + <columnDefinition name="Name" type="localized" length="255" modularize="property"
172 + category="formatted" description="Name of application in IIS MMC applet"/>
173 + <columnDefinition name="Isolation" type="number" length="2"
174 + set="0;1;2" description="Isolation level for ASP Application: 0 == Low, 2 == Medium, 1 == High"/>
175 + <columnDefinition name="AllowSessions" type="number" length="2" nullable="yes"
176 + set="0;1" description="Specifies whether application may maintain session state"/>
177 + <columnDefinition name="SessionTimeout" type="number" length="2" nullable="yes"
178 + description="Time session state is maintained without user interaction"/>
179 + <columnDefinition name="Buffer" type="number" length="2" nullable="yes"
180 + set="0;1" description="Specifies whether application buffers its output"/>
181 + <columnDefinition name="ParentPaths" type="number" length="2" nullable="yes"
182 + set="0;1" description="What is this for anyway?"/>
183 + <columnDefinition name="DefaultScript" type="string" length="26" nullable="yes"
184 + category="text" set="VBScript;JScript" description="Default scripting language for ASP applications"/>
185 + <columnDefinition name="ScriptTimeout" type="number" length="2" nullable="yes"
186 + description="Time ASP application page is permitted to process"/>
187 + <columnDefinition name="ServerDebugging" type="number" length="2" nullable="yes"
188 + set="0;1" description="Specifies whether to allow ASP server-side script debugging"/>
189 + <columnDefinition name="ClientDebugging" type="number" length="2" nullable="yes"
190 + set="0;1" description="Specifies whether to allow ASP client-side script debugging"/>
191 + <columnDefinition name="AppPool_" type="string" length="72" nullable="yes" modularize="column"
192 + keyTable="IIsAppPool" keyColumn="1" category="identifier" description="App Pool this application should run under"/>
193 + </tableDefinition>
194 + <tableDefinition name="IIsWebApplicationExtension" createSymbols="yes">
195 + <columnDefinition name="Application_" type="string" length="72" primaryKey="yes" modularize="column"
196 + keyTable="IIsWebApplication" keyColumn="1" category="identifier" description="Foreign key referencing possible ASP application for the web site"/>
197 + <columnDefinition name="Extension" type="string" length="255" primaryKey="yes" nullable="yes"
198 + category="text" description="Primary key, Extension that should be registered for this ASP application"/>
199 + <columnDefinition name="Verbs" type="string" length="255" nullable="yes"
200 + category="text" description="Comma delimited list of HTTP verbs the extension should be registered with"/>
201 + <columnDefinition name="Executable" type="string" length="255" modularize="property"
202 + category="formatted" description="Path to extension (usually file property: [#file])"/>
203 + <columnDefinition name="Attributes" type="number" length="2" nullable="yes"
204 + set="1;4;5" description="Attributes for extension: 1 == Script, 4 == Check Path Info"/>
205 + </tableDefinition>
206 + <tableDefinition name="IIsFilter" createSymbols="yes">
207 + <columnDefinition name="Filter" type="string" length="72" primaryKey="yes" modularize="column"
208 + category="identifier" description="Primary key, non-localized token"/>
209 + <columnDefinition name="Name" type="string" length="72"
210 + description="Name of the ISAPI Filter in IIS"/>
211 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
212 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the filter"/>
213 + <columnDefinition name="Path" type="string" length="255" nullable="yes" modularize="property"
214 + category="formatted" description="Path to filter (usually file property: [#file])"/>
215 + <columnDefinition name="Web_" type="string" length="72" nullable="yes" modularize="column"
216 + keyTable="IIsWebSite" keyColumn="1" category="identifier" description="Foreign key referencing web site that loads the filter (NULL == global filter"/>
217 + <columnDefinition name="Description" type="string" length="255" nullable="yes"
218 + category="formatted" description="Description displayed in IIS MMC applet"/>
219 + <columnDefinition name="Flags" type="number" length="4"
220 + minValue="0" maxValue="2147483647" description="What do all these numbers mean?"/>
221 + <columnDefinition name="LoadOrder" type="number" length="2" nullable="yes"
222 + description="-1 == last in order, 0 == first in order, # == place in order"/>
223 + </tableDefinition>
224 + <tableDefinition name="IIsWebDir" createSymbols="yes">
225 + <columnDefinition name="WebDir" type="string" length="72" primaryKey="yes" modularize="column"
226 + category="identifier" description="Primary key, non-localized token"/>
227 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
228 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the virtual directory"/>
229 + <columnDefinition name="Web_" type="string" length="72" modularize="column"
230 + keyTable="IIsWebSite" keyColumn="1" category="identifier" description="Foreign key referencing web site that controls the virtual directory"/>
231 + <columnDefinition name="Path" type="string" length="255" modularize="property"
232 + category="formatted" description="Name of web directory displayed in IIS MMC applet"/>
233 + <columnDefinition name="DirProperties_" type="string" length="72" nullable="yes" modularize="column"
234 + keyTable="IIsWebDirProperties" keyColumn="1" category="identifier" description="Foreign key referencing possible security information for the virtual directory"/>
235 + <columnDefinition name="Application_" type="string" length="72" nullable="yes" modularize="column"
236 + keyTable="IIsWebApplication" keyColumn="1" category="identifier" description="Foreign key referencing possible ASP application for the virtual directory. This column is currently unused, but maintained for compatibility reasons."/>
237 + </tableDefinition>
238 + <tableDefinition name="IIsWebError">
239 + <columnDefinition name="ErrorCode" type="number" length="2" primaryKey="yes"
240 + minValue="400" maxValue="599" description="HTTP status code indicating error."/>
241 + <columnDefinition name="SubCode" type="number" length="4" primaryKey="yes"
242 + description="HTTP sub-status code indicating error."/>
243 + <columnDefinition name="ParentType" type="number" length="2" primaryKey="yes"
244 + set="1;2" description="Type of parent: 1=vdir, 2=web"/>
245 + <columnDefinition name="ParentValue" type="string" length="72" modularize="column" primaryKey="yes"
246 + category="identifier" description="Name of the parent value."/>
247 + <columnDefinition name="File" type="string" length="255" nullable="yes"
248 + category="formatted" description="Path to file for this custom error (usually file property: [#file]). Must be null if URL is not null."/>
249 + <columnDefinition name="URL" type="string" length="255" nullable="yes"
250 + category="formatted" description="URL for this custom error. Must be null if File is not null."/>
251 + </tableDefinition>
252 + <tableDefinition name="IIsHttpHeader" createSymbols="yes">
253 + <columnDefinition name="HttpHeader" type="string" length="72" primaryKey="yes" modularize="column"
254 + category="identifier" description="Primary key, non-localized token"/>
255 + <columnDefinition name="ParentType" type="number" length="2" primaryKey="yes"
256 + set="1;2" description="Type of parent: 1=vdir, 2=web"/>
257 + <columnDefinition name="ParentValue" type="string" length="72" primaryKey="yes" modularize="column"
258 + category="identifier" description="Name of the parent value."/>
259 + <columnDefinition name="Name" type="string" length="255"
260 + category="text" description="Name of the HTTP Header"/>
261 + <columnDefinition name="Value" type="string" length="255" nullable="yes"
262 + category="formatted" description="URL for this custom error. Must be null if File is not null."/>
263 + <columnDefinition name="Attributes" type="number" length="2"
264 + minValue="0" maxValue="0" description="Attributes for HTTP Header: none"/>
265 + <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
266 + description="Order to add the HTTP Headers."/>
267 + </tableDefinition>
268 + <tableDefinition name="IIsWebServiceExtension" createSymbols="yes">
269 + <columnDefinition name="WebServiceExtension" type="string" length="72" primaryKey="yes" modularize="column"
270 + category="identifier" description="Primary key, non-localized token"/>
271 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
272 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the WebServiceExtension handler"/>
273 + <columnDefinition name="File" type="string" length="255" modularize="property"
274 + category="formatted" description="Path to handler (usually file property: [#file])"/>
275 + <columnDefinition name="Description" type="localized" length="255" nullable="yes" modularize="property" escapeIdtCharacters="yes"
276 + category="formatted" description="Description displayed in WebServiceExtension Wizard"/>
277 + <columnDefinition name="Group" type="string" length="255" nullable="yes" modularize="property"
278 + category="formatted" description="String used to identify groups of extensions."/>
279 + <columnDefinition name="Attributes" type="number" length="1"
280 + minValue="0" maxValue="3" description="Attributes for WebServiceExtension: 1 = Allow, 2 = UIDeletable"/>
281 + </tableDefinition>
282 + <tableDefinition name="IIsWebVirtualDir" createSymbols="yes">
283 + <columnDefinition name="VirtualDir" type="string" length="72" primaryKey="yes" modularize="column"
284 + category="identifier" description="Primary key, non-localized token"/>
285 + <columnDefinition name="Component_" type="string" length="72" modularize="column"
286 + keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the virtual directory"/>
287 + <columnDefinition name="Web_" type="string" length="72" modularize="column"
288 + keyTable="IIsWebSite" keyColumn="1" category="identifier" description="Foreign key referencing web site that controls the virtual directory"/>
289 + <columnDefinition name="Alias" type="string" length="255" modularize="property"
290 + category="formatted" description="Name of virtual directory displayed in IIS MMC applet"/>
291 + <columnDefinition name="Directory_" type="string" length="72" modularize="column"
292 + keyTable="Directory" keyColumn="1" category="identifier" description="Foreign key referencing directory that the virtual directory points at"/>
293 + <columnDefinition name="DirProperties_" type="string" length="72" nullable="yes" modularize="column"
294 + keyTable="IIsWebDirProperties" keyColumn="1" category="identifier" description="Foreign key referencing possible security information for the virtual directory"/>
295 + <columnDefinition name="Application_" type="string" length="72" nullable="yes" modularize="column"
296 + keyTable="IIsWebApplication" keyColumn="1" category="identifier" description="Foreign key referencing possible ASP application for the virtual directory"/>
297 + </tableDefinition>
298 + <tableDefinition name="IIsWebLog" createSymbols="yes">
299 + <columnDefinition name="Log" type="string" length="72" primaryKey="yes" modularize="column"
300 + category="identifier" description="Primary key, non-localized token"/>
301 + <columnDefinition name="Format" type="string" length="255"
302 + category="text" description="Type of log format"/>
303 + </tableDefinition>
304 +</tableDefinitions>
src/wixlib/IIsExtension.wxs new
+59
@@ -0,0 +1,59 @@
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?include caerr.wxi ?>
7 +
8 + <Fragment>
9 + <Property Id="IISMAJORVERSION">
10 + <RegistrySearch Id="IIsMajorVersionSearch" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="MajorVersion" Type="raw" />
11 + </Property>
12 +
13 + <Property Id="IISMINORVERSION">
14 + <RegistrySearch Id="IIsMinorVersionSearch" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="MinorVersion" Type="raw" />
15 + </Property>
16 + </Fragment>
17 +
18 + <Fragment>
19 + <UI Id="WixIIsErrors">
20 + <Error Id="$(var.msierrIISCannotConnect)">!(loc.msierrIISCannotConnect)</Error>
21 + <Error Id="$(var.msierrIISFailedReadWebSite)">!(loc.msierrIISFailedReadWebSite)</Error>
22 + <Error Id="$(var.msierrIISFailedReadWebDirs)">!(loc.msierrIISFailedReadWebDirs)</Error>
23 + <Error Id="$(var.msierrIISFailedReadVDirs)">!(loc.msierrIISFailedReadVDirs)</Error>
24 + <Error Id="$(var.msierrIISFailedReadFilters)">!(loc.msierrIISFailedReadFilters)</Error>
25 + <Error Id="$(var.msierrIISFailedReadMimeMap)">!(loc.msierrIISFailedReadMimeMap)</Error>
26 + <Error Id="$(var.msierrIISFailedReadAppPool)">!(loc.msierrIISFailedReadAppPool)</Error>
27 + <Error Id="$(var.msierrIISFailedReadProp)">!(loc.msierrIISFailedReadProp)</Error>
28 + <Error Id="$(var.msierrIISFailedReadWebSvcExt)">!(loc.msierrIISFailedReadWebSvcExt)</Error>
29 + <Error Id="$(var.msierrIISFailedReadWebError)">!(loc.msierrIISFailedReadWebError)</Error>
30 + <Error Id="$(var.msierrIISFailedReadHttpHeader)">!(loc.msierrIISFailedReadHttpHeader)</Error>
31 +
32 + <Error Id="$(var.msierrIISFailedSchedTransaction)">!(loc.msierrIISFailedSchedTransaction)</Error>
33 + <Error Id="$(var.msierrIISFailedSchedInstallWebs)">!(loc.msierrIISFailedSchedInstallWebs)</Error>
34 + <Error Id="$(var.msierrIISFailedSchedInstallWebDirs)">!(loc.msierrIISFailedSchedInstallWebDirs)</Error>
35 + <Error Id="$(var.msierrIISFailedSchedInstallVDirs)">!(loc.msierrIISFailedSchedInstallVDirs)</Error>
36 + <Error Id="$(var.msierrIISFailedSchedInstallFilters)">!(loc.msierrIISFailedSchedInstallFilters)</Error>
37 + <Error Id="$(var.msierrIISFailedSchedInstallAppPool)">!(loc.msierrIISFailedSchedInstallAppPool)</Error>
38 + <Error Id="$(var.msierrIISFailedSchedInstallProp)">!(loc.msierrIISFailedSchedInstallProp)</Error>
39 + <Error Id="$(var.msierrIISFailedSchedInstallWebSvcExt)">!(loc.msierrIISFailedSchedInstallWebSvcExt)</Error>
40 +
41 + <Error Id="$(var.msierrIISFailedSchedUninstallWebs)">!(loc.msierrIISFailedSchedUninstallWebs)</Error>
42 + <Error Id="$(var.msierrIISFailedSchedUninstallWebDirs)">!(loc.msierrIISFailedSchedUninstallWebDirs)</Error>
43 + <Error Id="$(var.msierrIISFailedSchedUninstallVDirs)">!(loc.msierrIISFailedSchedUninstallVDirs)</Error>
44 + <Error Id="$(var.msierrIISFailedSchedUninstallFilters)">!(loc.msierrIISFailedSchedUninstallFilters)</Error>
45 + <Error Id="$(var.msierrIISFailedSchedUninstallAppPool)">!(loc.msierrIISFailedSchedUninstallAppPool)</Error>
46 + <Error Id="$(var.msierrIISFailedSchedUninstallProp)">!(loc.msierrIISFailedSchedUninstallProp)</Error>
47 + <Error Id="$(var.msierrIISFailedSchedUninstallWebSvcExt)">!(loc.msierrIISFailedSchedUninstallWebSvcExt)</Error>
48 +
49 + <Error Id="$(var.msierrIISFailedStartTransaction)">!(loc.msierrIISFailedStartTransaction)</Error>
50 + <Error Id="$(var.msierrIISFailedOpenKey)">!(loc.msierrIISFailedOpenKey)</Error>
51 + <Error Id="$(var.msierrIISFailedCreateKey)">!(loc.msierrIISFailedCreateKey)</Error>
52 + <Error Id="$(var.msierrIISFailedWriteData)">!(loc.msierrIISFailedWriteData)</Error>
53 + <Error Id="$(var.msierrIISFailedCreateApp)">!(loc.msierrIISFailedCreateApp)</Error>
54 + <Error Id="$(var.msierrIISFailedDeleteKey)">!(loc.msierrIISFailedDeleteKey)</Error>
55 + <Error Id="$(var.msierrIISFailedDeleteValue)">!(loc.msierrIISFailedDeleteValue)</Error>
56 + <Error Id="$(var.msierrIISFailedCommitInUse)">!(loc.msierrIISFailedCommitInUse)</Error>
57 + </UI>
58 + </Fragment>
59 +</Wix>
src/wixlib/IIsExtension_Platform.wxi new
+68
@@ -0,0 +1,68 @@
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 +
7 + <?include caSuffix.wxi ?>
8 + <Fragment>
9 + <UIRef Id="WixIIsErrors" />
10 + <UI>
11 + <ProgressText Action="ConfigureIIs$(var.Suffix)">!(loc.ConfigureIIs)</ProgressText>
12 + <ProgressText Action="ConfigureIIsExec$(var.DeferredSuffix)">!(loc.ConfigureIIsExec)</ProgressText>
13 + <ProgressText Action="StartMetabaseTransaction$(var.DeferredSuffix)">!(loc.StartMetabaseTransaction)</ProgressText>
14 + <ProgressText Action="RollbackMetabaseTransaction$(var.DeferredSuffix)">!(loc.RollbackMetabaseTransaction)</ProgressText>
15 + <ProgressText Action="CommitMetabaseTransaction$(var.DeferredSuffix)">!(loc.CommitMetabaseTransaction)</ProgressText>
16 + <ProgressText Action="WriteMetabaseChanges$(var.DeferredSuffix)">!(loc.WriteMetabaseChanges)</ProgressText>
17 +
18 + <ProgressText Action="ConfigureIIs7Exec$(var.DeferredSuffix)">!(loc.ConfigureIIs7Exec)</ProgressText>
19 + <ProgressText Action="StartIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.StartIIS7ConfigTransaction)</ProgressText>
20 + <ProgressText Action="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.RollbackIIS7ConfigTransaction)</ProgressText>
21 + <ProgressText Action="CommitIIS7ConfigTransaction$(var.DeferredSuffix)">!(loc.CommitIIS7ConfigTransaction)</ProgressText>
22 + <ProgressText Action="WriteIIS7ConfigChanges$(var.DeferredSuffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText>
23 + </UI>
24 +
25 + <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 + <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 + <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 + <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 + <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 + <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
31 +
32 + <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 + <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 + <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 + <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 + <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
37 +
38 + <InstallExecuteSequence>
39 + <Custom Action="ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom>
40 + </InstallExecuteSequence>
41 + </Fragment>
42 +
43 + <Fragment>
44 + <Binary Id="IIsSchedule$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scasched.dll" />
45 + <Binary Id="IIsExecute$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scaexec.dll" />
46 + </Fragment>
47 +
48 + <Fragment>
49 + <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
50 + <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
51 +
52 + <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
53 + <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
54 + <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
55 + <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
56 +
57 + <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
58 + <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
59 + <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
60 + <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
61 +
62 + <InstallExecuteSequence>
63 + <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom>
64 + <Custom Action="InstallCertificates$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT &gt; 400</Custom>
65 + </InstallExecuteSequence>
66 + </Fragment>
67 +
68 +</Include>
src/wixlib/IIsExtension_x86.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0" encoding="utf-8" ?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=x86 ?>
7 + <?include IIsExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/en-us.wxl new
+56
@@ -0,0 +1,56 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6 + <String Id="msierrIISCannotConnect" Overridable="yes">Cannot connect to Internet Information Server. ([2] [3] [4] [5])</String>
7 + <String Id="msierrIISFailedReadWebSite" Overridable="yes">Failed while processing WebSites. ([2] [3] [4] [5])</String>
8 + <String Id="msierrIISFailedReadWebDirs" Overridable="yes">Failed while processing WebDirs. ([2] [3] [4] [5])</String>
9 + <String Id="msierrIISFailedReadVDirs" Overridable="yes">Failed while processing WebVirtualDirs. ([2] [3] [4] [5])</String>
10 + <String Id="msierrIISFailedReadFilters" Overridable="yes">Failed while processing WebFilters. ([2] [3] [4] [5])</String>
11 + <String Id="msierrIISFailedReadMimeMap" Overridable="yes">Failed while processing MimeMaps. ([2] [3] [4] [5])</String>
12 + <String Id="msierrIISFailedReadAppPool" Overridable="yes">Failed while processing WebAppPools. ([2] [3] [4] [5])</String>
13 + <String Id="msierrIISFailedReadProp" Overridable="yes">Failed while processing WebProperties. ([2] [3] [4] [5])</String>
14 + <String Id="msierrIISFailedReadWebSvcExt" Overridable="yes">Failed while processing WebServiceExtensions. ([2] [3] [4] [5])</String>
15 + <String Id="msierrIISFailedReadWebError" Overridable="yes">Failed while processing WebErrors. ([2] [3] [4] [5])</String>
16 + <String Id="msierrIISFailedReadHttpHeader" Overridable="yes">Failed while processing HttpHeaders. ([2] [3] [4] [5])</String>
17 +
18 + <String Id="msierrIISFailedSchedTransaction" Overridable="yes">Failed to schedule transaction for changes to IIS. ([2] [3] [4] [5])</String>
19 + <String Id="msierrIISFailedSchedInstallWebs" Overridable="yes">Failed to schedule install of IIS Web Sites. ([2] [3] [4] [5])</String>
20 + <String Id="msierrIISFailedSchedInstallWebDirs" Overridable="yes">Failed to schedule install of IIS Web Directories. ([2] [3] [4] [5])</String>
21 + <String Id="msierrIISFailedSchedInstallVDirs" Overridable="yes">Failed to schedule install of IIS Virtual Directories. ([2] [3] [4] [5])</String>
22 + <String Id="msierrIISFailedSchedInstallFilters" Overridable="yes">Failed to schedule install of IIS Filters. ([2] [3] [4] [5])</String>
23 + <String Id="msierrIISFailedSchedInstallAppPool" Overridable="yes">Failed to schedule install of IIS AppPools. ([2] [3] [4] [5])</String>
24 + <String Id="msierrIISFailedSchedInstallProp" Overridable="yes">Failed to schedule install of IIS Properties. ([2] [3] [4] [5])</String>
25 + <String Id="msierrIISFailedSchedInstallWebSvcExt" Overridable="yes">Failed to schedule install of IIS Web Service Extensions. ([2] [3] [4] [5])</String>
26 +
27 + <String Id="msierrIISFailedSchedUninstallWebs" Overridable="yes">Failed to schedule uninstall of IIS Web Sites. ([2] [3] [4] [5])</String>
28 + <String Id="msierrIISFailedSchedUninstallWebDirs" Overridable="yes">Failed to schedule uninstall of IIS Web Directories. ([2] [3] [4] [5])</String>
29 + <String Id="msierrIISFailedSchedUninstallVDirs" Overridable="yes">Failed to schedule uninstall of IIS Virtual Directories. ([2] [3] [4] [5])</String>
30 + <String Id="msierrIISFailedSchedUninstallFilters" Overridable="yes">Failed to schedule uninstall of IIS Filters. ([2] [3] [4] [5])</String>
31 + <String Id="msierrIISFailedSchedUninstallAppPool" Overridable="yes">Failed to schedule uninstall of IIS AppPools. ([2] [3] [4] [5])</String>
32 + <String Id="msierrIISFailedSchedUninstallProp" Overridable="yes">Failed to schedule uninstall of IIS Properties. ([2] [3] [4] [5])</String>
33 + <String Id="msierrIISFailedSchedUninstallWebSvcExt" Overridable="yes">Failed to schedule uninstall of IIS Web Service Extensions. ([2] [3] [4] [5])</String>
34 +
35 + <String Id="msierrIISFailedStartTransaction" Overridable="yes">Failed to start IIS transaction. ([2] [3] [4] [5])</String>
36 + <String Id="msierrIISFailedOpenKey" Overridable="yes">Failed to open metabase key. ([2] [3] [4] [5])</String>
37 + <String Id="msierrIISFailedCreateKey" Overridable="yes">Failed to create metabase key. ([2] [3] [4] [5])</String>
38 + <String Id="msierrIISFailedWriteData" Overridable="yes">Failed to write data to metabase key. ([2] [3] [4] [5])</String>
39 + <String Id="msierrIISFailedCreateApp" Overridable="yes">Failed to create web application. ([2] [3] [4] [5])</String>
40 + <String Id="msierrIISFailedDeleteKey" Overridable="yes">Failed to delete metabase key. ([2] [3] [4] [5])</String>
41 + <String Id="msierrIISFailedDeleteValue" Overridable="yes">Failed to delete metabase value. ([2] [3] [4] [5])</String>
42 + <String Id="msierrIISFailedCommitInUse" Overridable="yes">Failed to commit IIS transaction due to a sharing violation. Some other application may be configuring IIS.</String>
43 +
44 + <String Id="ConfigureIIs" Overridable="yes">Configuring IIS</String>
45 + <String Id="ConfigureIIsExec" Overridable="yes">Executing IIS Configuration</String>
46 + <String Id="StartMetabaseTransaction" Overridable="yes">Starting IIS Metabase Transaction</String>
47 + <String Id="RollbackMetabaseTransaction" Overridable="yes">Rolling back IIS Metabase Transaction</String>
48 + <String Id="CommitMetabaseTransaction" Overridable="yes">Committing IIS Metabase Transaction</String>
49 + <String Id="WriteMetabaseChanges" Overridable="yes">Installing Metabase Keys and Values</String>
50 +
51 + <String Id="ConfigureIIs7Exec" Overridable="yes">Configuring IIS</String>
52 + <String Id="StartIIS7ConfigTransaction" Overridable="yes">Starting IIS Config Transaction</String>
53 + <String Id="RollbackIIS7ConfigTransaction" Overridable="yes">Rolling back IIS Config Transaction</String>
54 + <String Id="CommitIIS7ConfigTransaction" Overridable="yes">Committing IIS Config Transaction</String>
55 + <String Id="WriteIIS7ConfigChanges" Overridable="yes">Installing Config Keys and Values</String>
56 +</WixLocalization>
src/wixlib/ja-jp.wxl new
+48
@@ -0,0 +1,48 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<WixLocalization Culture="ja-jp" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6 + <String Id="msierrIISCannotConnect" Overridable="yes">IISへ接続できません。 ([2] [3] [4] [5])</String>
7 + <String Id="msierrIISFailedReadWebSite" Overridable="yes">ウェブ サイト処理中に失敗しました。 ([2] [3] [4] [5])</String>
8 + <String Id="msierrIISFailedReadWebDirs" Overridable="yes">ウェブ ディレクトリ処理中に失敗しました。 ([2] [3] [4] [5])</String>
9 + <String Id="msierrIISFailedReadVDirs" Overridable="yes">ウェブ仮想ディレクトリ処理中に失敗しました。 ([2] [3] [4] [5])</String>
10 + <String Id="msierrIISFailedReadFilters" Overridable="yes">ウェブ フィルタ処理中に失敗しました。 ([2] [3] [4] [5])</String>
11 + <String Id="msierrIISFailedReadMimeMap" Overridable="yes">MIME マップ処理中に失敗しました。 ([2] [3] [4] [5])</String>
12 + <String Id="msierrIISFailedReadAppPool" Overridable="yes">ウェブ アプリケーション プール処理中に失敗しました。 ([2] [3] [4] [5])</String>
13 + <String Id="msierrIISFailedReadProp" Overridable="yes">ウェブ プロパティ処理中に失敗しました。 ([2] [3] [4] [5])</String>
14 + <String Id="msierrIISFailedReadWebSvcExt" Overridable="yes">ウェブ サービス拡張処理中に失敗しました。 ([2] [3] [4] [5])</String>
15 + <String Id="msierrIISFailedReadWebError" Overridable="yes">ウェブ エラー処理中に失敗しました。 ([2] [3] [4] [5])</String>
16 + <String Id="msierrIISFailedReadHttpHeader" Overridable="yes">HTTP ヘッダ処理中に失敗しました。 ([2] [3] [4] [5])</String>
17 +
18 + <String Id="msierrIISFailedSchedTransaction" Overridable="yes">IIS 変更トランザクションのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
19 + <String Id="msierrIISFailedSchedInstallWebs" Overridable="yes">IIS ウェブ サイト インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
20 + <String Id="msierrIISFailedSchedInstallWebDirs" Overridable="yes">IIS ウェブ ディレクトリ インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
21 + <String Id="msierrIISFailedSchedInstallVDirs" Overridable="yes">IIS 仮想ディレクトリ インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
22 + <String Id="msierrIISFailedSchedInstallFilters" Overridable="yes">IIS フィルタ インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
23 + <String Id="msierrIISFailedSchedInstallAppPool" Overridable="yes">IIS アプリケーション プール インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
24 + <String Id="msierrIISFailedSchedInstallProp" Overridable="yes">IIS プロパティ インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
25 + <String Id="msierrIISFailedSchedInstallWebSvcExt" Overridable="yes">IIS ウェブ サービス拡張インストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
26 +
27 + <String Id="msierrIISFailedSchedUninstallWebs" Overridable="yes">IISウェブ サイト アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
28 + <String Id="msierrIISFailedSchedUninstallWebDirs" Overridable="yes">IIS ウェブ ディレクトリ アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
29 + <String Id="msierrIISFailedSchedUninstallVDirs" Overridable="yes">IIS 仮想ディレクトリ アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
30 + <String Id="msierrIISFailedSchedUninstallFilters" Overridable="yes">IIS フィルタ アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
31 + <String Id="msierrIISFailedSchedUninstallAppPool" Overridable="yes">IIS アプリケーション プール アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
32 + <String Id="msierrIISFailedSchedUninstallProp" Overridable="yes">IIS プロパティ アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
33 + <String Id="msierrIISFailedSchedUninstallWebSvcExt" Overridable="yes">IIS ウェブ サービス拡張アンインストールのスケジューリングに失敗しました。 ([2] [3] [4] [5])</String>
34 +
35 + <String Id="msierrIISFailedStartTransaction" Overridable="yes">IIS トランザクション開始に失敗しました。 ([2] [3] [4] [5])</String>
36 + <String Id="msierrIISFailedOpenKey" Overridable="yes">メタベース キーのオープンに失敗しました。 ([2] [3] [4] [5])</String>
37 + <String Id="msierrIISFailedCreateKey" Overridable="yes">メタベース キーの作成に失敗しました。 ([2] [3] [4] [5])</String>
38 + <String Id="msierrIISFailedWriteData" Overridable="yes">メタベース キーの書き込みに失敗しました。 ([2] [3] [4] [5])</String>
39 + <String Id="msierrIISFailedCreateApp" Overridable="yes">ウェブ アプリケーションの作成に失敗しました。 ([2] [3] [4] [5])</String>
40 + <String Id="msierrIISFailedDeleteKey" Overridable="yes">メタベース キーの削除に失敗しました。 ([2] [3] [4] [5])</String>
41 + <String Id="msierrIISFailedDeleteValue" Overridable="yes">メタベース値の削除に失敗しました。 ([2] [3] [4] [5])</String>
42 +
43 + <String Id="ConfigureIIs" Overridable="yes">IIS を構成しています</String>
44 + <String Id="StartMetabaseTransaction" Overridable="yes">IIS メタベース トランザクションを開始しています</String>
45 + <String Id="RollbackMetabaseTransaction" Overridable="yes">IIS メタベース トランザクションをロールバックしています</String>
46 + <String Id="CommitMetabaseTransaction" Overridable="yes">IIS メタベース トランザクションを確定しています</String>
47 + <String Id="WriteMetabaseChanges" Overridable="yes">IIS メタベース キーと値をインストールしています</String>
48 +</WixLocalization>
src/wixlib/pt-br.wxl new
+51
@@ -0,0 +1,51 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<WixLocalization Culture="pt-br" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6 + <String Id="msierrIISCannotConnect" Overridable="yes">Não foi possível conectar no Internet Information Server. ([2] [3] [4] [5])</String>
7 + <String Id="msierrIISFailedReadWebSite" Overridable="yes">Erro ao processar WebSites. ([2] [3] [4] [5])</String>
8 + <String Id="msierrIISFailedReadWebDirs" Overridable="yes">Erro ao processar WebDirs. ([2] [3] [4] [5])</String>
9 + <String Id="msierrIISFailedReadVDirs" Overridable="yes">Erro ao processar WebVirtualDirs. ([2] [3] [4] [5])</String>
10 + <String Id="msierrIISFailedReadFilters" Overridable="yes">Erro ao processar WebFilters. ([2] [3] [4] [5])</String>
11 + <String Id="msierrIISFailedReadMimeMap" Overridable="yes">Erro ao processar MimeMaps. ([2] [3] [4] [5])</String>
12 + <String Id="msierrIISFailedReadAppPool" Overridable="yes">Erro ao processar WebAppPools. ([2] [3] [4] [5])</String>
13 + <String Id="msierrIISFailedReadProp" Overridable="yes">Erro ao processar WebProperties. ([2] [3] [4] [5])</String>
14 + <String Id="msierrIISFailedReadWebSvcExt" Overridable="yes">Erro ao processar WebServiceExtensions. ([2] [3] [4] [5])</String>
15 + <String Id="msierrIISFailedReadWebError" Overridable="yes">Erro ao processar WebErrors. ([2] [3] [4] [5])</String>
16 + <String Id="msierrIISFailedReadHttpHeader" Overridable="yes">Erro ao processar HttpHeaders. ([2] [3] [4] [5])</String>
17 + <String Id="msierrIISFailedSchedTransaction" Overridable="yes">Erro ao agendar transação para alterações no IIS. ([2] [3] [4] [5])</String>
18 + <String Id="msierrIISFailedSchedInstallWebs" Overridable="yes">Erro ao agendar instalação de IIS Web Sites. ([2] [3] [4] [5])</String>
19 + <String Id="msierrIISFailedSchedInstallWebDirs" Overridable="yes">Erro ao agendar instalação de IIS Web Directories. ([2] [3] [4] [5])</String>
20 + <String Id="msierrIISFailedSchedInstallVDirs" Overridable="yes">Erro ao agendar instalação de IIS Virtual Directories. ([2] [3] [4] [5])</String>
21 + <String Id="msierrIISFailedSchedInstallFilters" Overridable="yes">Erro ao agendar instalação de IIS Filters. ([2] [3] [4] [5])</String>
22 + <String Id="msierrIISFailedSchedInstallAppPool" Overridable="yes">Erro ao agendar instalação de IIS AppPools. ([2] [3] [4] [5])</String>
23 + <String Id="msierrIISFailedSchedInstallProp" Overridable="yes">Erro ao agendar instalação de IIS Properties. ([2] [3] [4] [5])</String>
24 + <String Id="msierrIISFailedSchedInstallWebSvcExt" Overridable="yes">Erro ao agendar instalação de IIS Web Service Extensions. ([2] [3] [4] [5])</String>
25 + <String Id="msierrIISFailedSchedUninstallWebs" Overridable="yes">Erro ao agendar desinstalação de IIS Web Sites. ([2] [3] [4] [5])</String>
26 + <String Id="msierrIISFailedSchedUninstallWebDirs" Overridable="yes">Erro ao agendar desinstalação de IIS Web Directories. ([2] [3] [4] [5])</String>
27 + <String Id="msierrIISFailedSchedUninstallVDirs" Overridable="yes">Erro ao agendar desinstalação de IIS Virtual Directories. ([2] [3] [4] [5])</String>
28 + <String Id="msierrIISFailedSchedUninstallFilters" Overridable="yes">Erro ao agendar desinstalação de IIS Filters. ([2] [3] [4] [5])</String>
29 + <String Id="msierrIISFailedSchedUninstallAppPool" Overridable="yes">Erro ao agendar desinstalação de IIS AppPools. ([2] [3] [4] [5])</String>
30 + <String Id="msierrIISFailedSchedUninstallProp" Overridable="yes">Erro ao agendar desinstalação de IIS Properties. ([2] [3] [4] [5])</String>
31 + <String Id="msierrIISFailedSchedUninstallWebSvcExt" Overridable="yes">Erro ao agendar desinstalação de IIS Web Service Extensions. ([2] [3] [4] [5])</String>
32 + <String Id="msierrIISFailedStartTransaction" Overridable="yes">Erro ao iniciar transação do IIS . ([2] [3] [4] [5])</String>
33 + <String Id="msierrIISFailedOpenKey" Overridable="yes">Erro ao abrir metabase key. ([2] [3] [4] [5])</String>
34 + <String Id="msierrIISFailedCreateKey" Overridable="yes">Erro ao criar metabase key. ([2] [3] [4] [5])</String>
35 + <String Id="msierrIISFailedWriteData" Overridable="yes">Erro ao escrever dados na metabase key. ([2] [3] [4] [5])</String>
36 + <String Id="msierrIISFailedCreateApp" Overridable="yes">Erro ao criar aplicação Web. ([2] [3] [4] [5])</String>
37 + <String Id="msierrIISFailedDeleteKey" Overridable="yes">Erro ao excluir metabase key. ([2] [3] [4] [5])</String>
38 + <String Id="msierrIISFailedDeleteValue" Overridable="yes">Erro ao excluir valor da metabase. ([2] [3] [4] [5])</String>
39 + <String Id="msierrIISFailedCommitInUse" Overridable="yes">Erro ao fazer commit de transação IIS por violação de compartilhamento. Alguma outra aplicação pode estar tentando configurar o ISS ao mesmo tempo.</String>
40 + <String Id="ConfigureIIs" Overridable="yes">Configurando IIS</String>
41 + <String Id="ConfigureIIsExec" Overridable="yes">Executando Configurações do IIS</String>
42 + <String Id="StartMetabaseTransaction" Overridable="yes">Iniciando Transação de Metabase do IIS</String>
43 + <String Id="RollbackMetabaseTransaction" Overridable="yes">Cancelando Transação de Metabase do IIS</String>
44 + <String Id="CommitMetabaseTransaction" Overridable="yes">Efetivando Transação de Metabase do IIS</String>
45 + <String Id="WriteMetabaseChanges" Overridable="yes">Instalando Chaves e Valores de Metabase do IIS</String>
46 + <String Id="ConfigureIIs7Exec" Overridable="yes">Configurando IIS</String>
47 + <String Id="StartIIS7ConfigTransaction" Overridable="yes">Iniciando Transação de Configuração do IIS</String>
48 + <String Id="RollbackIIS7ConfigTransaction" Overridable="yes">Cancelando Transação de Configuração do IIS</String>
49 + <String Id="CommitIIS7ConfigTransaction" Overridable="yes">Efetivando Transação de Configuração do IIS</String>
50 + <String Id="WriteIIS7ConfigChanges" Overridable="yes">Instalando Chaves e Valores de Configurações do IIS</String>
51 +</WixLocalization>