Owin Selfhost and LoadConfiguration event

Answered
0
0

We are using the nice option using Wisej in a self hosting owin application. Thanks to the changes made in https://wisej.com/support/question/owin-self-hosted-application-in-single-binary we are able to avoid all the files.

But there seems to be an issue with the LoadConfiguration-Event. The FilePath is always Default.json. No matter of the requested page. If we place for example the admin.json in the folder the FilePath is correct.

best regards

  • You must to post comments
Best Answer
0
0

Hi Bernhard,

WJ-8854 is fixed in our latest Wisej release (1.4.79).

Best regards
Frank

  • You must to post comments
0
0

I attached a demo project.

In the project we have 3 html and json files. All files are embedded. Special case for adminWithExistingJson.json because this file will be also copied to the output directory. The LoadConfiguration event is in WisejHost.cs:159

When you launch it three browser windows will popup.

  • Default.html: works beside no json file in output directory
  • Admin.html: not working. Uses default.json
  • AdminWithExistingJson.html: working, but only because we have the json in output directory.

In the console output you will also see that only default and adminWithExistingJson are requested.

I hope this shows the problem.

  • Luca (ITG)
    Got it and can reproduce. It’s logged as WJ-8854
  • You must to post comments
0
0

I’m not sure I understood the issue. Can you send me some steps to reproduce?

Also with the LoadConfiguration event you don’t even need a json file. You can simply create Configuration object from the json definition and return it instead of assigning the file path. It lets you store the json config in an embedded resources or build it by code.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.