Tuesday, July 14, 2009

Adding new assembly to SharePoint

There are two ways to use your assembly in SharePoint:
1. Copy it to bin folder.
2. Move assembly into GAC.

If you put it in your bin folder, you will have partial trust, and your component cannot access to system resources such as registry. If you want to have full access then sign the component and add it to GAC.

After you add it to GAC, you have to add 2 entries to web.config:
1. To safe controls:
<safecontrol assembly="Baris.Security.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=20408sdf323sf" safe="True" typename="*" namespace="Baris.Security.Common">

2. To compilation:
<add assembly="Baris.Security.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=20408sdf323sf">

No comments: