web
You’re offline. This is a read only version of the page.
close
Skip to main content
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!

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 138 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 107

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 89

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans