Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "alexanderpilhar"

Okay, there was an issue with the connection to the DB - it's working now 8-)

Yes, swagger ui looks good so far!

But authorization doesn't work. At first, I thought it wasn't a big problem - the URI was lacking the 'project-name', so I edited Web.Host\wwwroot\swagger\ui\abp.swagger.js. But there is still something else going wrong as I now receive HTTP 500 when trying to authenticate.

I was happy too soon - the API itself is still not working … there must be even more places left to be edited.

Great :) that's way better!

Thank you for your reply!

Your information did help me solve the problem after all!

Although it was not the only bit that had to be edited to make it all work. There also is the file Web.Host\wwwroot\swagger\ui\index.html that has to be edited - it references two files using absolute paths:

<script src="/project-name/swagger/ui/abp.js"></script>
    <script src="/project-name/swagger/ui/abp.swagger.js"></script>

Maybe, this information should/could be included to the ticket you linked!?

Anyway, thank you very much for your help!

I'm having troubles with swagger ui after publishing Web.Host-project to on-premise IIS. It's just a test-deployment and is therefor located in a subfolder (accessible via <a class="postlink" href="https://mydomain.local/project-name/">https://mydomain.local/project-name/</a>).

swagger ui shows following error message:

Failed to load API definition. Errors Fetch error Not Found /swagger/v1/swagger.json

I guess this is because the project is located in a subfolder!?

If so, please, tell me how to make this work!

It finally works!

I simply dependency-inject IocManager to my Hub, there i can then resolve all other dependencies.

Startup.cs

GlobalHost.DependencyResolver.Register(typeof(MySignalRHub), () => new MySignalRHub(IocManager.Instance));

MySignalRHub.cs

private readonly IIocManager _iocManager;

public MySignalRHub(IIocManager iocManager)
{
    _iocManager = iocManager;
}

public async Task SomeMethod()
{
   using (var scope = _iocManager.CreateScope())
   {
      var repClassA = scope.Resolve<IRepository<ClassA>>();
      var srvClassA = scope.Resolve<IClassAAppService>();

      // ...
   }
}

I managed to figure out that the Internal Server Error has to do with my Hub class using dependency injection. So, I tried to register my Hub class and its dependencies in Startup.cs using GlobalHost.DependencyResolver. So far, my Client is able to invoke the hub method correctly. But the hub method itself fails when accessing the dependencies - they are all null … it's the same when I try to resolve dependencies in hub class constructor …

How do I resolve dependencies in a hub class correctly?

<cite>maliming: </cite> This is not recommended. If you can migrate SignalR to SignalR Core, it's best.

Thanks for your reply! I already thought so :lol: Well, it would be for a short period of time only (a couple of days) - just till all clients have updated to the latest version, speaking AspNetCore.SignalR finally.

So, even if it is not recommended, I'd still like to do it - it would make the upgrade process a lot smoother. But if it is not possible at all, then I will have to figure out something else (the goal is to avoid IoT-Client downtime).

Is there a way to run both versions of SignalR in parallel server-side (Core, Angular, v5.5.0)? I'm asking because I still have to support some IoT-Clients using AspNet.SignalR.

I tried implementing stuff the way it was implemented in v4.6.0 - but no luck so far ... Client's HubConnection.State is Connected, but invoking something doesn't work (500, internal server error).

Any ideas?

Showing 191 to 200 of 224 entries