-
When to make a feature hidden
When creating a Feature that contains a Feature receiver performing certain tasks that require special permissions, consider making it a hidden Feature, thereby requiring activation via STSADM.EXE. Why? When a Feature is activated from the browser interface, the code is executed within the context of the configured identity of the application pool hosting the Web application containing the site collection. This identity may not have the necessary permissions, such as writing to the file system. However, when a Feature is activated using STSADM.EXE, the identity of the user performing the command is used, who may have more permissions than the application pool’s identity.
-
Feature Scope
A Feature's scope enables developers quantify how broad the effects of activating the Feature are. If a Feature is scoped at the site level, then activation affects only the SharePoint site it is activated within. However, if it is scoped at a site collection level, then the activation affects all sites within the site collection. To administrator, the scope affect where the feature can be activated to after the feature is installed. If it is farm feature, it can be activated at http://.../_admin/ManageFarmFeatures.aspx, if it is webApplication feature, it can be activated at http://.../_admin/ManageWebAppFeatures.aspx, if it is sitecollection, it can be activated at http://../sitecollection/_layouts/ManageFeatures.aspx?Scope=Site, if it is site feature, it can be activated at http://../site/_layouts/ManageFeatures.aspx
-
The order of service call
By default the service call can be called without any pre-defined order. Microsoft provide a proprietary feature to support ordered call. This is only meaningful only when session is supported. IsInitiating and IsTerminating are two properties of OperationContract attribute. By default IsInitiating is true, means it can be called first in a session. IsTerminating is false by default, means the session can call other service after this call.
-
ServiceContract vs ServiceBehavior
In WCF, ServiceContract attribute affect the behavior of both client and server, while ServiceBehavior only affect the behavior of server. ServiceContract can apply both to interface and class, but ServiceBehavior can only apply to class implementation. ServiceContract affect the wsdl emitted, but ServiceBehavior will not affect wsdl emitted.
-
Using vs.net database edition
- Create Project -> Database Projects -> Microsoft Sql Server -> Sql server 2005. It will create create a cache database [project_name]._[GUID]
- Build. It will generate [project_folder]\sql\*.dbmeta, *.sql file
- Deploy. It will create database in the name of project. This database is known as Target Database. The deployment deploy the change between the cache database and the target database to target database. The target database is normally local the developer, so developer can have local integration test. We should not use shared development database or integration database as target database for development. They are for integration test.