Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Hello world! HOT 1
- Limitations in Delphi HOT 1
- cakePHP with Eclipse HOT 3
- Writing a generic plugin manager in C# HOT 2
- Unit Testing Events HOT 2
- Let’s write an API library for Github HOT 2
- Damn you empty catch block HOT 3
- Custom Structuremap Dependency Resolver for ReactiveUI 5 HOT 2
- A psake build script example HOT 1
- Probably giving up my CSharp Github API HOT 2
- Extending Sandra.Snow HOT 1
- ReactiveUI - Hello, World! HOT 1
- Github C# API: Handling the response with RestSharp HOT 1
- Switching comments from Disqus to utteranc.es and importing to Github with F# | Stuart Grassie: TemporalCohesion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgrassie.github.io.