GithubHelp home page GithubHelp logo

Comments (7)

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Moch Lutfi on Tuesday, 16 May 2017 07:26 (imported from Disqus):

I'm trying using asp.net core but doesn't work

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Stuart Grassie on Tuesday, 16 May 2017 11:39 (imported from Disqus):

There are other examples online of using StructureMap with asp.net core. If I get chance I'll put up another post detailing it as well.

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Moch Lutfi on Thursday, 18 May 2017 10:03 (imported from Disqus):

yeah, but Structure Map + Signal R on asp.net core. I never found the work one. btw thanks.

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Matt Dunn on Thursday, 31 August 2017 14:22 (imported from Disqus):

thanks for this, trying to wire up SignalR with StructureMap 4.5.

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Matt Dunn on Wednesday, 13 September 2017 12:45 (imported from Disqus):

Has anyone had any success with StructureMap 4.5 and SignalR 2.2?

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by Stuart Grassie on Wednesday, 13 September 2017 14:47 (imported from Disqus):

I've not tried lately, not been required in any of my projects. I've got something planned where I will be using both of these with asp.net core, so I'll post an updated article about it soon

from sgrassie.github.io.

sgrassie avatar sgrassie commented on September 28, 2024

Comment by David McDonnell on Thursday, 28 September 2017 15:03 (imported from Disqus):

Hi I am attempting this with a much simpler Hub, the hub has the Identity Email service as an injected parameter in the constructor, but when I attempt to execute anything on the hub I am receiving a
server 500 error. any help would be fantastic

My solution has two projects,
Realtime Project: one for Signalr Hubs
Web Project: and one for the front end MVC application that communicate with the hubs
DI is done in Web Project
Using:
Asp.Net MVC 5.2.3
SignalR 2.2.2
StructureMap 3.1.1.134
StructureMap.MVC5 3.1.1.134

Below are my startup and default registry classes

StartUp:

public void Configuration(IAppBuilder app)
{
var resolver = DependencyResolver.Current.GetService<microsoft.aspnet.signalr.idependencyresolver>();

var hubConfiguration = new HubConfiguration
{
Resolver = resolver
};

ConfigureAuth(app);
app.MapSignalR(hubConfiguration);
}

DefultRegistry

public DefaultRegistry()
{
For<idependencyresolver>().Singleton().Use<structuremapsignalrdependencyresolver>();

Scan(
scan => {
scan.TheCallingAssembly();
scan.WithDefaultConventions();
scan.With(new ControllerConvention());
});

For<iuserstore<applicationuser>>().Use<userstore<applicationuser>>();
For<dbcontext>().Use(() => new ApplicationDbContext());
For<iauthenticationmanager>().Use(() => HttpContext.Current.GetOwinContext().Authentication);
For<iidentitymessageservice>().Use<emailservice>();
}

from sgrassie.github.io.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.