@alirizaadiyahsi Thanks a bunch - that works!
Hi @alirizaadiyahsi, Thanks for the reply. I am using exactly what you have outlined:
<text name="DataProvider_Description"><![CDATA[
A Data Provider can be selected as a data source for services, locations, users, people etc.<br />
If Nuage is selected as the data provider all data is saved in the Nuage system. If a third-party system is selected, such as ResiData, some data is held in Nuage and some in the third-party data provider system.<br />
<a href="#">Select here to see our data policy.</a>]]>
<div class="modal-body">
<p>
{{l("DataProvider_Description")}}
</p>
</div>
Result: [attachment=0:396gs9be]Capture.PNG[/attachment:396gs9be]
My solution is Angular with .NET Core. I would like to add html tags to my localization string. I have noticed that the localization string "ChatUserSearch_Hint" does exactly this:
<text name="ChatUserSearch_Hint">
<![CDATA[
Write only username for same tenant users, <br>
<strong>[tenancyName]\[userName]</strong> for other tenant's users <br><br>
for example: <br>
.\admin -> for host admin <br>
Test\admin -> for test tenant's admin <br>
admin -> for your tenant's admin
]]>
</text>
though I have been unable to display this string in the UI. The string will be displayed in a modal designed to help users setting up a new tenant and at the moment the text is displayed along with the embedded html tags. In an MVC solution I could use @Html.Raw but this is an Angular solution with .NET Core. Any pointers anyone?
For anyone else who can't find the log file in a .Net Core/Angular project it is here: [attachment=0:fawg30kq]Capture.PNG[/attachment:fawg30kq] In the bin/debug/net461/App_data/Logs folder which is not part of the project so a solution-wide search will not find it. The current log file is locked when the solution is working so I'm not sure how you would go about retrieving current errors in a production environment?
Where is the log file in the .Net Core/Angular project? log4net.config points to App_Data/Logs/Logs.txt but I can find no such folder or file. When I intentionally throw an error on the server the following is returned to the client.
{
code: 0,
message: "An internal error occurred during your request!",
details: null,
validationErrors: null
}
My only option seems to be to write try-catch blocks but how do I find exceptions after deployment? I have tried setting the level to ALL in log4net.config but I am still only able to capture errors through try-catch and have no log file to refer to. Help would be most appreciated.
Aaron, great shout. Sorry, I'm a newbie, your directions led me to the right place.
Version 5.0.4, Asp.Net Core & Angular. I have followed the instructions for step-by-step development at <a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step-Angular">https://aspnetzero.com/Documents/Develo ... ep-Angular</a>. I have refactored over the past week and documented the procedure to work with database-first procedures and separate components for create/edit/list in accordance with company standards. Having refactored the system works perfectly. However, when I come to run tests with multi-tenancy set to true I am getting the error message "Message: Abp.AbpException : Can not set TenantId to 0 for IMustHaveTenant entities!". My test code:
[Fact]
public async Task Should_Create_ActionType_With_Valid_Arguments()
{
//Act
await _actionTypeService.CreateActionType(
new CreateActionTypeInput
{
Name = "Metrics",
Description = "A category for measured inputs such as weight, blood pressure, fluid intake etc."
});
//Assert
UsingDbContext(
context =>
{
var metrics = context.ActionTypes.FirstOrDefault(p => p.Description == "A category for measured inputs such as weight, blood pressure, fluid intake etc.");
metrics.ShouldNotBe(null);
metrics.Name.ShouldBe("Metrics");
});
}
I have read carefully the post on testing ABP at <a class="postlink" href="https://www.codeproject.com/Articles/871786/Unit-testing-in-Csharp-using-xUnit-Entity-Framewor">https://www.codeproject.com/Articles/87 ... y-Framewor</a> and have also debugged the test and stepped through AppTestBase but can still not find why the test is not implementing the default TenantId (1). Help anyone?