2016-02-29 54 views
0

我剛剛使用visual studio 2015「web應用程序 - 無身份驗證」創建了一個新的ASP5 MVC6項目templete項目。我沒有對該項目進行任何更改,我在本地發佈了該項目,並使用Filezilla將發佈的文件上載到主機(gearhost.com)。但是,當我打開我的網站時,它給了我這個錯誤: 指定的CGI應用程序遇到錯誤,服務器終止該過程。指定的CGI應用程序遇到錯誤,服務器終止該進程。將mvc6發佈到雲後發生錯誤

我的網站地址: http://publish1.gear.host/

這裏是web.config中包含:

<configuration> 
    <system.webServer> 
    <handlers> 
     <add name="httpplatformhandler" path="*" verb="*"  modules="httpPlatformHandler" resourceType="Unspecified" /> 
    </handlers> 
    <httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform> 
    </system.webServer> 
</configuration> 

這裏是launchSettings.json包含:

{ 
    "iisSettings": { 
    "windowsAuthentication": false, 
    "anonymousAuthentication": true, 
    "iisExpress": { 
     "applicationUrl": "http://localhost:26153/", 
     "sslPort": 0 
    } 
    }, 
    "profiles": { 
    "IIS Express": { 
     "commandName": "IISExpress", 
     "launchBrowser": true, 
     "environmentVariables": { 
     "Hosting:Environment": "Development" 
     } 
    }, 
    "web": { 
     "commandName": "web", 
     "environmentVariables": { 
     "Hosting:Environment": "Development" 
     } 
    } 
    } 
} 

這裏什麼球l.json包含:

{ 
    "projects": [ 
    "src" 
    ], 
    "sdk": { 
    "version": "1.0.0-rc1-final" 
    }, 
    "packages": "packages" 
} 

這裏是appsettings.json包含:

{ 
    "Logging": { 
    "IncludeScopes": false, 
    "LogLevel": { 
     "Default": "Verbose", 
     "System": "Information", 
     "Microsoft": "Information" 
    } 
    } 
} 

謝謝..

+0

主機是否安裝了IISPlatformHandler?它是v1.2嗎?他們是否安裝了正確的版本? (32 v 64bit)。 基本上這看起來像一個主機問題,而不是你可以修復的東西。請求您的主機查看IIS平臺處理程序日誌,然後通過https://github.com/aspnet/Home/issues/1000 作爲旁白,不要將開發環境設置爲活動服務器上的主機環境。 – blowdart

回答

0

我們不支持.NET 5或MVC 6,因爲它們不在發行版中(只有beta/rc)。但是,我們確實支持.NET和MVC的所有版本。

0

一些相關注意事項:

  1. 你的主機需要爲此安裝了httpPlaformHandler模​​塊。
  2. 你知道你是否支持ASP.NET Core?
  3. 錯誤似乎表明處理程序無法正確提供請求。您可以在web.config中執行stdoutLogEnabled ="true",並在日誌文件中查看失敗的實際原因。可能是因爲權限問題,EF無法與DB服務器通話,可能是未找到DNX進程路徑。
相關問題