我们正在开发一个使用新的 ASP.NET 5 (vNext)、EF7 和 AngularJS 的项目,并计划在 Azure 上部署 WebApp。
我在 Azure 上创建了一个新的 Web 应用程序,并通过 Visual Studio 2015 发布了我们的项目。
发布后,当我尝试测试我们的应用程序时,我会收到 500 - 内部服务器错误。
我已经设置了<customErrors mode="Off" />
in the web.config
in wwwroot
没有成功。
然后我通过 FTP 登录,“DetailedErrors”也不包含任何有用的信息。
eventlog.xml 包含以下异常:
<Events><Event><System><Provider Name="ASP.NET 4.0.30319.0"/> <EventID>1309</EventID><Level>2</Level><Task>0</Task> <Keywords>Keywords</Keywords><TimeCreated SystemTime="2015-07-28T10:54:43Z"/> <EventRecordID>280293125</EventRecordID><Channel>Application</Channel> <Computer>RD000D3A202052</Computer><Security/></System><EventData> <Data>3005</Data><Data>An unhandled exception has occurred.</Data> <Data>7/28/2015 10:54:43 AM</Data><Data>7/28/2015 10:54:43 AM</Data> <Data>9df086471c304ebfa4ddddf9ca2a2b92</Data><Data>1</Data><Data>1</Data><Data>0</Data><Data>/LM/W3SVC/2082809257/ROOT-1-130825544829782705</Data><Data></Data><Data>/</Data><Data>D:\home\site\wwwroot\</Data><Data>RD000D3A202052</Data><Data></Data><Data>2108</Data><Data>w3wp.exe</Data><Data>IIS APPPOOL\appname</Data><Data>InvalidOperationException</Data><Data>Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.
at AspNet.Loader.RuntimeLocator.LocateRuntime(MapPathHelper mapPathHelper, Boolean& isCoreClr, String& relativeAppBasePath)
at AspNet.Loader.Bootstrapper.LoadApplication(String appId, String appConfigPath, IProcessHostSupportFunctions supportFunctions, LoadApplicationData* pLoadAppData, Int32 loadAppDataSize)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at System.Web.Hosting.ProcessHost.System.Web.Hosting.IProcessHostLite.ReportCustomLoaderError(String appId, Int32 hr, AppDomain newlyCreatedAppDomain)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
它说它无法确定运行时的适当版本。
在项目属性中,解决方案 DNX SDK 版本设置为:
框架设置于project.json
:
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
我如何获得有关该错误的更多信息?