TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mandar Shinde
NA
423
115.6k
Regarding refresh won't work after deployment
Jun 12 2019 4:38 AM
Dear All,
I have build one small project using
Angular 6 and ASP .Net MVC 5 with Rest Api
and deployed on IIS.
I am not able to refresh my web pages, if I do that then I am getting error of 404.
To overcome on this problem I get come to kow that I should use URL rewrite and web.config.
If I use following web.config with Angular 6 prod files then I can able to refresh to all pages but it produces another error i.e. related to CORS.
Here is follwing my web.config :-
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=
"Angular Routes"
stopProcessing=
"true"
>
<match url=
".*"
/>
<conditions logicalGrouping=
"MatchAll"
>
<add input=
"{REQUEST_FILENAME}"
matchType=
"IsFile"
negate=
"true"
/>
<add input=
"{REQUEST_FILENAME}"
matchType=
"IsDirectory"
negate=
"true"
/>
</conditions>
<action type=
"Rewrite"
url=
"./index.html"
/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
How can I overcome on above problem.
Please let me any easy solution.
Thanking you in advanced,
Regards.
Reply
Answers (
2
)
it is all about angular 2 (not js). how to create angular 2
how to calculate Total amount in Angular 7