Jenkins integration-Where are styles ?, Jenkins integration-style
1. Blog background
Jenkins continuous integration, along the way the ups and downs continue, but from every ups and downs can be a lot of GAINS. The mvc program used for demonstration in the previous blog Jenkins integration-import project not found is shown in after running in:
However, after integration on Jenkins and publishing on IIS is successful, run the following view:
2. Problem
Obviously, there is no style, and this is absolutely impossible! After viewing the source code, the following prompt is displayed on the console:
Resource interpreted as Stylesheet but transferredwith MIME type text/plain
(That is, the resource is interpreted as a style table, but the MIME-type text/plain transfer)
Resource interpreted as Script but transferred withMIME type text/plain
(That is, the resource is interpreted as a script, but the MIME-type text/plain transfer)
The general idea is that the source file is a style sheet and script, but it is interpreted as a txt text, so the style after running is gone.
After checking the information, we finally solved the problem.
3. Solution
1. Enter regedit in the run window of win + R to open the Registry Editor and check the ContentType value in HKEY_CLASSES_ROOT \ js. If it is application/text, change it to application/JavaScript.
Refresh the page to see if there is a style. If it is not displayed, perform step 1.
2. Control Panel ------> program and function ------> Start or close Windows function to enter, view IIS ---> World Wide Web Services ---> common HTTP functions ---> static content, check static content folder. Refresh the page.
4. Gains
Are you happy or sad when you encounter problems? Believe that 99% of people are worried, "ya ~~ Why did you report an error ".
Yesterday I saw a story from my sister-in-law: "If I divide my daily project development process into development, debugging, and packaging, then their ratio is ". Therefore, for developers, errors are "Common Mistakes", and we must make "Easy to handle". In addition, the debugging error process is also a process of rapid progress: if you encounter a problem and solve the problem, you will be able to enjoy the sense of accomplishment after solving the problem!