Thanks, i got the issue. Issue seems to be with Rabbitmq for some reason.
Altough i have configured the rabbitmq, application is not able to connect on 5672. Altough i didnt see any issue while debug, insertasync is throwing an expection after some time saying "not able to reach specific endpoint" rabbitmq server etc..,
Once i fix the rabbitmq connection, im able see users in the DB
If possible, I would like to connect with you and share the screen, so that we can have better context of it.
Hi , I could debug it, as i see the all the line are getting executed, and i even see the identityuser object response from the insert function.
What should i log to get more information.
Thanks
This is in UserDirectoryService in application layer
public virtual async Task<ADBaseResponse> ImportUsersAsync(ADUserObjectInputArgs input)
{
//Enqueue job with delay and priority
if(input.TenantId == null)
{
input.TenantId = this.CurrentTenant.Id;
}
await _backgroundJobManager.EnqueueAsync<ADUserObjectInputArgs>(input, BackgroundJobPriority.Normal);
return new ADBaseResponse() { Status = true, Message = "Users Syncing Initiated" };
}
**Backgroundjob: which is in domain layer**
[DisallowConcurrentExecution]
public class ADUsersManualSyncJob : AsyncBackgroundJob<ADUserObjectInputArgs>, ITransientDependency
{
//private readonly ICancellationTokenProvider _cancellationTokenProvider;
protected UserDirectoryManager UserDirectoryManager;
protected UserDirectoryFilterManager UserDirectoryFilterManager;
private readonly ADManagerService ADManagerServices;
protected UserManagementService UserManagementServices;
public ADUsersManualSyncJob(
//ICancellationTokenProvider cancellationTokenProvider,
UserDirectoryManager userDirectoryManager,
UserDirectoryFilterManager userDirectoryFilterManager, ADManagerService aDManagerService, UserManagementService userManagementServices
)
{
//_cancellationTokenProvider = cancellationTokenProvider;
UserDirectoryManager = userDirectoryManager;
UserDirectoryFilterManager = userDirectoryFilterManager;
ADManagerServices = aDManagerService;
UserManagementServices = userManagementServices;
}
[UnitOfWork]
public override async Task ExecuteAsync(ADUserObjectInputArgs args)
{
//_cancellationTokenProvider.Token.ThrowIfCancellationRequested();
var directoryServiceData = await UserDirectoryManager.GetDirectoryById(args.DirectoryId);
if (directoryServiceData != null)
{
var resp = await ProcessAsync(userData, args.TenantId, userInfo.UserAttributes); // code omitted for brevity
if(resp == null)
{
//TODO...
}var
}
}
private async Task<IdentityUser> ProcessAsync(CreateUserorUpdateInput input, Guid? tenantId, IDictionary<string, string> additionalAttributes)
{
//TODO...
var userInfo = await UserManagementServices.CreateUserAsync(input, tenantId, additionalAttributes);
return userInfo;
// need to call the create user function to onboard the user from Usermanagement Services...
}
**this is the create user function which is in user management service manager which is in domain layer**
************************************************************************************************************************************************
public class UserManagementService : ITransientDependency
{
protected IdentityUserManager _userManager { get; }
private readonly IIdentityRoleRepository RoleRepository;
private readonly IIdentityUserRepository _xSenseIdentityUserRepository;
protected UserDirectoryManager _userDirectoryManager { get; }
protected IOptions<IdentityOptions> IdentityOptions { get; }
public UserManagementService(IdentityUserManager userManager, IIdentityRoleRepository roleRepository, UserDirectoryManager userDirectoryManager,
IIdentityUserRepository xSenseIdentityUserRepository)
{
_userDirectoryManager = userDirectoryManager;
_userManager = userManager;
RoleRepository = roleRepository;
_xSenseIdentityUserRepository = xSenseIdentityUserRepository;
}
public bool CanCreateUserAsync(Guid? input)
{
try
{
return true;
}
catch (Exception ex)
{
return false;
}
}
[UnitOfWork]
public async Task<IdentityUser> CreateUserAsync(CreateUserorUpdateInput input,Guid? tenantId,IDictionary<string,string> additionalAttributes = null)
{
try
{
if(CanCreateUserAsync(tenantId))
{
var user = new IdentityUser(
input.Id,
input.UserName,
input.Email,
tenantId)
{
IsExternal = true,
Surname = input.Surname,
Name = input.Name
};
user.SetIsActive(true);
user.SetPhoneNumber(input.PhoneNumber, false);
user.SetEmailConfirmed(input.EmailConfirmed);
user.SetPhoneNumberConfirmed(input.PhoneNumberConfirmed);
user.SetDirectoryId(input.DirectoryId);
var dirObj = await _userDirectoryManager.GetDirectoryById(input.DirectoryId);
user.SetDirectoryName(dirObj.Name);
user.SetDirectoryType(dirObj.Type);
input.MapExtraPropertiesTo(user);
if(input.Password == null)
{
input.Password = user.Id.ToString();
}
var roleeNames = RoleRepository.GetListAsync().Result.Where(r => r.IsDefault == true).Select(r => r.Name).ToArray();
foreach (var item in additionalAttributes)
{
user.SetExtraProperties(item.Key, item.Value);
}
user.SetExtraProperties("FilterId", input.FilterId.ToString());
if(user != null)
{
var userResp = await _xSenseIdentityUserRepository.InsertAsync(user);~~~~
return userResp;
}
else
{
return null;
}
}
else
{
return null;
}
}
catch (Exception ex)
{
return null;
}
}
}
Now the issue is, users are not getting created in database, even though i dont see any excption in the entire flow.
One more observation is the same code is working in a different machine. I want to understand what could be the issue.
Altough i have used Quartz for background job implementation, i have also have rabbitmq settings in the appsettings but have an issue connecting to rabbitmqserver . Hope that wont be an issue.
Hi
I have configured the filebased documentation on ABP version 7.0.0. I could view the documentation.
When i run in debug mode and updating the doc source it is updating instantly after page refresh.
But when i deploy the same in IIS and trying to change the docs source in the server, it is not reflecting.
Can you help me understand what the reason for it ?
My bad, I got the issue. It is due to permissions of the github as it is a private repository. Now im able to do host github based documentation.
Let me try filebased docs and update you the status.
Appreciate your efforts
Yes i have given the details.
I have shared the github url and token in email
I have shared the logs of all projects in email
Thanks
I have tried it, i got this
AbpRemoteCallException: An internal error occurred during your request! Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.ThrowExceptionForResponseAsync(HttpResponseMessage response) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(string methodName, ClientProxyRequestTypeValue arguments) Volo.Docs.Documents.DocsDocumentClientProxy.GetDefaultAsync(GetDefaultDocumentInput input) Volo.Docs.Pages.Documents.Project.IndexModel.GetSpecificDocumentOrDefaultAsync(string languageCode) Volo.Docs.Pages.Documents.Project.IndexModel.TrySetDocumentAsync() Volo.Docs.Pages.Documents.Project.IndexModel.SetPageAsync() Volo.Docs.Pages.Documents.Project.IndexModel.OnGetAsync()