我在我工作的Web服務器(在IIS 7.0下)設置了新的NuGet Gallery。該網站本身設置並運行良好。我們能夠註冊賬戶,確認電子郵件地址,甚至通過網站本身上傳新的軟件包。爲什麼我的NuGet Gallery從nuget push中返回500?
我們的自動構建腳本需要能夠將新建的NuGet包推送到庫中。當我使用的NuGet的push命令:
nuget.exe push build\nuget\BaconAndEggs.1.0.0.1.nupkg 1451002a-8c63-4174-b7ed-73dd3e7bcdf0 -Source http://somenearbyserver/
我得到以下結果:
Pushing BaconAndEggs 1.0.0.1 to 'http://somenearbyserver/'...
Failed to process request. 'Internal Server Error'.
The remote server returned an error: (500) Internal Server Error..
該網站可以上傳一個新的包就好了,但命令行不。如果我嘗試帶着提琴手運行的push命令,它會在執行push命令時觀察兩個連續的請求。一個似乎正在觸摸該網站以確保它在那裏,而另一個則是實際的推送命令。
Request 1: GET http://somenearbyserver/ 200 OK
Request 2: PUT http://somenearbyserver/api/v2/package/ 500 Internal Server Error
PUT請求的內容是正確的,它包含API密鑰和有效載荷。在Web服務器上查看,事件查看器中沒有錯誤,並且elmah沒有捕獲任何東西。
的Fiddler示出以此爲響應於PUT:
HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Wed, 18 Jan 2012 20:21:08 GMT
Connection: close
Content-Length: 1208
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
我使用NuGet Version: 1.6.21205.9031
從命令行。
問題是什麼?
編輯:在該網站的API文件夾中啓用詳細的錯誤頁面後,我得到這個與上述500迴應:根據覈查權限
Server Error in Application "NUGET" Internet Information Services 7.0 Error Summary HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Detailed Error Information Module = LiveStreamingHandler Notification = MapRequestHandler Handler = WebDAV Error Code = 0x80070585 Requested URL = http://somenearbyserver:80/api/v2/package/ Physical Path = M:\path\to\nuget-gallery\api\v2\package\ Logon Method = Anonymous Logon User = Anonymous
中也包含了一些說明文字,建議等等,但據我所知,權限沒有問題。
+1。請注意,組名是'IIS_IUSRS'(帶有一個額外的'i')。 – Cameron 2014-10-17 22:40:33
沒有「編輯權限」右鍵點擊一個網站 – 2017-03-13 14:44:26