I am trying to create a SharePoint 2010 web part. The web part I am trying to create will contain, amongst other things, a custom asp.net server control as a dll. The dll refers to a number of files including a .js file that are all contained in a resources directory. This all works perfectly when I create a generic web part, I can add a reference to the dll and include the resources directory in the VS 2010 project - I can then use the web part and the control it contains with no problems at all. The problem I have is that when I try and create a web part to use in SharePoint 2010 the web part is visible in the SharePoint web part gallery, and the web part can be added to a page, but the control inside my web part (my asp.net control) is never initialised. I believe that this may because the .js file in my resources folder, which my control requires, is not able to be called when the solution is deployed to SharePoint??? I'm a first time SharePoint developer so any thoughts or ideas on where I should be placing these files, or where I am going wrong would be very greatly appreciated! Thank you!
Asked
Active
Viewed 209 times
1 Answers
0
Your dll must be signed with a strong name, that means it has to be compiled using a key in visual studio. You must also ensure that this dll is registered as safe in the sharepoint site web.config.

Eric Herlitz
- 25,354
- 27
- 113
- 157
The .js file is in the download directory. This works in the generic web part, but not in the SharePoint one – user3510199 Apr 08 '14 at 14:59