Home | Blog | Screencasts | Projects
# Thursday, August 28, 2008

In my first post dissecting the portal connection code, I showed the following code:

 

PortalConfig portalConfig = 
(PortalConfig)curSite.WebApplication.Farm.GetObject
(
    new Guid(curSite.WebApplication.Properties[PROP_KEY].ToString())
);

 

Notice the line: curSite.WebApplication.Properties[PROP_KEY].ToString()

The properties collection is scoped at the web application level. So if someone was to build a tool that called the Clear() method on this collection it would cause issues inside the Portal Connection tool.

So my point is to use the web application properties with other applications in mind, only clear your own state.

Thursday, August 28, 2008 8:01:40 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
code | Sharepoint | Work
Comments are closed.
Statistics
Total Posts: 134
This Year: 0
This Month: 0
This Week: 0
Comments: 20