c# - ASP.NET 5 IIS 500 error with EF7 application -


i hosting application in iis 8 developed in asp.net 5, mvc 6, , ef7. have created api application accessible via http://localhost/api , have created few controllers access data.

when access api visual studio works fine, , able retrieve json data back. when host application iis 8 , browser localhost/api/controller, 500 error in iis logs. have http platform handler 1.2 installed on windows server 2012 r2 server. able browse static pages , other links localhost/home, when try access api controller 500 error code back.

now when use execute web.cmd file application self host application , browse localhost:5000/api/controller, able retrieve json data back, not iis hosted site.

since dont know problem, enabled failed request tracing rules , able capture logs 500 error. below screenshot:

enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here

not getting failed request logs, might suggest usual suspects since works outside of iis:

  1. confirm app pool set work .net 5.0 , isn't set different clr 2.0 or 4.0. (actually strike this, since non-api mvc controllers wouldn't have worked @ in case...)

  2. confirm app pool running account has sufficient database permissions if using ntlm security sql, since execution context may different when running iis express visual studio versus iis.

i suggest checking windows error logs, not request trace....


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -