Jar*_*rem 5 azure signalr signalr-hub azure-webjobs
我想在连续的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
Run Code Online (Sandbox Code Playgroud)
我想控制台应用程序需要以提升的权限运行.有没有办法让这个工作?
先决条件:
Install-Package Microsoft.Azure.Jobs -pre
Install-Package Microsoft.AspNet.SignalR.SelfHost
Run Code Online (Sandbox Code Playgroud)
完整来源:
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();
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
得到了回应大卫Ebbo(@davidebbo):
"...you can only listen on a port through IIS.
WebJobs are more to do work and not run services."
Run Code Online (Sandbox Code Playgroud)
我认为Web作业是一个很好的方式来主持Signalr Hub而没有整个网站的足迹,但我需要找到一个替代方案.
归档时间: |
|
查看次数: |
1104 次 |
最近记录: |