Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In my sharepoint site I am getting 403 forbidden error for Layout folder Images.

/_controltemplates/My/_LAYOUTS/1033/STYLES/My/show.jpg

Most likely causes: •This website requires you to log in.

update:

/_CONTROLTEMPLATES/ALERTUC/IMAGES/minus.gif also give same error. I think I have some permission issue with /_CONTROLTEMPLATES folde

share|improve this question
    
Does the file exist at c:\program files\common files\microsoft shared\web server extensions\14\template\controltemplates\ALERTUC\IMAGES\minus.gif? –  James Love Dec 27 '11 at 21:22
    
Yes, does exists. and my folder 12 hive (sharepoint 2007) –  James123 Dec 27 '11 at 21:25
    
Whatever you do, DO NOT TAMPER with permissions within IIS. This is will render your environment unsupportable. –  James Love Dec 27 '11 at 21:34
2  
Also, I do not believe assets are designed to be accessed from within controltemplates like this. Use layouts for these assets - the only things that should exist within ControlTemplates are UserControls (ASCX files). –  James Love Dec 27 '11 at 21:35
    
It is working other enviroment. but why not this enviroment? –  James123 Dec 27 '11 at 21:42
add comment

3 Answers

up vote 5 down vote accepted

Instead, your path should be

/_LAYOUTS/1033/STYLES/My/show.jpg
share|improve this answer
    
Samething in other environment (QA) it is working. But in my test environment not working –  James123 Dec 27 '11 at 20:59
    
/_CONTROLTEMPLATES/ALERTUC/IMAGES/minus.gif also give same error. I think I have some permission issue with /_CONTROLTEMPLATES folder –  James123 Dec 27 '11 at 21:10
1  
take @JamesLove advice and use the layouts folder for images. ControlTemplates is best used for user controls and such. It should work fine sitting in a layouts folder. –  David Lozzi Dec 28 '11 at 12:35
add comment

_layouts is a virtual directory that is only ever one level below the site you're in, so in your example, the same level as _controltemplates. Your ControlTemplates mapped folder in your solution should not have an _layouts folder. Have a separate mapped folder and access the files there directly.

share|improve this answer
add comment

I think you just copied the folder (from other location) to Layouts folder. This way it may not inherit the correct permissions which is set for Layouts.

You should manually create folder inside Layouts and then copy the assets(images) to it.

share|improve this answer
    
Yes, you are right. I copied from other location. As you said I created manually folder and copied images. still the same. even I gave folders permission to everyone –  James123 Dec 28 '11 at 14:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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