0

I created a .net framework 4.0 with SignalR downloaded from Nuget. I think I downloaded Microsoft.AspNet.SignalR -Version 1.1.3 (based on instructions from SignalR support in .NET 4)

Then I copied the code from application http://blog.robseder.com/2013/10/18/executing-a-long-running-process-from-a-web-page/

When I execute it I am getting an error below

Error 10 'Owin.IAppBuilder' does not contain a definition for 'MapSignalR' and no extension method 'MapSignalR' accepting a first argument of type 'Owin.IAppBuilder' could be found (are you missing a using directive or an assembly reference?)

Anyone help me to fix this?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Owin;
using Owin;

namespace MvcApplication1.App_Start
{
    public static class Startup
    {
        public static void Configuration(IAppBuilder app)
        {
            app.MapSignalR();
        }
    }
}

enter image description here

I have these in my MVC project .net Framework 4.0

Microsoft.AspNet.SignalR.Core 1.2.2.0 Microsoft.AspNet.SignalR.Owin 1.2.2.0 Microsoft.AspNet.SignalR.SystemWeb 1.2.2.0 Microsoft.Owin 2.1.0.0 Microsoft.Owin.Host.SystemWeb 1.0.0.0

But I don't see Microsoft.AspNet.SignalR.dll!!

Community
  • 1
  • 1
CoolArchTek
  • 3,729
  • 12
  • 47
  • 76

2 Answers2

1

It's probably late to answer this post. Might be helpful for someone else. Startup.cs doesn't support version 4.0 You will need a global.asax with following

using System.Web.Routing;
using Microsoft.AspNet.SignalR;

protected void Application_Start(object sender, EventArgs e)
{
  RouteTable.Routes.MapHubs();
}
David Tansey
  • 5,813
  • 4
  • 35
  • 51
Saqib
  • 371
  • 2
  • 13
0

You can try this, I also ran into same issue and after updating Owin version all is working fine

Also @Pawel has suggested the same

Package manager console : Install-Package Microsoft.Owin -Version 2.1.0
Community
  • 1
  • 1
Nilesh Gajare
  • 6,302
  • 3
  • 42
  • 73
  • I added the Microsoft.Owin, I still see the same error. Also, I tried to add Microsoft.Owin.Security 2.0.1 but it failed. my using has both Owin and Microsoft.Owin – CoolArchTek Mar 18 '15 at 04:23
  • For your reference I am adding code in the main post. Please take a look. in my MVC project references I have Microsoft.AspNet.SignalR.Owin 1.2.2.0 and Microsoft.Owin 2.0.1.0 and Microsoft.Owin.Host.SystemWeb 1.0.0.0 – CoolArchTek Mar 18 '15 at 04:24
  • @CoolArchTek i just checked my code to see version of owin it is `2.1.0` can you just try with this version bcoz i have also same error and i resolved t using Owin version – Nilesh Gajare Mar 18 '15 at 04:28
  • I still receive the same error. add more details to main post. – CoolArchTek Mar 18 '15 at 14:31