Error coming: {"The following errors occurred while attempting to load the app.\r\n - No 'Configuration' method was found in class 'WebPIHTTPServices.StartUp, WebAPIHTTPServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.":""}
I have created a console application for web api self hosting through owin and added NuGet package Microsoft.OWIN related..
First class is this:
using Owin;
using System.Web.Http;
namespace WebAPIHTTPServices
{
public class StartUp
{
public void Configration(IAppBuilder app)
{
var config = new HttpConfiguration();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
app.UseWebApi(config);
}
}
}
------------------------------
using System;
using Microsoft.Owin.Hosting;
namespace WebAPIHTTPServices
{
public class Program
{
static void Main(string[] args)
{
using (WebApp.Start("http://localhost:12345"))
{
Console.WriteLine("Web Server is running");
Console.WriteLine("For Quit");
Console.Read();
}
}
Advance thanks
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Vivek KumarPosted Jun 25, 2017, 6:32 PM