Safe mode processing and Safe Controls
Friday, April 30, 2010
Any custom page is analyzed using the safe mode processing. This analysis puts security. processing in safe mode ensures that there is no script online personalized page. In other words insurance does not allow on-line processing mode script because a hacker attack can be mounted on the command line. If you try to run scripts online personalized page.
will get error ‘Code blocks are not allowed in this file’.
In case you still want to run in-line script in customized pages you need to specify ‘AllowServerSideScript=true’ in the ‘SafeMode’ tag section in web.config file.
<SharePoint>
<SafeMode ... >
<PageParserPaths>
<PageParserPath
VirtualPath="/sites/MySite/SitePages/*"
IncludeSubFolders="true"
CompilationMode="Always"
AllowServerSideScript="true" />
</PageParserPaths>
</SafeMode>
</SharePoint>
Insurance will help us determine the controls that will control customized pages. pages as controls can only be defined in the web.config file on the 'SafeControls. For example, in the following snippet of code that have defined custom pages can use the controls' Microsoft.SharePoint.WebControls.
<SafeControls>
<SafeControl
Assembly="Microsoft.SharePoint"
Namespace="Microsoft.SharePoint.WebControls"
TypeName="*"
AllowRemoteDesigner="True" />
</SafeControls>
0 comments:
Website Updates
-
Software Testing : An Overview of Framework Engineering - [image: Software Testing : An Overview of Framework Engineering] Framework engineering is something which has been comprises of so many things in order t...2 months ago
-
Upload files to SharePoint Doc Library from ASP.NET - [image: Upload files to SharePoint Doc Library from ASP.NET] Here is the custom code to upload files to SharePoint doc library from ASP.NET. You could us...3 months ago
-
Calculate Maximum of two Int – Decimal - long Numbers in C# | Math.Max() - C# provide a math function to calculate max of two numbers, This function have overloaded functions for long, int, float, decimal, short etc. if you fac...6 months ago
-
Can we have Non Abstract Method in Abstract Class in C# - Yes, you can have non abstract methods in abstract class. Along with non abstract methods you can also have abstract methods in abstract class. You can ...8 months ago
-
How to Use CAML Query to get Data from SharePoint 2007 List - All I wanted was to get some information from a simple list of products in SharePoint 2007. The list was pretty simple with two colomns "Product" and "Co...1 year ago