Saturday, February 17, 2007

CAS and SharePoint

I have been working with SharePoint WSS2 SPS 2003 for about a year and a half now and what has been the most frustr... challenging part has been dealing with Code Access Security and trying to convince others that we are now developing in an environment where we don't have unrestricted access to the server(s).

Typical examples are writing web parts that in the initial design saved their configuration settings in xml files... You might shake your head but it's true ;)

If you say that's a good idea let me ask you where do you save these files? How do you ensure that the code can access these files? How do you ensure that every user running the code can access these files?

You have a solution to this too!!

In a load balanced environment how do you ensure that all these files are in synch, how many copies do you have, what happens when the server admin is adding a new web front end?

OK so this is a rookie mistake, but a lot of us will run into it because we are coming from ASP.NET or other environments and we must now use SharePoint and thus play by some rules.

What I will try to do is write a few posts about Code Access Security, and try to show how it's working and help you that are new to WSS MOSS SPS... get a much easier transition than I had.

More to come.
/Jonas