-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathweb.config
190 lines (155 loc) · 11.1 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<appSettings>
<add key="DebugLoggingEnabled" value="true"/>
<add key="LogPath" value="~/App_Data/WebDav/Logs"/>
<add key="RepositoryPath" value="~/App_Data/WebDav/Storage" />
<!--
By default locks and custom properties are stored in Alternate Data Streams (on Windows) or in Extended Attributes (on Linux and Mac),
together with a file. If ADS/Extended Attributes are not supported, this sample will try to store locks and custom properties in system temp folder.
To specify a location where the locks and custom properties should be stored uncomment the following attribute and specify the folder path.
Every attribute will be stored in a separate file under this folder in this case.
-->
<!-- <add key="AttrStoragePath" value="~/App_Data/WebDav/Attributes/" /> -->
<!--
File system search provider. This provider is available on Windows Vista and later versions as well as on Window Server 2008.
It is not available on Web-editions of Windows Server OS by default.
To get search results file system indexing on the folder that contains documents (storage folder) must be enabled.
To find how to enable indexing follow this link: http://windows.microsoft.com/en-us/windows/improve-windows-searches-using-index-faq
-->
<add key="WindowsSearchProvider" value="Provider=Search.CollatorDSO;Extended Properties="Application=Windows"" />
</appSettings>
<!--
It is recommended to run your WebDAV Server in Integrated mode (Available for IIS 7.x and later and IIS Express only). It provides
improved performance comparing to Classic mode. The Visual Studio ASP.NET Development Server can run in Classic mode only.
In case of IIS 6 and IIS 5.1, to allow folders with 'bin', 'App_code', 'App_Data', etc names and files with 'web.config' name
to be created in your storage, the aspnet_filter.dll mapping must be deleted at server level.
-->
<system.web>
<httpHandlers>
<!--
As soon as entire website is dedicated to WebDAV and there are no any ASP.NET web pages, services, etc we can remove
all handlers here. If you wish to host your WebDAV server and ASP.NET/MVC website on the same virtual host use "Add WebDAV
Server Implementation" wizard in your ASP.NET/MVC project or web site context menu.
-->
<clear />
<!--
This handler processes all WebDAV requests.
This WebDAV config section is used in application pool Classic mode.
In case of IIS 6 and IIS 5.1 the wildcard map must be configured in IIS.
-->
<add verb="*" path="*" type="WebDAVServer.FileSystemStorage.AspNet.DavHandler, WebDAVServer.FileSystemStorage.AspNet" />
</httpHandlers>
<httpModules>
<!-- As all files are stored in a storage there is no need to verify permissions against Windows ACL using FileAuthorization module. -->
<remove name="FileAuthorization" />
<!--
This module implements notifications to clients using web sockets.
Is used to refresh files list when files or folders are created, updated, deleted, copied, moved, locked, etc.
-->
<add name="WebSocketsHttpModule" type="WebDAVServer.FileSystemStorage.AspNet.WebSocketsHttpModule, WebDAVServer.FileSystemStorage.AspNet"/>
<!--
This module enables unbuffered PUT upload if ASP.NET 2.0 pool or VS Dev Server is used. It is required if you are implementing
resumable upload interfaces. Without this module, if ASP.NET 2.0 pool or VS Dev Server is used, the file will be first saved to
temporary ASP.NET upload folder, only when entire file is uploaded it becomes available for .NET user code and WebDAV Engine.
This module also improves upload performance for ASP.NET 2.0 pool regardless of resumable upload implementation.
This module is not required if ASP.NET 4.0 pool or later version is used and is ignored in this case.
This WebDAV config section is used in application pool Classic mode.
-->
<add name="ITHitPutUploadProgressAndResumeModule" type="ITHit.WebDAV.Server.ResumableUpload.PutUploadProgressAndResumeModule, ITHit.Server.Web" />
</httpModules>
<!--
Maximum upload file segment size in Kb, max 2097151 (2Gb) for asp.net.
To allow '&' and '%' in ASP.NET 4.x set the httpRuntime@requestPathInvalidCharacters="". Note that
Microsoft Windows Shell (Miniredirector/Web Folders) does not support '%' in WebDAV item names.
To allow trailing dots ('.') in ASP.NET 4.x set httpRuntime@relaxedUrlToFileSystemMapping="true".
-->
<httpRuntime executionTimeout="2400" maxRequestLength="2097151" requestPathInvalidCharacters="" relaxedUrlToFileSystemMapping="true" targetFramework="4.6" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" />
</authorization>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<compilation targetFramework="4.6" debug="true"/>
</system.web>
<system.webServer>
<handlers>
<!--
As soon as this folder is dedicated to WebDAV and there are no any ASP.NET web pages, services, etc we can remove
all handlers here.
-->
<clear />
<!-- Used only in IIS 7.x and later in Classic mode in 32-bit application if ASP.NET 2.0 pool is used -->
<add name="aspnet_isapi 32-bit ASP.NET 2.0" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<!-- Used only in IIS 7.x and later in Classic mode in 64-bit application if ASP.NET 2.0 pool is used -->
<add name="aspnet_isapi 64-bit ASP.NET 2.0" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<!-- Used only in IIS 7.x and later in Classic mode in 32-bit application if ASP.NET 4.0 pool is used -->
<add name="aspnet_isapi 32-bit ASP.NET 4.0" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<!-- Used only in IIS 7.x and later in Classic mode in 64-bit application if ASP.NET 4.0 pool is used -->
<add name="aspnet_isapi 64-bit ASP.NET 4.0" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
<!-- Used only in IIS 7.x and later in Integrated mode. In Classic mode system.web\httpHandlers section is used. -->
<add name="My WebDAV Handler" path="*" verb="*" type="WebDAVServer.FileSystemStorage.AspNet.DavHandler, WebDAVServer.FileSystemStorage.AspNet" preCondition="integratedMode" />
</handlers>
<!-- Used only in Integrated mode. In Classic mode system.web\httpModules section is used. -->
<modules>
<!-- As all files are stored in a storage there is no need to verify permissions against Windows ACL using FileAuthorization module. -->
<remove name="FileAuthorization" />
<!--
This module implements notifications to clients using web sockets.
Is used to refresh files list when files or folders are created, updated, deleted, copied, moved, locked, etc.
-->
<add name="WebSocketsHttpModule" type="WebDAVServer.FileSystemStorage.AspNet.WebSocketsHttpModule, WebDAVServer.FileSystemStorage.AspNet"/>
<!--
This module enables unbuffered PUT upload if ASP.NET 2.0 pool or VS Dev Server is used. It is required if you are implementing
resumable upload interfaces. Without this module, if ASP.NET 2.0 pool or VS Dev Server is used, the file will be first saved to
temporary ASP.NET upload folder, only when entire file is uploaded it becomes available for .NET user code and WebDAV Engine.
This module also improves upload performance for ASP.NET 2.0 pool regardless of resumable upload implementation.
This module is not required if ASP.NET 4.0 pool or later version is used and is ignored in this case.
This WebDAV config section is used in IIS 7.x and later Integrated mode only, no wildcard map configuration is required.
-->
<add name="ITHitPutUploadProgressAndResumeModule" type="ITHit.WebDAV.Server.ResumableUpload.PutUploadProgressAndResumeModule, ITHit.Server.Web" />
<!-- Disables Microsoft IIS 7.x and later WebDAV in Integrated mode. It must be disabled for the engine to function properly. -->
<remove name="WebDAVModule" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
<!-- Used in both Integrated and Classic mode -->
<security>
<!--
As all files are stored in a storage there is no need in additional protection.
* To allow '+' in item names the allowDoubleEscaping attribute is set to 'true'.
* To allow '&' and '%' in ASP.NET 2.0, IIS 7.x and later the "VerificationCompatibility"= dword:00000001 must be set under the
key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET
* To allow '&' and '%' in ASP.NET 4.x set the configuration\system.web\httpRuntime@requestPathInvalidCharacters="".
* To allow trailing dots ('.') in ASP.NET 4.x set httpRuntime@relaxedUrlToFileSystemMapping="true".
Note that Microsoft Windows Shell (Miniredirector/Web Folders) does not support '%' in WebDAV item names.
-->
<requestFiltering allowDoubleEscaping="true">
<!-- Allow all files with 'web.config' name. -->
<fileExtensions>
<clear />
</fileExtensions>
<!-- Allow all folders with 'bin', 'App_code', 'App_Data', etc names. -->
<hiddenSegments>
<clear />
</hiddenSegments>
<!-- Maximum upload file segment size in bytes is 2147483648 (2Gb) for IIS 7.x and later / asp.net. -->
<requestLimits maxAllowedContentLength="2147483648"/>
</requestFiltering>
</security>
<!--
Enables custom protocol installers download. Required if WebDAV Ajax Library or Ajax File Browser are hosted on
this website. By default MIME map is not defined in IIS for .pkg and .deb files, 'HTTP Error 404.3 - Not Found' is
returned by IIS if these file types are requested.
.msi and .gz MIME maps are defined in IIS by default, uncomment the lines below if needed.
-->
<staticContent>
<mimeMap fileExtension=".pkg" mimeType="application/octet-stream" />
<mimeMap fileExtension=".deb" mimeType="application/octet-stream" />
<!-- <mimeMap fileExtension=".msi" mimeType="application/octet-stream" /> -->
<!-- <mimeMap fileExtension=".gz" mimeType="application/x-gzip" /> -->
</staticContent>
</system.webServer>
</configuration>