TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bhushan Gupta
1.3k
383
3.6k
WEB API Self Hosting Error
Jun 25 2017 4:42 AM
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<StartUp>("http://localhost:12345"))
{
Console.WriteLine("Web Server is running");
Console.WriteLine("For Quit");
Console.Read();
}
}
Advance thanks
Attachment:
Console.rar
Reply
Answers (
1
)
Need Hints and suggestion for application.
How to share post to social network sites after save data?