Web.config 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. 有关如何配置 ASP.NET 应用程序的详细信息,请访问
  4. https://go.microsoft.com/fwlink/?LinkId=169433
  5. -->
  6. <configuration>
  7. <!--
  8. For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
  9. The following attributes can be set on the <httpRuntime> tag.
  10. <system.Web>
  11. <httpRuntime targetFramework="4.6" />
  12. </system.Web>
  13. --><system.web>
  14. <compilation debug="true" targetFramework="4.6" />
  15. <!-- maxRequestLength is specified in Kb --><httpRuntime targetFramework="4.6" maxRequestLength="30720" />
  16. </system.web>
  17. <system.codedom>
  18. <compilers>
  19. <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
  20. <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
  21. </compilers>
  22. </system.codedom>
  23. <system.webServer>
  24. <handlers>
  25. <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  26. <remove name="OPTIONSVerbHandler" />
  27. <remove name="TRACEVerbHandler" />
  28. <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  29. <remove name="WebDAV" /><!-- Depending on IIS configuration, these may have to be added.
  30. <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  31. <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,PUT,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  32. <remove name="OPTIONSVerbHandler" /><remove name="TRACEVerbHandler" />
  33. <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  34. --></handlers>
  35. <staticContent>
  36. <mimeMap fileExtension=".nupkg" mimeType="application/zip" />
  37. </staticContent><modules runAllManagedModulesForAllRequests="true">
  38. <remove name="WebDAVModule" />
  39. </modules><security>
  40. <requestFiltering>
  41. <!-- maxAllowedContentLength is specified in Bytes -->
  42. <requestLimits maxAllowedContentLength="31457280" />
  43. </requestFiltering>
  44. </security></system.webServer><appSettings>
  45. <!--
  46. Determines if an Api Key is required to push\delete packages from the server.
  47. -->
  48. <add key="requireApiKey" value="true" />
  49. <!--
  50. Set the value here to allow people to push/delete packages from the server.
  51. NOTE: This is a shared key (password) for all users.
  52. -->
  53. <add key="apiKey" value="xyy1230" />
  54. <!--
  55. Change the path to the packages folder. Default is ~/Packages.
  56. This can be a virtual or physical path.
  57. -->
  58. <add key="packagesPath" value="" />
  59. <!--
  60. Change the name of the internal cache file. Default is machine name (System.Environment.MachineName).
  61. This is the name of the cache file in the packages folder. No paths allowed.
  62. -->
  63. <add key="cacheFileName" value="" />
  64. <!--
  65. Set allowOverrideExistingPackageOnPush to false to mimic NuGet.org's behaviour (do not allow overwriting packages with same id + version).
  66. -->
  67. <add key="allowOverrideExistingPackageOnPush" value="false" />
  68. <!--
  69. Set ignoreSymbolsPackages to true to filter out symbols packages. Since NuGet.Server does not come with a symbol server,
  70. it makes sense to ignore this type of packages. When enabled, files named `.symbols.nupkg` or packages containing a `/src` folder will be ignored.
  71. If you only push .symbols.nupkg packages, set this to false so that packages can be uploaded.
  72. -->
  73. <add key="ignoreSymbolsPackages" value="true" />
  74. <!--
  75. Set enableDelisting to true to enable delist instead of delete as a result of a "nuget delete" command.
  76. - delete: package is deleted from the repository's local filesystem.
  77. - delist:
  78. - "nuget delete": the "hidden" file attribute of the corresponding nupkg on the repository local filesystem is turned on instead of deleting the file.
  79. - "nuget list" skips delisted packages, i.e. those that have the hidden attribute set on their nupkg.
  80. - "nuget install packageid -version version" command will succeed for both listed and delisted packages.
  81. e.g. delisted packages can still be downloaded by clients that explicitly specify their version.
  82. -->
  83. <add key="enableDelisting" value="false" />
  84. <!--
  85. Set enableFrameworkFiltering to true to enable filtering packages by their supported frameworks during search.
  86. -->
  87. <add key="enableFrameworkFiltering" value="false" />
  88. <!--
  89. When running NuGet.Server in a NAT network, ASP.NET may embed the server's internal IP address in the V2 feed.
  90. Uncomment the following configuration entry to enable NAT support.
  91. -->
  92. <!-- <add key="aspnet:UseHostHeaderForRequestUrl" value="true" /> -->
  93. <!--
  94. Set enableFileSystemMonitoring to true (default) to enable file system monitoring (which will update the package cache appropriately on file system changes).
  95. Set it to false to disable file system monitoring.
  96. NOTE: Disabling file system monitoring may result in increased storage capacity requirements as package cache may only be purged by a background job running
  97. on a fixed 1-hour interval.
  98. -->
  99. <add key="enableFileSystemMonitoring" value="true" />
  100. <!--
  101. Set allowRemoteCacheManagement to true to enable the "clear cache" and other cache operations initiated via requests originating from remote hosts.
  102. -->
  103. <add key="allowRemoteCacheManagement" value="false" />
  104. <!--
  105. Set initialCacheRebuildAfterSeconds to the number of seconds to wait before starting the cache rebuild timer.
  106. Defaults to 15 seconds if excluded or an invalid value.
  107. -->
  108. <add key="initialCacheRebuildAfterSeconds" value="15" />
  109. <!--
  110. Set cacheRebuildFrequencyInMinutes to the frequency in minutes to rebuild the cache. Defaults to 60 minutes if
  111. excluded or an invalid value.
  112. -->
  113. <add key="cacheRebuildFrequencyInMinutes" value="60" />
  114. </appSettings><system.serviceModel>
  115. <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  116. </system.serviceModel><runtime>
  117. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  118. <dependentAssembly>
  119. <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
  120. <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
  121. </dependentAssembly>
  122. <dependentAssembly>
  123. <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  124. <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  125. </dependentAssembly>
  126. <dependentAssembly>
  127. <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  128. <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  129. </dependentAssembly>
  130. <dependentAssembly>
  131. <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  132. <bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
  133. </dependentAssembly>
  134. <dependentAssembly>
  135. <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  136. <bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
  137. </dependentAssembly>
  138. <dependentAssembly>
  139. <assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  140. <bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
  141. </dependentAssembly>
  142. </assemblyBinding>
  143. </runtime></configuration>