ASP.NET 5 RC1 final のプレビュー テンプレートに基づくアプリがあります。実行してアプリを公開します
dnu publish --no-source --runtime active --configuration Release
結果のパッケージには、ランタイム「dnx-clr-win-x64.1.0.0-rc1-final」が含まれます。
パッケージを別の Windows マシンにコピーし、output\approot ディレクトリで web コマンドを実行しようとすると、次のエラーが表示されます。
Error: Unable to load application or execute command 'Microsoft.AspNet.Server.WebListener'. Available commands: web, webListener.
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String assemblyPath)
at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext)
at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName)
at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
Kestrel と WebListener の両方を試しましたが、同じエラー メッセージが表示されます。パッケージは私のマシンで動作します。
アプリを別のマシンで実行するために必要なことは他にありますか?