Nuget Server存储库-找不到页面404

时间:2019-06-17 14:23:23

标签: nuget-server

我非常绝望。我已经尝试安装Nuget.Server v3.2.1.0两天了。 我按照https://docs.microsoft.com/de-de/nuget/hosting-packages/nuget-server上的安装说明进行操作,但是它不起作用。

我怀疑路由无法正常工作。

我的Web.config看起来像:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation strict="false" explicit="true" debug="true" targetFramework="4.6" />

    <!-- maxRequestLength is specified in Kb -->
    <httpRuntime targetFramework="4.6" maxRequestLength="30720" />
  </system.web>

  <appSettings>
    <add key="aspnet:UseHostHeaderForRequestUrl" value="true" />
    <add key="requireApiKey" value="true" />
    <add key="apiKey" value="MyApiKey" />
    <add key="packagesPath" value="D:\TFS-Workspaces\Fachit360\Playground\NuGet Server\NuGet Server\Packages" />
    <add key="cacheFileName" value="" />
    <add key="allowOverrideExistingPackageOnPush" value="false" />
    <add key="ignoreSymbolsPackages" value="true" />
    <add key="enableDelisting" value="false" />
    <add key="enableFrameworkFiltering" value="false" />
    <add key="enableFileSystemMonitoring" value="true" />
    <add key="allowRemoteCacheManagement" value="false" />
    <add key="initialCacheRebuildAfterSeconds" value="15" />
    <add key="cacheRebuildFrequencyInMinutes" value="60" />
  </appSettings>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
    </compilers>
  </system.codedom>

  <system.webServer>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
      <remove name="WebDAV" />
    </handlers>
    <staticContent>
      <remove fileExtension=".nupkg"/>
      <mimeMap fileExtension=".nupkg" mimeType="application/zip" />
    </staticContent>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WebDAVModule" />
    </modules>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="31457280" />
      </requestFiltering>
    </security>
  </system.webServer>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      ...
    </assemblyBinding>
  </runtime>
</configuration>

这是我的开发环境: -Visual Studio 2017专业版(15.9.12) -Windows 10企业版LTSC -IIS Express 10.0(集成了Visual Studio)

安装非常简单。还显示概述页面: Pic1

我感到困惑的是Default.aspx文件包含以下内容:

Click <a href="<%= VirtualPathUtility.ToAbsolute("~/nuget/Packages") %>">here</a> to view your packages.

在文件NuGetODataConfig.cs中配置以下内容:

NuGetV2WebApiEnabler.UseNuGetV2WebApiFeed(
    config,
    "NuGetDefault,
    "nuget"
    "PackagesOData,
    enableLegacyPushRoute: true);

无论如何,当我单击“单击此处查看您的软件包”时,出现错误:“找不到页面-404”。

有人知道为什么会这样吗?我在拉丁文结尾处。

许多问候

更新

我忘了提到我也曾尝试在Windows Server 2012 R2上发布该项目。完全一样的问题。

奇怪的是,您可以在我的项目参考中找到以下软件包: -Nuget.Core -Nuget.server -Nuget.Server.Core -Nuget.Server.V2

那么,为什么起始页谈论的是Nuget.Server 3.2.1.0?

0 个答案:

没有答案