slamj1 thanks. Found what causing the issue. .NET version installed was incorrect. Installed the correct one and it went all good.
Thanks for all the help
In addition, both the Angular app and my .net core app (backend) are hosted on the same server
Thanks for sharing the document.
Yes oguzhanagir , I have performed the deployment process stated in the document.
Also, I have compared files (web.cofig, and appsettings) in my azure instance (working) vs the bare metal server (not working) , everything looks the same.
Note: everything works when published in azure, but not on the bare metal server which is deployed via folder.
I have my web app (Angular + .NET core) deployed in Azure and works fine after deployment (publish). However, when I tried deploying it to a folder on my other Windows Server 2022 with IIS 10 , I'm getting a 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. error.
I have checked permission for IIS_IUSRS); all looks good. Web Server (IIS) > Web Server > Common HTTP Features. Static Content is Enabled. Default Documents are Set up properly.
Any suggestion on what else to check?
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish_MessageToEmployee FromBackgroundJob error with domain https://tenant.mydomain.com: Call failed with status code 403 (Forbidden): POST https://tenant.mydomain.com/api/services/app/BackgroundJobNotification/NotifyEmployee
at SHRIS.Notifications.NotificationAppService.<Publish_MessageToEmployee>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SHRIS.Notifications.NotificationAppService.<Publish_ApprovalMessage>d__19.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at SHRIS.TimeLogs.EmployeeTimesheetJobAppService.ProcessApprovedLeaves(Int32 id, Nullable1 tenantId) at Castle.Proxies.Invocations.IEmployeeTimesheetJobAppService_ProcessApprovedLeaves.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Auditing.AuditingInterceptor.PerformSyncAuditing(IInvocation invocation, AuditInfo auditInfo) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.EmployeeTimesheetJobAppServiceProxy.ProcessApprovedLeaves(Int32 id, Nullable
1 tenantId)
at SHRIS.BackgroundJobs.Jobs.ApprovalRequestJob.Execute(ApprovalRequestJobArgs args)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
---> (Inner Exception #0) System.Exception: Publish_MessageToEmployee FromBackgroundJob error with domain https://tenant.mydomain.com: Call failed with status code 403 (Forbidden): POST https://tenant.mydomain.com/api/services/app/BackgroundJobNotification/NotifyEmployee
at SHRIS.Notifications.NotificationAppService.<Publish_MessageToEmployee>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
It only happens to one of the tenants, all other tenants are working fine. Also Background jobs seems to be firing up OK when there are no user notifications required.
Error,
System.Exception: Publish_MessageToUser FromBackgroundJob error with domain https://xxx.mydomain.com Call failed with status code 403 (Forbidden): POST https://https://xxx.mydomain.com
Appreciate anything that you can provide or any guidance what to check.
OK thanks. it looks like it worked!
Thank you, can you me an example how to change my appsettings?
will it be?
"App": { "WebSiteRootAddress": "http://mydomain.com/", "MultiTenancy": { "DomainFormat": "{0}.mydomain.com;{0}.yourdomain.com", "DomainName": "mydomain.com" },
Also where should we inject and call? should we add this new class? https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs#L43C80-L43C81
I have one server hosting and I would like to host and support multiple domain name... e.g. mydomain.com and yourdomain.com how do I change this to support?
"App": { "WebSiteRootAddress": "http://mydomain.com/", "MultiTenancy": { "DomainFormat": "{0}.mydomain.com", "DomainName": "mydomain.com" },