We have a WebPart that has a module with resources (images, css and js files).

Locally it works perfectly when deploying from VisualStudio.

In a testing server we're deploying the webpart via powershell (Uninstall-SPSolution ; Remove-SPSolution ; Add-SPSolution ; Install-SPSolution).

The module files (images) get copied to the right location, the elemets.xml with the redirection is there also.

But when trying to load the web part the new images (recently added) cannot be accessed (error 404 not found).

Does anybody know what might be happening here?

2 Answers 2


You need to Deactivate/activate the feature or if you wan't to do it the right way then use FeatureUpgrading with a ApplyElementManifests element for the elements.xml with the images and then make sure the feature is upgraded

  • already tryed that, but still no luck Mar 21, 2012 at 15:32
  • I was replying to deactivate/activate, not to the FeatureUpgrading part. Can you provide more info on that part, maybe a link. Mar 21, 2012 at 15:42

Here is something to try :

  • Deactivate the feature
  • Retract the solution
  • delete the solution
  • Go into your site via Manage Content and Structure and verify that all of the new images are in fact deleted. If they are not gone, delete them manually. The goal is to completely eliminate all traces of the feature and to eliminate any manual tweaks that may have been done outside the feature deployment and activation process
  • Add the solution
  • Deploy the solution
  • Activate the feature
  • Now retest and try to find images that are not working and a possible pattern between them.
  • Once you have a few images that work and a few that don't go into the elements.xml file that covers the images and compare the entries between those that work and those that don't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.