Hi,
I created a separate tenant with a database. Now I want to query records from that separate db into the frontend, while not logged in. Is there a way to add the tenantId to the custom repositories? Or how can this be done?
I want to be able to add the tenantid and it should automatically get the records from the relevant db.
7 Answer(s)
-
0
never mind, found it:
<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">http://www.aspnetboilerplate.com/Pages/ ... ti-Tenancy</a>
-
0
hmm, not working atm.
when debugging this:
using (_unitOfWorkManager.Current.SetTenantId(2)) { var liveStreams = _liveStreamRepository .GetAll() .OrderByDescending(a => a.CreationTime) .ToList(); return new ListResultOutput<LiveStreamListDto>(liveStreams.MapTo<List<LiveStreamListDto>>()); }
I get this error:
The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)
-
0
note: only when debugging. In a live environment, it works like a charm
-
0
Hi,
It's probably related to MSDTC configuration on the development machine. This stackoverflow answer explains it in detail <a class="postlink" href="http://stackoverflow.com/a/10131344/6681451">http://stackoverflow.com/a/10131344/6681451</a>
-
0
I followed these instructions, but still get errors. I'm using the IP Address in my connectionstring, but tools like DTCPing require Netbios name. Could that be an issue?
Oh, and when I set breakpoints in the code and do an F5 while first receiving the error, the second time it runs the code without problem, but doesnt load the view (still showing the error)....
-
0
Now I'm getting: "attempted to access an unloaded appdomain"...
-
0
Hi,
I couldn't face a similar probem before, but could it be a firewall issue ? Can you try DTCPing tool ? More info here <a class="postlink" href="http://forums.asp.net/t/2084329.aspx?Problems+with+TransactionScope">http://forums.asp.net/t/2084329.aspx?Pr ... ctionScope</a>