1

I am trying to find out the why I cant use the IAppBuilder. I have add many assemblies to my project but still taking the error ” The type or namespace name 'IAppBuilder' could not be found (are you missing a using directive or an assembly reference?)” My goal is by using AsterNet library to connect with a Asterisk Server and create conference rooms. The code that i am using is :

 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);
    }
} 
}
John Saunders
  • 160,644
  • 26
  • 247
  • 397
focus
  • 171
  • 9
  • 31
  • 1
    Possible duplicate of: http://stackoverflow.com/questions/21738034/the-type-or-namespace-iappbuilder-could-not-be-foundmissing-using-a-directive-p – Bob2Chiv Sep 22 '14 at 19:37
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Sep 22 '14 at 22:56
  • This is not a dublicate because i have already try to reinstall the OWIN and there is no solving my problem. Thank you – focus Sep 23 '14 at 10:59

0 Answers0