web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Dynamics serving Web File as unexpected file type

(1) ShareShare
ReportReport
Posted on by 5

I have a portal app that uses web files to serve an Angular 13 app.

When I build the app locally to test it I can see it serves the build files as Content-Type=application/javascript; charset=UTF-8 and the app renders the correct values to the page. (2nd screenshot)

However, when I upload the same build files as Web Files in Dynamics CRM I can see that they are being served as Content-Type=text/javascript and the Javascript is not evaluated. (1st screenshot)

1) Could someone kindly tell me what could be stopping Dynamics CRM from interpreting the Web Files as Content-Type=application/JavaScript; charset=UTF-8?

2) Is there a site setting in Dynamics that could be blocking this particular Content-Type?


I can overcome this by using the recommended ahead-of-time compilation setting in the Angular build steps, but this issue has seemingly come out of nowhere and it would be cool to know if this is a configuration option in Dynamics. 

Below is when the app is running in the Dynamics portal. Served as Content-Type=text/javascript and not interpolating template values.
  

pastedimage1668406266581v3.png

Below is the same identical file running in my local environment. Being served as Content-Type=application/javascript; charset=UTF-8 and working as expected.

pastedimage1668406017534v2.png

Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 103

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 83 Most Valuable Professional

#3
11manish Profile Picture

11manish 65 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans