SmartPart Architecture and Code Access Security (CAS)

Maxim Karpov has finished his article about CAS and the SmartPart, this one is a must read for everyone into SmartPart development. Read the full article here. Nice work Maxim!

Last week, Jan Tielen released the latest version of SmartPart for SharePoint project. This version of SmartPart supports the connection between two ASP.NET User Controls, so now you don’t have to write the communication boilerplate code for custom Web Parts in order to connect to create Provider and Consumer. If you’ve developed Web Parts, then you know that there is no design-time support for User Interface elements and you have to write the UI code yourself in addition to the business logic that the web parts have to implement. SmartPart Web Parts provide a way to reuse existing ASP.NET User Controls by simply referencing them inside of the SmartPart, it provides access to the SharePoint object model and the communication framework for connecting two controls together. That allows a business developer to focus on the integrating external business applications and process. In this post, I will provide the architectural overview of the SmartPart code base, and I will then guide you through creating User Controls that communicate with one another through SmartPart framework. Furthermore, I hope to explain how Code Access Security (CAS) affects SmartPart Web Part. And finally, I will give you step-by-step directions on how to update CAS files to run SmartParts assembly as full trusted without the need of registering inside Global Cache Assembly (GAC). This should provide you with the roadmap to begin using SmartParts in your SharePoint  projects.

1 Comment

Comments have been disabled for this content.