継続的な Azure Web ジョブで SignalR セルフ ホスト プロジェクトを使用したいと考えています。しかし、実行しようとすると、次のエラーが発生します。
[07/11/2014 10:58:44 > cbec50: SYS INFO] Status changed to Running
[07/11/2014 10:58:45 > cbec50: ERR ] Unhandled Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: Access is denied
コンソール アプリは昇格された権限で実行する必要があると思います。これを機能させる方法はありますか?
前提条件:
Install-Package Microsoft.Azure.Jobs -pre
Install-Package Microsoft.AspNet.SignalR.SelfHost
完全なソース:
using System;
using Microsoft.Azure.Jobs;
using Microsoft.Owin.Hosting;
using Owin;
namespace ConsoleApplication2
{
class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
class Program
{
static void Main(string[] args)
{
using (WebApp.Start<Startup>("http://localhost:8080/"))
{
Console.WriteLine("Server running at http://localhost:8080/");
var host = new JobHost();
host.RunAndBlock();
}
}
}
}