No, let me explain in more detail. I am running on a Windows machine. AspNetZero 5.3 AspNet Core/Angular merged project running on .Net Framework.
In our solution, we've been slowly adding tests and recently the tests started randomly failing. I couldn't find anything odd in our tests other than the amount of tests. I'm also suspicious it has something to do with db work since our tests hit the db pretty hard.
To replicate the issue I downloaded a clean 5.3 AspNet Core/Angular merged project, since that's what we're still using. I never have the issue running the tests out of box. But if I duplicate the out of box tests about 7 times (copy/paste/change test method name) so that there is a great volume of tests, the problem starts happening. I especially picked tests that hit the db, since I assumed that is the primary user of unmanaged memory.
BTW, even running tests in a clean project (without test duplication), you will see memory consumption slow increase.
I am getting a System.OutOfMemoryException when running tests. I've had it happen both on my dev machine and in my build pipeline in VSTS. It happens when I run all the tests but if I run a failing test by itself, it works. If I watch testhost_x86.exe memory consumption, I see it steadily increase. I first had this happen in my main project so I downloaded a clean project, duplicated the built-in tests several times, and the problem has occured. I used JetBrains dotMemory to monitor memory usage and it appears that when the exception occurs, most of the process's memory is unmanaged memory.
I would like to have separate password complexity settings for the host vs tenants, namely I want the host to have a high complexity (with maybe 2FA) but the tenants would have the default password complexity, which is not as high.
Currently in the framework, if the host sets a high complexity, then every tenant also has a high complexity unless the tenant changes it.
I want to track when certain clients (desktop clients) connect/disconnect from SignalR. I want to log each connect/disconnect in a database table. The question is specifically about writing to the database from inside an event. Can anybody think of a problem with doing it this way? Db contention, etc. Is there a preferred/better way?
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.RealTime;
using MyProject.Timeline;
namespace MyProject.RealTimeCommand
{
public class ClientStateWatcher : ISingletonDependency
{
private readonly IOnlineClientManager _onlineClientManager;
private readonly IRepository<ClientStatus, long> _clientStatusRepository;
public ClientStateWatcher(
IOnlineClientManager onlineClientManager
, IRepository<ClientStatus, long> clientStatusRepository
)
{
_onlineClientManager = onlineClientManager;
_clientStatusRepository = clientStatusRepository;
}
public void Initialize()
{
_onlineClientManager.ClientConnected += _onlineClientManager_ClientConnected;
_onlineClientManager.ClientDisconnected += _onlineClientManager_ClientDisconnected;
}
private void _onlineClientManager_ClientConnected(object sender, OnlineClientEventArgs e)
{
TrackClientStatusChange(e.Client, true);
}
private void _onlineClientManager_ClientDisconnected(object sender, OnlineClientEventArgs e)
{
TrackClientStatusChange(e.Client, false);
}
private void TrackClientStatusChange(IOnlineClient onlineClient, bool connected)
{
if ((string)onlineClient.Properties.GetValueOrDefault(OccConsts.HttpHeader_ClientType) == "DesktopClient")
{
_clientStatusRepository.Insert(
new ClientStatus
{
Status = connected ? ConnectionState.ConnectedOrSignedIn : ConnectionState.DisconnectedOrSignedOut,
CreatorUserId = onlineClient.UserId,
TenantId = onlineClient.TenantId.Value
});
}
}
}
}
We were having an issue where we would make a change to a css class for an element and after deploying the code the changes did not show unless you did a Ctrl + F5 to prevent loading from the cache.
We discovered the index.html file was being cached which was why we did not see our changes when doing a typical refresh. We found a fix which involves modifying the web.config file to not cache the index.html file like this:
<location path="index.html">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" cacheControlMaxAge="0.00:00:00" />
</staticContent>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache, no-store, must-revalidate" />
<add name="Pragma" value="no-cache" />
<add name="Expires" value="-1" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
This seems to work, however I was wondering if you have any guidance if this is a recommended practice, or is there a better way to prevent the caching of the index.html file?
I would like to see a user-based licensing model similar to viewtopic.php?t=3369. The tenant would purchase x number of licenses of a certain edition. Those licenses would then be assigned to users up to the number purchased. Something very similar to Microsoft Office 365.
Any plans to do something like this?
@JustinP Were you able to implement a per-user licensing model? What about the recurring payment system?
@ismcagdas
I re-downloaded a new demo project off the AspNetZero site and it worked correctly. So I compared the Abp dll versions and the new dll were at 3.3.0 in the sample whereas my project was at 3.2.5. I've upgraded those dll's in my project and the problem went away. So problem resolved by updating Abp Framework dlls.
BTW, is there a blog, email list, or something like that so I can keep track when new versions of the project are released?
@ismcagdas My experience is the same as yours. Hmmmmm.....Ahhh, but the query inputs in the app service come in as "local time", which are then executed as is.
BTW, in my original post, my offset calculations were incorrect. Your UI is sending the correct query parameter values but the backend is converting them back to local. Instead they shouldn't be converted back to local but should remain in UTC.