Web Connection
Image and CSS not being found
Gravatar is a globally recognized avatar based on your email address. Image and CSS not being found
  Alec Gagne
  All
  Jun 12, 2018 @ 02:13pm

Our wc application is working on the development machine. Likewise, I've deployed this wc application to a separate machine and it too works as expected! Today we tried another deployment and experienced some different results. IIS is running and the WC application has been configured (at least we believe it has).

The wc application is properly connecting to our database, receiving web requests and is processing our various requests, however none of the web pages that are being served up are displaying the static .jpg images or being formatting based on the .css files we have deployed. Where we have base64 encoded images inline within the HTML that we return those images appear as expected, but the static images such as our logo etc. that are located in the \web\images folder are not appearing. Similarly while our data is there much of the formatting of that data is raw as our .css file in the \web\css folder is apparently not being referenced either. Even the Font-Awsome references in the default _login.wc template are not appearing.

It is as if all the subfolders to the \web folder are not being seen or found. The windows security permissions to the \web folder on this most recent machine appear to be identical to those of the first machine where the deployment is working.

Given that the image, css and font-awsome files are present in their respective web\images , web\css and web\bower-components\font-awsome folders etc. does anyone have any suggestion on what we should be looking for within the configuration so that these files can be found and referenced?

Our physical path in the IIS c:\myproject\web and our virtual path is /myproject

Thanks

Alec

Gravatar is a globally recognized avatar based on your email address. re: Image and CSS not being found
  Harvey Mushman
  Alec Gagne
  Jun 13, 2018 @ 06:56am

Forgetting about your WC application for a minute, can you use your Browser and open the images if you type the fully qualified URL into the address line?

If not the problem lies in IIS. Let the Browser time out, there might be some sort of help message that will give you a hint. IIS has log files that may give you a clue too.

Sounds like an invalid path to your Web folder. Perhaps permissions don't allow IUSER access. Simple solution is use WC to create a new project and point to the old folder location. Be sure to back up your work first and than after WC new project is set up put your original files back into the folder.

Gravatar is a globally recognized avatar based on your email address. re: Image and CSS not being found
  Rick Strahl
  Alec Gagne
  Jun 13, 2018 @ 09:07am

It sure sounds like your virtual mapping is not pointing to the right place, although it would seem that if that's the case the Web Connection requests also wouldn't work.

Check in IIS Manager and see where the actual folder that the virtual or site is mapped to is pointing to. Click on the content map to see exactly what IIS sees and then click on individual files like images and see if you can get them to open in the browser from there.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Image and CSS not being found
  Alec Gagne
  Rick Strahl
  Jun 14, 2018 @ 10:59am

Okay, here is the latest.

When I use the browser and attempt to navigate directly to any one of the .jpg images in the \images folder on one of our machines that IS WORKING correctly we get the image displayed in the browser as expected. When we do this on the machine that is not working correctly, we get nothing. So obviously as you suggested this issue is associated with IIS. In looking at the permissions in IIS, I noticed that there is no "IUSR" account in the list.

More info: ( This deployment is just another internal test so this is not a critical issue to resolve). It turns out that the machine that we did this test deployment on is actually a Windows 10 Home Edition. That forced me to revisit the install of IIS again. That is when I noticed during the install of IIS as we were checking the options for installation to the OS, within "Security" section the "Basic Authentication" option exists but the "Windows Authentication" option was/is not present.

I suspect that this is the root of the issue here. We are not seeing the images and the pages are not referencing the .css files because of a security permissions issue in IIS. So, we just installed on another Windows 10 PRO machine and we see the same issue. So we are missing something. We install IIS into the OS check all the option boxes as shown in the DOCS. From an Administrator command prompt we run or application with the CONFIG option switch to configure IIS. Then we run the application. Still no images and no reference to .css files

Something that needs to be set is not getting set.

Thanks

Alec

Gravatar is a globally recognized avatar based on your email address. re: Image and CSS not being found
  Rick Strahl
  Alec Gagne
  Jun 14, 2018 @ 12:09pm

Make sure that IIS is fully installed and that you enabled static content on the Web site. IIS has a static file module and if that's not installed it won't serve static files. Pretty sure that's enable by default but check in the feature installation.

You also need to make sure that Anonymous authentication is enabled in the Authentication configuration in IIS. But I believe that has to be working.

If you can reach your Web Connection scripts then you most definitely should be able to serve static content.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Image and CSS not being found
  Alec Gagne
  Rick Strahl
  Jun 16, 2018 @ 08:41am

Hi Rick,

Yep, "static content" that was it. We turned that on and all is working correctly.

Thanks

Alec

© 1996-2024