c# - OwinStartup and startup in signalr in asp.net mvc -


i have problem signalr in asp.net mvc add package below: enter image description here

and add startup.cs

using microsoft.owin; using owin; [assembly: owinstartup(typeof(paksh.startup))] namespace paksh  {    public class startup     {       public static void configuresignalr(iappbuilder app)        {                   app.mapsignalr();        }      }  } 

but error:

the following errors occurred while attempting load app. - owinstartupattribute.friendlyname value '' not match given value 'productionconfiguration' in assembly 'paksh, version=1.0.0.0, culture=neutral, publickeytoken=null'. - given type or method 'productionconfiguration' not found. try specifying assembly. disable owin startup discovery, add appsetting owin:automaticappstartup value of "false" in web.config. specify owin startup assembly, class, or method, add appsetting owin:appstartup qualified startup class or configuration method name in web.config.

the error states

the given [...] method 'productionconfiguration' not found.

this means owin startup class detection looking method called productionconfiguration on type provided (paksh.startup), not find it. tells me have similar in web.config well:

<appsettings>     <add key="owin:appstartup" value="productionconfiguration" />        </appsettings> 

you have several options solve this:

  1. change name of configuresignalr method productionconfiguration
  2. specify correct method name in owinstartupattribute: [assembly: owinstartup(typeof(paksh.startup), "configuresignalr")]

to know owin startup class detection, read more here.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -