SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a code which is deployed with the delegate control, but when i try to call it in the logs i see an error:

class 'My.Custom.MyWebControl': The control with assembly name xxx' class name 'My.Custom.MyWebControl' is not allowed for web at URL 'http://.... The type is not registered as safe.

So i did register it as safe, because in the web.config i see the following:

SafeControl Assembly="xxxx" Namespace="My.Custom" TypeName="*"

My question, if this is registered as safe why do i get an error?

share|improve this question
up vote 1 down vote accepted


1) make sure your ammending the correct web application web.config!

2) make sure the safeControl is correct.... by that i mean make sure the ID is the same (check the error assembly id and assembly name), the assembly is correct and also the namespace is correct

3) you can check on the above within project and assembly folder (c:\windows\assembly) goto the file name dll and check the properties.

update the safecontrol accordingly to the information above, most of the safecontrol data can be taken from the error message!

then do iisrest, just incase dll is not updated within assembly, and forces chacing of any data to be rechecked!

share|improve this answer

Your Answer


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.