The UnauthorizedWebPart constructor, in both of its overloads, calls base constructors in the ProxyWebPart class. These constructors each initialize property data and create a new instance of an UnauthorizedWebPart control.
When the WebPartManager control is adding WebPart controls (and other server or user controls) to its collection of controls, it checks each control using the IsAuthorized method. If a control instance is not authorized, certain property values from the control (such as its ID) are assigned to properties in a new UnauthorizedWebPart control, and the UnauthorizedWebPart control is then added to the control tree of the page in place of the control that failed authorization.
An UnauthorizedWebPart control is never rendered in a page, and a user has no way of knowing it is there. However, an UnauthorizedWebPart control also acts as a placeholder, maintaining the position of the original control in the control tree, and maintaining any preexisting personalization data for the original control. That way, if a user previously personalized a control, it then becomes unauthorized for some reason, and later it is authorized again, the user's personalization data can be restored.UnauthorizedWebPart IsAuthorized ASP.NET Web Parts Pages
|UnauthorizedWebPart (WebPart)||Initializes a new instance of an UnauthorizedWebPart control, called when a static WebPart control (or server or user control) fails authorization.|
|UnauthorizedWebPart (String, String, String, String)||Initializes a new instance of an UnauthorizedWebPart control, called when a dynamic WebPart control (or server or user control) fails authorization.|