Highlighted

Upgraded to Coldfusion 2016 - won't read .css or image files

New Here ,
May 01, 2018

Copy link to clipboard

Copied

Hi,

We just installed Coldfusion 2016 on our Dev server, which was previously running Coldfusion 10.

The includes work, database connectivity works, but it will no longer read .css files or image files, and I would guess any sort of static includes.

For example running this code on the Dev (CF 2016) vs.our live server (CF 10):

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<link rel="stylesheet" href="test.css"  type="text/css" />

</head>

<body>

<cfinclude template="includes/test/text.cfm">

<img src="includes/test/banner_index.jpg">

<img src="banner_index.jpg">

</body>

</html>

Works as expected on the live server but on Dev the cfinclude works but the css is not applied (and I assume read) and the images show up as broken links.

In fact, the direct link to the image in a URL returns an "internal server error" message.

Uninstalling 2016 and going back to 10 did not solve the problem, so I'm guessing it's an IIS or other setting, but the problem occurred as a result of the ColdFusion 2016 installation.

Any thoughts or guidance is greatly appreciated!

Thanks,

Chris Cosart | Senior Developer/Analyst

Center for Community College Student Engagement

Program in Higher Education Leadership

Department of Educational Leadership and Policy

College of Education

The University of Texas at Austin

Views

553

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Upgraded to Coldfusion 2016 - won't read .css or image files

New Here ,
May 01, 2018

Copy link to clipboard

Copied

Hi,

We just installed Coldfusion 2016 on our Dev server, which was previously running Coldfusion 10.

The includes work, database connectivity works, but it will no longer read .css files or image files, and I would guess any sort of static includes.

For example running this code on the Dev (CF 2016) vs.our live server (CF 10):

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<link rel="stylesheet" href="test.css"  type="text/css" />

</head>

<body>

<cfinclude template="includes/test/text.cfm">

<img src="includes/test/banner_index.jpg">

<img src="banner_index.jpg">

</body>

</html>

Works as expected on the live server but on Dev the cfinclude works but the css is not applied (and I assume read) and the images show up as broken links.

In fact, the direct link to the image in a URL returns an "internal server error" message.

Uninstalling 2016 and going back to 10 did not solve the problem, so I'm guessing it's an IIS or other setting, but the problem occurred as a result of the ColdFusion 2016 installation.

Any thoughts or guidance is greatly appreciated!

Thanks,

Chris Cosart | Senior Developer/Analyst

Center for Community College Student Engagement

Program in Higher Education Leadership

Department of Educational Leadership and Policy

College of Education

The University of Texas at Austin

Views

554

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 01, 2018 0
Adobe Community Professional ,
May 02, 2018

Copy link to clipboard

Copied

This is all related to your web server, not to ColdFusion. I really don't think it has anything to do with the CF installation itself. Look at your IIS virtual directories and your root directory, and see where they point and how they differ from the previous configuration.

Dave Watts, Fig Leaf Software

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2018 1
Enthusiast ,
May 02, 2018

Copy link to clipboard

Copied

Try hitting one of those files directly, eg test.css over localhost -- IIS will give you a detailed error message on localhost by default.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2018 2
Adobe Community Professional ,
May 02, 2018

Copy link to clipboard

Copied

This is a good idea. You can also look in your browser's developer tools to see what kind of responses you're getting for those files.

Dave Watts, Fig Leaf Software

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2018 1
New Here ,
May 02, 2018

Copy link to clipboard

Copied

Thanks for the responses!  I appear to have found the issue.  The web.config file had this added it to it at some point during the installation process:

<staticContent>

          
<mimeMap fileExtension=".air"
mimeType="application/vnd.adobe.air-application-installer-package
zip" />

      
</staticContent>

It appears that basically created a whitelist with only .air extensions on it.  Removing it solved the problem.  Thanks for the responses, I'm not a server guy and needed so input to end up looking in the right places.

As an aside, I also ended up following the manual connector guide:  ColdFusion IIS manual connector configuration  and redoing the connections.  This solved another problem which was that IIS had stopped recognizing default documents, even though they were listed on IIS manager.  I mention this because it has come up on most of our CF upgrades over the years, but I've found very little about it online.

Thanks,

Chris

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2018 0
Adobe Community Professional ,
May 02, 2018

Copy link to clipboard

Copied

So, I have to apologize for my earlier response. While this is a web server problem, it was caused by the CF web server extension install. I've run into it before. It's the dumbest problem. Basically, this is being added to each individual web.config, but it already exists in applicationHost.config, and you can't have two identical entries.

Dave Watts, Fig Leaf Software

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2018 1
Community Beginner ,
Sep 12, 2018

Copy link to clipboard

Copied

I found the web.config file in IIS folder C:\inetpub\wwwroot and just renamed the whole thing to a backup name, and the cfm page started to load the css properly again.

I'm not a server guy so I don't know what is the best practice, but just removing the custom header line "<add name="Content-type" value="text/html; charset=utf-8" />" while keeping the config file also worked.

Here was what was in the offending web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpProtocol>
            <customHeaders>
                <add name="Content-type" value="text/html; charset=utf-8" />
            </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2018 0
Bardnet LATEST
Participant ,
Sep 13, 2018

Copy link to clipboard

Copied

Hi,

there's a method they call Content Sniffing (https://en.wikipedia.org/wiki/Content_sniffing). A browser can look into a resource and decide what to do. It can also be set to interpret the data as told.

You tell the browser to accept everything as text/html, also when it's css.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2018 0