As I was working on customizing a SharePoint Calendar, someone asked me if it’s possible to add a Publishing Image Field to a SharePoint Calendar called “Event Image” to display the current event picture. I decided to write this post to explore the options that I have in this case.
Option #1:
I tried to add a new column to the calendar list, but I couldn’t find a column with the Publishing Image type.
PS:
You can add a Hyperlink or Picture Column as shown below, but it has a different behavior in the Add/Edit forms as it doesn’t has a browse dialog to search for image location.
Option #2:
I tried adding an existing Publishing Image Site Column such as Page Image (found in Page Layout Columns) and it works fine but will keep the name of “Page Image” instead of “Event Image”.
Option #3:
The 3rd option is to create a custom content type that inherits form the Event Content Type using Visual Studio 2010 and below are the steps to do so:
To create a SharePoint 2010 content type application solution in Visual Studio 2010
To edit the content type details in the Elements.xml file
To add a field to the Elements.xml file
To deploy the project
The Final Markup should look like this:
Additional References:
Larger IT organizations are likely to have a proliferation of SQL Server installations that are not fully known to the internal IT department. Furthermore, some of these installations may be in various stages of repair because they are not managed systematically. If these unsupervised SQL databases carry business-critical or sensitive information without backup or control, this can be problematic for the organization.
The MAP Toolkit helps you create an inventory of all the SQL Server installations in the network, complete with component and version information. This information can help you consider the value of consolidating, possibly virtualizing, certain databases, and bringing them under IT supervision when appropriate.
To do so , follow below steps which will guide you through this.
Select an account that have administrative permission on the targeted servers, you can add more than one account , and the MAP tool will try to login to servers using all the accounts sequentially until it succeed to login
select all the SQL servers to participate in the analysis
Though it runs a different thread where you can continue using the tool simultaneously but for SQL MAP you have to wait until this (collecting counters) are completely finished.
Now collect performance Data step is done.
Finish
Important: I will show in a later step where to find and how to read all the reports generated by our assessment.
After completing all previous steps , its now time to generate the reports :
Or there is another way to generate all reports of your selection :
Note: Reports and proposals are created in folders named after the database currently in use.
it can be defined simply as reduce the number of physical SQL servers, by migrating/moving different SQL databases running on different servers into one high performance server machine.
Early in the process of a consolidation project, you will create a profile to help identify which applications are good candidates for consolidation. Then you can identify the applications that fit this profile.
Some general traits that make an application a good candidate for consolidation are:
SQL server consolidation can be achieved mainly through one of the below strategies:
Each of these strategies has different advantages and disadvantages related to security and compliance requirements, high availability and disaster recovery requirements, resource management benefits, level of consolidation density, and manageability tradeoffs
Consolidation projects are typically started to achieve specific goals such as creating room for new servers or reducing operating expenditure. These goals can be broadly grouped into the following categories:
when choosing one of the consolidations strategies each of which has its cons and pros, in the below checklist im trying to list the main concerns to take care of , these concerns can be captured from different views as the following :
answering the below checklist will help you to decide the best strategy for your environment:
Category
Check item
Yes
No
Security
Share SQL service account for all applications (dbs)
Database
Instance, VM
Do you need to isolate system admins (e.g. sa)
Instance , VM
Do you need to isolate local windows admin account
VM
Instance, database
Do you seek isolation on SQL binaries' and patching for each application DB ?
Resource management
Full software & hardware resources isolation , Hard limits on CPU and memory usage set per application
VM, Instance-partially
High availability
Applications (DBs) can be moved to different HW without windows restart or downtime
Isolation of tempdb, one tempDb for all applications (dbs)
Isolation of server level objects (credentials, linked servers, msdb, SQL Server Agent jobs, and so on)
VM, Instance
Density
Best performance when same hardware is provided
database
Manageability
Reduces number of physical servers to maintain
Reduces number of Windows installations to maintain
Reduces number of SQL Server instances to maintain
Are you seeking reduced management overhead and licensing cost
Consolidation method
Number of applications
Throughput
Response time
Host system CPU utilization
Baseline (old hardware)
1
100%
6%
Virtualization
24
+0.8%
80%
24%
Instance
+0.6%
58%
20%
+0.9%
53%
16%
40
95%
45%
+1.1%
73%
37%
+1.3%
55%
34%
Table : sample Density results based on throughput (higher is better) and response time (lower is better) across options
next blog , how to use MAP tool to assess your environment readiness for SQL consolidation :
http://blogs.technet.com/b/meamcs/archive/2012/09/24/how-to-use-map-tool-microsoft-assessment-and-planning-toolkit.aspx
References: http://msdn.microsoft.com/en-us/library/ee819082.aspx
What is Divisional Portal?
A divisional portal is a SharePoint Server 2010 deployment where teams mainly do collaborative activities and some content publishing; for example it can be used for hosting an Intranet Portal with multiple Departments. In general we usual face the choice between using sites or site collections. Below we will go through each scenario in more details:
Single Site Collection Portal:
In this scenario the divisional portal will be built using a single site collection, and all the other Teams will be created using sub sites under the root portal. This approach have the following characteristics:
Multiple Site Collections Portal:
In the scenario the divisional portal might have a root site collection to aggregate the contents (like News) coming from other Teams. The Teams here is implemented using separate site collection each. This approach have the following characteristics:
Conclusion:
Before making the decision to choose one of the above approaches, you need to study and review your solution carefully and make sure that it covers the requirements. In addition you need to consider the operational & administration effort behind each approach.
Most of us have worked with Visual Studio deployment projects to create setup projects for components we developed. In many cases we used the custom user interface dialogs that come with Visual Studio to take extra parameters from the user. The problem happens when you require extra parameters than Visual Studio provides or custom user interface dialogs. In my case what I needed is a dialog to take username and password fields from the user and hence I wanted to apply a style to one of the edit box controls to be a password field. In the following I will show you how to create a new custom dialog and how to mark an edit box as a password field.
Visual Studio setup project has the functionality to add extra dialogs from a library of custom dialogs as shown in the figure below.
So what I wanted to do is to customize one of the three textboxes dialog and create new one where I change one of the fields to be a password field. To do this you will need ORCA MSI editor from the Windows SDK Components for Windows Installer Developers here. The steps are as follows.
1- Close the Visual Studio.
2- Browse to the folder “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment\VsdDialogs\0”and make a copy of the file “VsdCustomText3Dlg.wid” and rename it to “VsdUsernamePasswordDlg.wid”
3- Open the file “VsdUsernamePasswordDlg.wid”in ORCA.
4- Change all occurrences of “CustomTextC”to “CustomTextD” in all tables and all values.
5- In the module signature table make sure you edit the GUID and replace it with a new GUID
6- Open the “ModuleDialog”table and change the display name to any name you would like
7- Open the “Control” table and then change the attribute of the second edit box control to be a password field by changing the value to “2097159”
8- Save the file.
9- Open the “Module signature”table and change the value of the language to be 1033 (for English)
10- Save the file in the folder“C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment\VsdDialogs\1033”with the same name.
11- Close ORCA and re –open Visual Studio.
12- Now when you open the add dialog you will find that your custom dialog is added to the list of dialog.
You can edit and create any custom dialog you want to the list of dialogs used by the setup solution but remember that your project will not be built unless this custom dialog exists on the development machine.
So, I finish the deployment of a multi-server SharePoint farm, and I setup the Search Service Application; I was able to configure Search and browse the admin pages in central admin successfully. After trying to browse the search admin main page from central admin a couple of days later, I got the error message "The base type 'Microsoft.Office.Server.Search.Internal.UI.SearchFarmDashboard' is not allowed for this page. The type is not registered as safe". To resolve this I added the following line to the Central Admin web site's web.config:
<SafeControl Assembly="Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI" TypeName="*" />
But when I clicked the Search Service Application name from searchfarmdashboard.aspx I got the error message "Code blocks are not allowed in this file." To resolve the issue, I added the following line to the Central Admin web site's web.config:
<PageParserPath VirtualPath="/searchadministration.aspx" CompilationMode="Always" AllowServerSideScript="true" />
Hope this helps!
Our world is becoming globalized, distributed/clouded more and more. That is very true especially for IT in both consumer and enterprise space. Some examples would be Amazon AWS, Google Documents, Windows Azure Services, Office 365, Windows 8 UI Applications. Within this world, to develop scalable, fluent, and less-dependent/resilient applications, asynchronous programming approach can be used.
In this post, I will give you the big picture of async world (what is it, why to use, and how and when/where to use it) within .NET platform. In the next post, I will focus on MS-recommended approach (task-based asynchronous programming TAP).
In short, asynchronous programming is to enabling delegation of application process to other threads, systems, and or devices. Synchronous programs runs in a sequential manner whereas asynchronous applications can start a new operation and without waiting the new ones’ completion it can continue working on its own flow (main operation). To simplify, let's visualize a case where a person send an email and can do nothing till a response received from a sender. Here is the tasks beyond sending email are blocked by the response that you have no control over and may take for a while. What would be the asynchronous way is to send the email and continue working on other tasks while waiting the response from sender. In order to capture the full context of asynchronous programming, we need to understand roles and meanings of OS, CLR, application domain, thread, process.
Any point where your application initiates an operation that is long-running and/or Input Output-bound. For example, you may leverage asynchronous programming in the following scenarios
Let me explain it with an example: A simple application that process data from 2 Xml documents into a list. Here is the pseudo code:
Now, I am interested in only line 1-3 to differentiate use of sync and Async calls.
Here is code snippet showing the ProcessXml and Book objects and the method that does the parsing:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Threading.Tasks;
namespace AsyncDemo
{
public class ProcessXml
/// <summary>
/// Parses 'book' named elements from a file into a list of Book objects
/// </summary>
/// <param name="path">file path</param>
/// <returns>List of Books obj</returns>
public static List<Book> ParseToList(string path)
//System.Threading.Thread.Sleep(1000);
if (System.IO.File.Exists(path))
XDocument doc = XDocument.Load(path);
if (doc != null)
var coll = doc.Root.Elements("book").Select(p =>
new Book
Author = p.Elements("author").First().Value,
Title = p.Elements("title").First().Value,
Genre = p.Elements("genre").First().Value,
Price = double.Parse(p.Elements("price").First().Value),
PublishDate = DateTime.Parse(p.Elements("publish_date").First().Value),
Description = p.Elements("description").First().Value
});
return coll.ToList<Book>();
}
return null;
public static Task<List<Book>> XmlProcessEngineAsync(string path)
List<Book> list;
list = doc.Root.Elements("book").Select(p =>
}).ToList<Book>();
return null; // (Task<List<Book>>)list;
public class Book
public string Author { get; set; }
public string Title { get; set; }
public string Genre { get; set; }
public double Price { get; set; }
public DateTime PublishDate { get; set; }
public string Description { get; set; }
Here are 2 unit test methods that demonstrate the scenario both sync and Async manners:
/// Tests the method synchronously
[TestMethod]
public void ParseToListTestSync()
books1 = ProcessXml.ParseToList(file1);
books2 = ProcessXml.ParseToList(file2);
var list = MergeLists(books1, books2);
Assert.IsNotNull(list);
/// Tests the method asynchronously with APM approach w/o callback
public void ParseToListTestAsyncWithAPM()
books1 = books2 = null;
DelProcessing del = new DelProcessing(ProcessXml.ParseToList);
IAsyncResult result = del.BeginInvoke(file2, null, null);
books2 = ProcessXml.ParseToList(file1);
//if (!result.IsCompleted)
//{
//this runs in main thread; do some other stuff while async method call in-progress
//Thread.Sleep(1000);
//}
books1 = del.EndInvoke(result);
Here is the screenshot from the run results
As you can see, the 1st test method calls the function in a synchronous way:
2nd test method calls the function in a asynchronous way:
Here is the picture demonstrates this:
Since the version 1.1, .NET support asynchronous programming, since then each release brought new enhancements (delegates, TPL, etc.). Here is the picture taken when searching Async methods available within With FW 4.5.
With FW 4.5, there are 3 patterns available for Async development:
APM style can be implemented in 2 ways; with or without a callback. Sample call above (ParseToListTestAsyncWithAPM) is an example for non-callback APM. We can implement same functionality with a callback as seen below:
1: /// <summary>
2: /// Tests the method asynchronously with APM callback
3: /// </summary>
4: [TestMethod]
5: public void ParseToListTestAsyncWithAPM_Callback()
6: {
7: books1 = books2 = null;
8: int t1 = System.Threading.Thread.CurrentThread.ManagedThreadId;
9: int t2 = 0;
10:
11: DelProcessing del = new DelProcessing(ProcessXml.ParseToList);
12: IAsyncResult result = del.BeginInvoke(file2, (r) =>
13: {
14: books1 = del.EndInvoke(r);
15: t2 = System.Threading.Thread.CurrentThread.ManagedThreadId;
16: }, null);
17:
18: books2 = ProcessXml.ParseToList(file1);
19:
20: var list = MergeLists(books1, books2);
21:
22: Assert.IsNotNull(list);
23: Assert.IsTrue(t2 > 0);
24: }
Let me explain this little bit more in detail:
TAP is the simplest one and is recommended by MS. Here is the code for implementing the same scenario with TAP:
2: /// Tests the method asynchronously with TAP
5: public void ParseToListTestAsyncWithTAP()
7: int t1 = System.Threading.Thread.CurrentThread.ManagedThreadId;
8: int t2 = 0;
9:
10: books1 = books2 = null;
11: Task.Factory.StartNew(()=> {
12: books1 = ProcessXml.ParseToList(file2);
13: t2 = System.Threading.Thread.CurrentThread.ManagedThreadId;
14: });
15: books2 = ProcessXml.ParseToList(file1);
16:
17: var list = MergeLists(books1, books2);
18:
19: Assert.IsNotNull(list);
20: Assert.IsTrue(t2 > 0);
21: }
TAP is hot:), will explain this in detail in my next post hopefully. For now, I would like to share the results of my efforts so far with you:
Obviously, perhaps another post would be good for comparing sync vs async or APM vs TAP by running load tests. We will see. This is a very live world/sector and there are many things to unleash, is not it?
Wow, that has been my longest post:). Forgot how fast time passed here in Robert’s Coffee in Istanbul.
Well, in this post, I have explained various aspects of asynchronous programming; meaning, differentiations, why and how-to-use. Asynchronous programming can be implemented in both client and server side and provides scalability and performance advantages over synchronous programming. I would certainly recommend you to invest some time on this, since it is now simpler (TAP) and use of it becomes almost a must-have due to more integration to cloud applications.