asp.net - Could not load file or assembly kre-clr-win - How can I specify the KRE? -
i'm trying build first application asp.net 5 in visual studio 2015 ctp. published app file system , copied folder aws ec2 instance. setup application in iis points wwwroot directory published app.
i keep getting yellow screen of death (ysod) when trying run app. looking @ event viewer, can see unhandled exception being thrown:
exception message: not load file or assembly 'file:///c:\inetpub\wwwroot\appname\approot\packages\kre-clr-win-x64.1.0.0-beta3\bin\kre.clr.managed.dll' or 1 of dependencies
sure enough, file doesn't exist on disk. never published application. do, however, have x86 version: kre-clr-win-x86.1.0.0-beta3. directory published app.
so reason app being published kre-clr-win-x86, when try run published app it's looking kre-clr-win-x64. how fix issue?
edit
here generated web.config in published wwwroot folder:
<configuration> <appsettings> <add key="kpm-package-path" value="..\approot\packages" /> <add key="bootstrapper-version" value="1.0.0-beta3" /> <add key="runtime-path" value="..\approot\packages" /> <add key="kre-version" value="1.0.0-beta3" /> <add key="kre-clr" value="clr" /> <add key="kre-app-base" value="..\approot\src\appname" /> </appsettings> </configuration>
edit 2
as part of publishing web.cmd
file generated (although i'm not sure file's particular use-case is) , if run app gets served on localhost:5000. if visit page locally, works. may related iis pipeline?
here's full stack trace:
exception information: exception type: filenotfoundexception exception message: not load file or assembly 'file:///c:\inetpub\wwwroot\gastropub\approot\packages\kre-clr-win-x64.1.0.0-beta3\bin\kre.clr.managed.dll' or 1 of dependencies. system cannot find file specified. @ system.reflection.runtimeassembly._nload(assemblyname filename, string codebase, evidence assemblysecurity, runtimeassembly locationhint, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.internalloadassemblyname(assemblyname assemblyref, evidence assemblysecurity, runtimeassembly reqassembly, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.internalloadassemblyname(assemblyname assemblyref, evidence assemblysecurity, runtimeassembly reqassembly, stackcrawlmark& stackmark, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.internalloadfrom(string assemblyfile, evidence securityevidence, byte[] hashvalue, assemblyhashalgorithm hashalgorithm, boolean forintrospection, boolean suppresssecuritychecks, stackcrawlmark& stackmark) @ system.reflection.assembly.loadfrom(string assemblyfile, evidence securityevidence) @ system.activator.createinstancefrominternal(string assemblyfile, string typename, boolean ignorecase, bindingflags bindingattr, binder binder, object[] args, cultureinfo culture, object[] activationattributes, evidence securityinfo) @ system.appdomain.createinstancefrom(string assemblyfile, string typename) @ system.appdomain.createinstancefrom(string assemblyfile, string typename) @ aspnet.loader.bootstrapper.initializenet45(string runtimepackagepath, appdomain targetdomain, string packagesdir, iobjecthandle& handle, string[]& args) @ aspnet.loader.bootstrapper.loadapplicationnet45(string appid, string appconfigpath, iprocesshostsupportfunctions supportfunctions, loadapplicationdata* ploadappdata, int32 loadappdatasize, string runtimepackagepath, string appbasepath) @ aspnet.loader.bootstrapper.loadapplication(string appid, string appconfigpath, iprocesshostsupportfunctions supportfunctions, loadapplicationdata* ploadappdata, int32 loadappdatasize) @ system.runtime.interopservices.marshal.throwexceptionforhrinternal(int32 errorcode, intptr errorinfo) @ system.web.hosting.processhost.system.web.hosting.iprocesshostlite.reportcustomloadererror(string appid, int32 hr, appdomain newlycreatedappdomain) --- end of stack trace previous location exception thrown --- @ system.runtime.exceptionservices.exceptiondispatchinfo.throw() @ system.web.hosting.applicationmanager.createappdomainwithhostingenvironment(string appid, iapplicationhost apphost, hostingenvironmentparameters hostingparameters) @ system.web.httpruntime.hostinginit(hostingenvironmentflags hostingflags, policylevel policylevel, exception appdomaincreationexception)
if deploying application on 64 bit os, need use 64 bit klr.
this how bundle application klr:
kpm bundle --runtime kre-clr-win-x64.1.0.0-beta3
that produce folder contains application, dependencies , clr. copy webserver , should go.
Comments
Post a Comment