Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

After upgrade from 4.0 to 4.5 framework, my styles and images have disappeared on my website remotely

Posted on 2014-12-24
11
Medium Priority
?
255 Views
Last Modified: 2015-01-16
I have a windows web server 2008. I am using visual studio 2012. I upgraded my 4.0 asp.net web site to 4.5 framework. I updated the targetFramework="4.5" in the web.config.

I updated all my project's libraries to 4.5 framework in the properties. I ran a clean solution and then build solution. It looks great when run locally from VS2012.

I published to my webserver. Once I did, all my stylesheets are now ignored and my images are broken. They are still in the directories. They are still being referenced. No coding was changed. Just the framework.

if I look at my add/remove programs on the actual web server, it shows 4.5.1 framework, but no 4.0 framework; so it has to be using the 4.5 framework on the app pool.  In the apppool, the application is set to the 4.0 framework (which is the 4.5 framework).

So if anyone has any other ideas where I might be missing something that is causing it to ignore my styles, I'd appreciate any advice. Sorry, I can't provide a working example or send you to a web page to look at, so don't yell at me for not providing enough info. If I haven't I'm sorry. Just seeing if anyone has an "aha" moment.

thanks!
0
Comment
Question by:Starr Duskk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 16

Assisted Solution

by:Kamal Khaleefa
Kamal Khaleefa earned 500 total points
ID: 40517354
make sure your application pool identity runs under network service

and all images and css files are exist

and the path is pointing to them
0
 
LVL 12

Assisted Solution

by:Ammar Gaffar
Ammar Gaffar earned 1000 total points
ID: 40517552
I faced similar issue before, but the reason wasn't framework version, I just moved my application to another PC (Development Machine).

The problem was caused by IIS installation/configuration, I missed to select Static Content check box under Common HTTP Features.

See attached picture, applicable for Windows 7
IIS.png
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 40518065
King2002,

I changed the app pool identity to network service and I get a 500 internal server error. I changed it back and at least get the website.

Ammar,

This is a windows web server 2008. I looked for the screenshot you sent under turn Windows Features on and off and my screens are entirely different than that screen shot.

however, this is NOT a new webserver. I have numerous websites running actively on it and they work fine. So changing something in the computer settings wouldn't be the answer, because the majority of the sites on the server are fine. It is just this one site that I tried to upgrade from 4.0 to 4.5. My other sites, including other 4.5 sites, are working fine.

thanks!
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 36

Assisted Solution

by:Miguel Oz
Miguel Oz earned 500 total points
ID: 40519359
Could you post the generated html for your image?
I am looking for any missing url information in the image. if that is the case you may have a mismatch on your assembly info.
Please create a new web app and add the same references and third party components of your app, then compare the config files of this new site with your affected site and check you have the same version info for all required assemblies.
Note: I have not used VS2012 before (jumped to VS2013 from VS2010) but  usually what I tend to do for all my apps  is create new projects and then add all files and references back to it.
0
 
LVL 12

Assisted Solution

by:Ammar Gaffar
Ammar Gaffar earned 1000 total points
ID: 40519417
Are you using any third party components? if yes please list them.
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 40520867
Telerik Ajax suite of controls. But I am using them on other websites on this same server; as well as have always been using them on this website.
0
 
LVL 36

Expert Comment

by:Miguel Oz
ID: 40521091
As per my previous post
Could you post the generated html for your image?
Could you post your web.config file and a brand new VS2012 web.config file for version comparison?
0
 
LVL 2

Accepted Solution

by:
Starr Duskk earned 0 total points
ID: 40533470
I found the problem, somehow this was added to my web.config during the upgrade process:

<staticContent>
      <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
      <mimeMap fileExtension=".m4v" mimeType="video/m4v" />
    </staticContent>

Open in new window


I commented those out and it works fine again. Don't know why it broke all my styles though. Hopefully I'll never need them. thanks!
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 40533472
Okay, after re-reading Amar's post, maybe the "Static Content" checkbox is the issue. But I can't find that in my IIS. :(
0
 
LVL 12

Expert Comment

by:Ammar Gaffar
ID: 40534794
If you are hosting different sites in the same server and images are showing well then it is not because of this.
If not,  deploy simple site with only one page that contains image and then check
0
 
LVL 2

Author Closing Comment

by:Starr Duskk
ID: 40553079
It was these mime types in the web.config
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question