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:

http://www.datasprings.com/resources/articles-information/sharepoint-2007-custom-web-parts
Avatar of ITdesk

ASKER

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

ASKER

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

ASKER

Ok im trying that out right now. Thanks.

Will update soon!
Avatar of ITdesk

ASKER

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

ASKER

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

ASKER

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

ASKER

Checklist:

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"
            Me.Controls.Add(label)

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.
ASKER CERTIFIED SOLUTION
Avatar of ITdesk
ITdesk
Flag of Israel image

Link to home
membership
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?