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

Audit logs #186


User avatar
0
mpm created

The app I am working on right now has two DbContext, and two controllers. The first controller (using the default DbContext) is logging to the audit log with no issue. The second controller (using the second DbContext) is not logging anything to the audit log.

Do you have any thoughts on possible causes?


4 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    I think this is because of two dbcontext requires distributed transaction. Can you try to start "Distributed Transaction Coordinator" Windows Service on your computer. If it does not work, I will try to simulate same behaviour in my environment.

  • User Avatar
    0
    mpm created

    Hi Halil.

    In order to get the two DbContext's to work at all, I had already enabled DTC.

    Security Settings

    - Network DTC Access checked
          - Client and Administration
                 - Allow Remote Clients checked
                 - Allow Remote Administration unchecked
          - Transaction Manager Communication
                 - Allow Inbound checked
                 - Allow Outbound checked
                 - Mutual Authentication Required is selected
         -  Enable XA Transactions unchecked
          - Enable SNA LU 6.2 Transactions checked
    

    Thanks for checking into this.

  • User Avatar
    0
    hikalkan created
    Support Team

    OK, I will check it soon. If there is a problem, we will fix it. So, you can continue your project, you will get update if there is a bug.

    I created an issue for that: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/536">https://github.com/aspnetboilerplate/as ... issues/536</a>

  • User Avatar
    0
    mpm created

    Much appreciated.