How to fix 404 Not Found Error for opening a new tab in Angular

0

I used 'Window.open()' for opening new tab in Angular.

My code is:

let windowRef: Window = window.open('inspection/' + sheetId + '/' + equipmentId, '_blank');

It works very well for my local machine. However, it did not work when I used IIS. When a new tab is open, it shows:

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed information for the error:

Detailed Error Information:
Module             IIS Web Core
Notification       MapRequestHandler
Handler            StaticFile
Error Code         0x80070002
Requested URL      http://www.testinspection.com:80/inspection/2/GBRX700775
Physical Path      C:\inetpub\wwwroot\Inspection\inspection\2\GBRX700775
Logon Method       Anonymous
Logon User         Anonymous

This is my routing code:

 {
        path: 'inspection/:sheetId/:carId', component: InspectionTabComponent, resolve: { inspectionData: InspectionResolve },
        canActivate: [AuthGuard], canDeactivate: [CanDeactiveGuard]
 },

How can I fix it? What did I miss for this program? Please help me and I appreciate you in advance.

angular
asked on Stack Overflow Sep 13, 2019 by P.Lee

1 Answer

0

Its definitely IIS configuration, If your local is working fine. You should configure inbound rule using this documentation

Hope it will help you :)

answered on Stack Overflow Sep 13, 2019 by Jargal

User contributions licensed under CC BY-SA 3.0