1

I run the following command

ng build --base-href /extDataAngular/

and put all the file from Dist folder to IIS-6 server

When I try to open the Url in Browser

It just show the following error:

Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/runtime.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/polyfills.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/styles.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/scripts.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/vendor.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/extDataAngular/main.js
Not allowed to load local resource: file:///C:/Program%20Files/Git/assets/img/icon_logo.ico

Is there anyway to fix the resource path pointing to the right path?

Correct path should be://d:/app/extDataAngular

Current wrong path: //C:/Program%20Files/Git/extDataAngular/vendor.js

1
  • Can you share the folder structure ? Commented Apr 15, 2019 at 10:29

2 Answers 2

2

If you run the terminal from the root folder of your project try just running 'ng build --prod' to be sure you are getting the correct files in the build.

Also in IIS make sure the website's physical path is pointing to the d:/app/extDataAngular folder containing the build in the 'Basic Settings' for that site.

enter image description here

Might be worth looking at updating your IIS installation to IIS 10 also if possible.

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

0

I found out the reason...it's because --href this tag for ng build didn't work for me after build the file I have to alert the in the index.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.