Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run out of box ASP.NET Web Application project #250

Closed
kurifodo opened this issue Dec 27, 2014 · 5 comments
Closed

Unable to run out of box ASP.NET Web Application project #250

kurifodo opened this issue Dec 27, 2014 · 5 comments

Comments

@kurifodo
Copy link

Repro Steps

  1. File -> New Project
  2. Under Web project templates, select 'ASP.NET Web Application'
  3. Select 'ASP.NET 5 Starter Web' and click OK
  4. F5 run the project (using IIS Express as the debug target)
    • Issue: "HTTP Error 403.14 - Forbidden"
  5. Open a command line at the project's source folder. Execute, "k web"
  6. Navigate to http://localhost:5000/
    • Issue: Internal Server Error
      MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Diagnostic> Microsoft.CodeAnalysis.Emit.EmitResult.get_Diagnostics()'.

Expected Result

After both steps #4 and #6, I would expect the Home/Index page to show up since this is the default route of the out of box template.

Actual Result

For step #4, the browser starts up and a "HTTP Error 403.14 - Forbidden" message displays. I tried placing a breakpoint at the start of the code in Startup.cs, and observed it is never hit.

For step #6, the attached exception is shown in the browser.

My Version Info

Target KRE: KRE-CLR-x86.1.0.0-beta1
OS: Windows 8.1 x64
IIS Express: 8.0

project.json

Note, I did not modify it from the out of box version (or any other file for that matter).

