ASP.NET WEBAPI Production Environment | "The system cannot find the file specified" -
local environment { iis 7.5 | windows 7 | asp.net 4.0 | integrated pipeline}
production environment {iis 8.0 | windows 2012 server | asp.net 4.x | integrated pipeline}
webapi functionality works in local environment e.g.
http://<domain>/api/towncity?startswith=marston
but on production, received following "obtuse" error message.
{"message":"an error has occurred.","exceptionmessage":"the system cannot find file specified","exceptiontype":"system.componentmodel.win32exception","stacktrace":null}
any way improve error information? or know solution?
many thanks, dave.
okay, after investigation, published release web.config, didn't update web.config entities connection string.
it therefore using local settings entity connection string.
<add name="yourdatabasenameentities" connectionstring=" metadata=res://*/model.yourdatabasename.csdl|res://*/model.yourdatabasename.ssdl|res://*/model.yourdatabasename.msl; provider=system.data.sqlclient; provider connection string=" data source=<set datasource here>; initial catalog=<set catalog here>; persist security info=true; user id=<set user id here>; password=<set password here>; integrated security=false; multipleactiveresultsets=true; app=entityframework" " providername="system.data.entityclient" />
i looking @ scott hanselman's piece on setting different web.configs debug, release, , production.
Comments
Post a Comment