Link to home
Create AccountLog in
Avatar of ITdesk
ITdeskFlag for Israel

asked on

How to deploy solution DLL to bin - Sharepoint 2007

Hey, i know there is a way to develop a webpart/event handler/Everything else, and then instead of creating a feature and deploying it on the remote server, just coping the build DLL to the bin folder of the virtual directory in the server and it should work.

Is there anything else i need to do for it to work? Somehow enable it on the remote server?
Avatar of Jamie McAllister
Jamie McAllister
Flag of Switzerland image

In addition you need to add a safe control entry to web.config and add the part to the web part gallery. The steps are detailed here:
Avatar of ITdesk


Should i start with a class library? Not any sharepoint type project?
Avatar of ITdesk


I have seen other developers that made 1 project to contain all their WebParts in one DLL.
Whatever you're comfortable with. They mention a class library in the article because the SharePoint project templates weren't widespread when they wrote it.
Avatar of ITdesk


Ok im trying that out right now. Thanks.

Will update soon!
Avatar of ITdesk


Not working... Followed it step by step, (except that i made a sharepoint WebPart project), and there's nothing in the web part galley to add
Try an IIS reset to get the safe control entry recognised.
Avatar of ITdesk


Will it help for sure? cuz its a production server... and an IIS reset will pause the server for some time
I'd suggest you demonstrate any new concept well away from production every time.

The steps work, I suggest you try them again on a different server and come back to production with the lessons learned.
Avatar of ITdesk


Wish i had one :)
I'llI IIS reset later when no one's at work.

Will update
Also suggest you double check the steps make sure nothing was missed.

Avatar of ITdesk



1) Create new project (Sharepoint WebPart Project) named MccannNew
2) Deleted the default created webpart folder names WebPart1
3) Add -> New item -> Sharepoint webpart, Named HelloWorld
4) Add simple code to CreateChildControls Sub:
Dim label As New Label()
            label.Text = "Hello World"

Open in new window

5) Build project to virtual directory BIN folder on the server
6) add safecontrol:
<SafeControl Assembly="MccannNew" Namespace="MccannNew" TypeName="*" Safe="True" />

Open in new window

thats it right? all the steps are good?

The Assembly name in the safe control entry doesn't look right. Usually there's a version number and culture, and the name is an amalgamation of the namespace and class. Can you double check that? .NET Reflector would tell you the full assembly name for instance.
Avatar of ITdesk
Flag of Israel image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Excellent. Glad to hear this sorted the issue.
I think this thread should be marked as answered and not deleted don't you?
OK, the expert postings led you to the answer but no points are being awarded. Your other question currently being deleted on EE also led to the answer but no points are awarded.

I have asked for clarification on why the post is being deleted rather than marked as answered but not received a reply.

Do you understand how this forum works?