{
/* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 /
"webroot": "wwwroot",
"version": "1.0.0-
",
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta1",
"EntityFramework.Commands": "7.0.0-beta1",
"Microsoft.AspNet.Mvc": "6.0.0-beta1",
//"Microsoft.AspNet.Mvc.WebApiCompatShim": "6.0.0-beta1",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta1",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta1",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta1",
"Microsoft.AspNet.Security.Cookies": "1.0.0-beta1",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta1",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta1",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta1",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta1",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta1",
"Microsoft.Framework.Logging": "1.0.0-beta1",
"Microsoft.Framework.Logging.Console": "1.0.0-beta1",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta1"
},
"commands": {
/* Change the port number when you are self hosting this application /
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"aspnet50": { },
"aspnetcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"packExclude": [
"node_modules",
"bower_components",
".kproj",
"
.user",
"
*.vspscc"
],
"scripts": {
"postrestore": [ "npm install" ],
"prepare": [ "grunt bower:install" ]
}
}

Exception Details for Step #6

An unhandled exception occurred while processing the request.

MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<Microsoft.CodeAnalysis.Diagnostic> Microsoft.CodeAnalysis.Emit.EmitResult.get_Diagnostics()'. Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(IFileInfo fileInfo, String compilationContent) Microsoft.AspNet.Mvc.Razor.RazorCompilationService.Compile(RelativeFileInfo file, Boolean isInstrumented) Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.<>c__DisplayClass0.<CreateInstance>b__1() Microsoft.AspNet.Mvc.Razor.CompilerCache.OnCacheMiss(RelativeFileInfo file, Boolean isInstrumented, Func1 compile)
Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAdd(RelativeFileInfo fileInfo, Boolean enableInstrumentation, Func1 compile) Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String relativePath) Microsoft.AspNet.Mvc.Razor.RazorViewEngine.LocateViewFromViewLocations(ActionContext context, String viewName, Boolean partial) Microsoft.AspNet.Mvc.Razor.RazorViewEngine.CreateViewEngineResult(ActionContext context, String viewName, Boolean partial) Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName) Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean partial) Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName) Microsoft.AspNet.Mvc.ViewResult.FindView(IViewEngine viewEngine, ActionContext context, String viewName) Microsoft.AspNet.Mvc.ViewResultBase.FindViewInternal(IViewEngine viewEngine, ActionContext context, String viewName) Microsoft.AspNet.Mvc.ViewResultBase.<ExecuteResultAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.FilterActionInvoker.<InvokeActionResult>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.FilterActionInvoker.<InvokeActionResultFilter>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- Microsoft.AspNet.Mvc.FilterActionInvoker.<InvokeActionResultWithFilters>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.FilterActionInvoker.<InvokeAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.ControllerActionInvoker.<InvokeAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) Microsoft.AspNet.Mvc.MvcRouteHandler.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware1.<Invoke>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware`1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Diagnostics.Entity.MigrationsEndPointMiddleware.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.d__1.MoveNext()

@Praburaj
Copy link

This looks like a mismatched version of Roslyn. Could you paste the output of kvm list command to the bug?

@kurifodo
Copy link
Author

> kvm list

Active Version         Runtime Architecture Location                     Alias
------ -------         ------- ------------ --------                     -----
       1.0.0-beta1     CLR     amd64        <mypath>\.kre\packages
       1.0.0-beta1     CLR     x86          <mypath>\.kre\packages
       1.0.0-beta1     CoreCLR amd64        <mypath>\.kre\packages
       1.0.0-beta1     CoreCLR x86          <mypath>\.kre\packages
  *    1.0.0-rc1-10831 CLR     x86          <mypath>\.kre\packages default

@kurifodo
Copy link
Author

I have changed the active KRE using the following command and the issues no longer repro. Thank you!

kvm use 1.0.0-beta1 -x86 -r CLR -p

@deevus
Copy link

deevus commented Apr 30, 2015

I'm getting the same issue with the latest dnvm and an updated yeoman Web Application project.

$ dnvm list

Active Version           Runtime Architecture Location                     Alias
------ -------           ------- ------------ --------                     -----
       1.0.0-beta5-11596 clr     x86          C:\Users\Simon\.dnx\runtimes
       1.0.0-beta5-11657 clr     x64          C:\Users\Simon\.dnx\runtimes
  *    1.0.0-beta5-11657 clr     x86          C:\Users\Simon\.dnx\runtimes default
       1.0.0-beta5-11657 coreclr x86          C:\Users\Simon\.dnx\runtimes
MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Diagnostic> Microsoft.CodeAnalysis.Emit.EmitResult.get_Diagnostics()'.
Microsoft.AspNet.Mvc.Razor.RoslynCompilationService.Compile(RelativeFileInfo fileInfo, String compilationContent)
Microsoft.AspNet.Mvc.Razor.RazorCompilationService.Compile(RelativeFileInfo file)
Microsoft.AspNet.Mvc.Razor.CompilerCache.OnCacheMiss(RelativeFileInfo file, String normalizedPath, Func`2 compile)
Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAddCore(String relativePath, Func`2 compile)
Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAdd(String relativePath, Func`2 compile)
Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String relativePath)
Microsoft.AspNet.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext context, String pageName, Boolean isPartial)
Microsoft.AspNet.Mvc.Razor.RazorViewEngine.GetRazorPageResult(ActionContext context, String pageName, Boolean isPartial)
Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName)
Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean partial)
Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName)
Microsoft.AspNet.Mvc.ViewResult.<ExecuteResultAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Mvc.Core.FilterActionInvoker.<InvokeResultAsync>d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Mvc.Core.FilterActionInvoker.<InvokeResultFilterAsync>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Mvc.Core.FilterActionInvoker.<InvokeAllResultFiltersAsync>d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
Microsoft.AspNet.Mvc.Core.FilterActionInvoker.<InvokeResourceFilterAsync>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Mvc.Core.FilterActionInvoker.<InvokeAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Mvc.MvcRouteHandler.<InvokeActionAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Mvc.MvcRouteHandler.<RouteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.<Invoke>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.<Invoke>d__4.MoveNext()

@mindcrash
Copy link

@deevus: Looks like the MS team dropped a dnx build incompatible with the bits included in Visual Studio 2015 RC. If you do a DNVM upgrade now you'll see that the beta5 builds have been retracted from the release feed, and that dnx 1.0.0-beta4-11566 will be installed instead. This one works fine.

natemcmaster pushed a commit that referenced this issue Nov 13, 2018
…' to help us diagnose issues

Fixes #252 - help output shown twice in dotnet-watch
Fixes #250 - add dotnet-watch --list. Prints a list of all files discovered
Fixes #249 - better error message when GenerateWatchList fails
natemcmaster pushed a commit that referenced this issue Nov 14, 2018
subsequent block has data - IsEnd is false
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 21, 2018
* make StaticFileResponseContext constructible so people can instantiate it for testing purposes
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants