Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# IAppBuilder程序集引用的问题_C#_Asp.net_Asterisk - Fatal编程技术网

C# IAppBuilder程序集引用的问题

C# IAppBuilder程序集引用的问题,c#,asp.net,asterisk,C#,Asp.net,Asterisk,我正在试图找出我不能使用IAppBuilder的原因。我已将许多程序集添加到项目中,但仍然出现错误“找不到类型或命名空间名称'IAppBuilder',是否缺少using指令或程序集引用?” 我的目标是使用AsterNet库连接Asterisk服务器并创建会议室。我使用的代码是: using System; using Microsoft.Owin; using Owin; using System.Net.Http; using System.Web.Http; using Sys

我正在试图找出我不能使用IAppBuilder的原因。我已将许多程序集添加到项目中,但仍然出现错误“找不到类型或命名空间名称'IAppBuilder',是否缺少using指令或程序集引用?” 我的目标是使用AsterNet库连接Asterisk服务器并创建会议室。我使用的代码是:

 using System;
 using Microsoft.Owin;
 using Owin;
 using System.Net.Http;
 using System.Web.Http;
 using System.Web.Http.Routing;
 using AsterNET;
 using AsterNET.ARI;
 using AsterNET.ARI.SimpleConfExample.REST;
 using Microsoft.AspNet.SignalR.Owin;

 namespace AsterNET.ARI.SimpleConfExample.REST

{
public class Startup
{
    // This code configures Web API. The Startup class is specified as a type
    // parameter in the WebApp.Start method.

    public void Configuration(IAppBuilder appBuilder)
    {
        // Configure Web API for self-host. 
        var config = new HttpConfiguration();

        //config.Routes.MapHttpRoute(
        //    name: "DefaultApi",
        //    routeTemplate: "api/{controller}/{id}",
        //    defaults: new { id = RouteParameter.Optional }
        //);

        //config.Routes.MapHttpRoute(
        //    name: "DefaultApiWithAction",
        //    routeTemplate: "api/{controller}/{id}/{action}",
        //    defaults: new { action = "Get" },
        //    constraints: new { HttpCons}
        //);

        config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{id}/{action}"
        );

        config.Routes.MapHttpRoute(
            name: "DefaultApiWithId",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { action = "Get" },
            constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Get) }
        );

        config.Routes.MapHttpRoute(
            name: "DefaultApiGet",
            routeTemplate: "api/{controller}/",
            defaults: new { action = "Get" },
            constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Get) }
        );

        config.Routes.MapHttpRoute(
            name: "DefaultApiPost",
            routeTemplate: "api/{controller}/",
            defaults: new { action = "Post" },
            constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Post) }
        );

        config.Routes.MapHttpRoute(
            name: "DefaultApiDelete",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { action = "Delete" },
            constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Delete) }
        );
        appBuilder.UseWebApi(config);
    }
} 
}

可能重复:我已编辑了您的标题。请看,如果共识是否定的,他们不应该这样做。这不是一个疑问,因为我已经尝试重新安装OWIN,没有解决我的问题。非常感谢。