Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Dmitrii Lubenskii
2
Views
5
Comments
integrate C# public class inside application namespace
Question
Hello.
I am developing an extention, which needs a public class inside web application namespace.
How can it be done?
Thank you in advance.
BR,
Dmitry.
João Rosado
Staff
Hi Dmitry,
Well, you can have any namespace and classes you want inside your extension. So yes.
But depending on what you want it for it may or may not work, since extensions dll's are "lazy-loaded" into the applications as a needed basis. So your class may not be loaded when required.
Can you give some details on what integration you are trying to do, so we can try to help a bit more?
Regards,
João Rosado
Dmitrii Lubenskii
João, thank you for your reply.
The key is that I need a public class inside my application, but not in the extension.
Here is an example:
I have an extansion, with a method Start, where I do the following:
connection = new HubConnection("https://"+System.Web.HttpContext.Current.Request.Url.Authority);
hub = connection.CreateHubProxy("im");
connection.Start().Wait();
This is an initialization of SignalR hub. And This needs that the application I have on that URL had a public class
Startup
:
namespace MyWebApplication
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
}
When my extension creates proxy hub, it cannot find public
Startup
class.
João Rosado
Staff
Humm,
Me and a college did some tests of
SignalR integration a couple months ago and managed to have the class inside the extension by setting some configurations properties from SignalR.
Let me search if I can find a sample for it.
Also, let me just note that had an issue that SignalR required the application pool in Integrated Mode.
Currently the Platform is only supported/certified in Classic Mode.
Regards,
João Rosado
Dmitrii Lubenskii
It looks like that it could be implemented as windows service self hosting only... But it is not possible in my situation.
And I didn't found a way how to integrate this Startup class into application namespace.
BR,
Dmitry.
João Rosado
Staff
I found the code we had done for it, but my college says that he gave up on getting it to work.
I'll give it another try and get back to you.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...