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

When I deploy my web part locally everything is fine. The web part is registered as safe, and is completely usable.

When I deploy the wsp to another server the web part comes back with the following error although everything appears to be deployed correctly (and the SafeControls appear within the web.config). :

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type XXXXX could not be found or it is not registered as safe.

It is almost the exact same issue as this question on stackoverflow. The only difference being that when I look at my web.config on the server I am deploying to I DO see the SafeControls.

Any thoughts on things that I could try to fix the issue? Server settings, how I package or deploy, etc.Blockquote

share|improve this question
    
Are you deploying to the GAC or bin? –  Steve Lineberry Nov 3 '10 at 20:11
    
what does the web part do? Is there anything particular to the environment in the web part properties (like a URL) that would make it behave differently? –  Anders Rask Nov 3 '10 at 21:28
    
Deploying to GAC. Webpart looks at the Reusable Content list for a particular item. No direct calls to an absolute URL or anything like that. –  mcnarya Nov 4 '10 at 13:26
add comment

2 Answers 2

Are you sure that the full name in the Safe Controls entry is exactly the same as the one of the Web Part? I'd suggest you verify that using Reflector to be sure that both values are correct.

share|improve this answer
    
Last time I checked it appeared to be correct. I will check again with reflector when I am able to. –  mcnarya Nov 4 '10 at 13:26
add comment
up vote 0 down vote accepted

I was able to solve my issues by manually removing the solution from the GAC. Then I just tried to add the solution again and everything works well.

I had added the web part in question after the initial upload of the solution (sorry about leaving that part out of the description). Before doing this I was trying to retract and delete from the Central Admin then retry the addition. Apparently this didn't actually delete the solution from the GAC.

The site was using the old version of the solution which did indeed not include a SafeControl for the new web part. Once the old version was removed the addition of the new version went without a hitch and all is well.

Thanks to all for their suggestions.

share|improve this answer
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.