Friday, June 4, 2010

"Value does not fall within the expected range" when adding a calculated column to the library/list.

You create a document library or a list.
Go to site settings and add a calculated column (named CAL1, or any other name) and then save it. This works fine as this is the first calculated column.
You add another calculated column which calculated the value based on the value from CAL1 (from previous step).
In such a scenario, we get an error "Value does not fall within the expected range". But at the same time, the column gets added to the site and functions as expected.

"Value does not fall within the expected range"


If you're trying to use it with a Calculated column, then you're trying to force a value into a column for which SharePoint itself is calculating the value.

i.e. CAL2 value is being calculated from CAL1 value which itself is unknown. Anything that is unknown, .NET will treat it as something out of range. Thus, we are getting the error.

With the above explanation, we do not have a resolution for the issue.
SharePoint should ideally show a warning message stating that we are calculating the value based on a column whose value is unknown. Instead of a friendly error message, we are getting a technical error from .NET/SharePoint which causes confusion that something is failing.

Tuesday, April 27, 2010

Office Documents open in (Read Only) mode.

You have a document library with more than 1000 items and you are not able to view the library in Explorer view. The problem occurs becayse by default WebDAV is configured to pull 1000 items and show it in Explorer view. This can be on SharePoint or any other site. Explorer view will fail with the following error message if the library/window contains more than 1000 items.

\\location is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. A device attached to the system is not functioning.

You need to increase the WebDAV limit by following the below mentioned knowledge base article:

You cannot access a WebDAV Web folder from a Windows XP-based client computer (kb912152)

Not able to access document library through Explorer View (A device attached to the system is not functioning.)

You have a document library with more than 1000 items and you are not able to view the library in Explorer view. The problem occurs becayse by default WebDAV is configured to pull 1000 items and show it in Explorer view. This can be on SharePoint or any other site. Explorer view will fail with the following error message if the library/window contains more than 1000 items.

\\location is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. A device attached to the system is not functioning.

You need to increase the WebDAV limit by following the below mentioned knowledge base article:

You cannot access a WebDAV Web folder from a Windows XP-based client computer (kb912152)

Monday, April 19, 2010

Good Administrators train their end-users for the product they support or maintain.

An organization usually has a model to govern the SharePoint deployment and maintenance. The important part of it is administrator. Usually, there are chances that organizations do know that the users should be trained on the concepts and know the product before using it to their advantage. Now, the term “user” can be sub-divided into “Power User” and just a “User”.
Power users are mostly those people who will be responsible for a site/site collection and will be assigned as an administrator for that site/site collection. A user as on the other hand will use the site for uploading data/business purposes.
Considering the user base, I would say the following things need to be set in place in order to have a proper SharePoint deployment and usage. Also, making the user aware of the following features/terms can greatly affect the budget for your IT infrastructure as there will be less support needed for simple issues.

1- Navigation
Users should be aware of the SharePoint navigation menu. Microsoft has made it very simple and similar to sites (non-SharePoint). An administrator should make sure that the users know how to use the navigation of SharePoint.
e.g. if a power user needs to make changes to the site, they should know where the settings are and how to navigate there. Where are the “MySite” links and how to change their user information. Power users may also need to know how to check permissions assigned to specific person/group and also permissions at the document library/list level.

2- What are Libraries/List and it’s features
What is a document library and what is the difference between a list/library? How can versioning be used by a user. How to use the workflow feature and also how to check the workflow? A User should know library/list and it’s features in order to make full use of them. If not , it is the power user/administrator who always does all the work and end users are generally not aware of the things that are actually possible. This can help individuals to reduce the information gap, as they themselves can get all the required information from the libraries and lists.

3- How Outlook can be integrated with SharePoint?
Outlook 2007 synchronizes well with SharePoint. Users can work offline and sync data when they come online with SharePoint. Also, meeting request, list data, etc features should be shown to user so that it reduces the time taken by them to do their work.

4- How to use the Recycle Bin?
In many situations, user deletes the item from list/library and opens a support incident to recover it back. With versions prior to SharePoint 2007/WSS 3.0, administrators have to restore the backup of the site to get the data back (even if this was for a single item). Now with SharePoint giving support for recycle bin, users can now, use recycle bin to recover deleted items. An organization can have a policy to retain the items in the recycle bin for certain amount of time and the same information can be flowed down to the users.

5- Wikis and Blog Sites
Nearly everyone has a blog on the internet. And wikis are so famous for providing information freely and easily. Wikis and Blogs can be used in a organization to trap information from the workforce. E.g. if a user leaves the organization, he leaves behind the technical/operational knowledge that he had in these wiki/blog sites. An organization should promote the use of such content trapping mechanism.

6- What to delete and when.
Very important. Users should know what to delete and when. This is usually governed by site owners/admins, but in case your organization has not enforced such policies, users should be trained on what needs to be deleted and what is the process for the same. This can be combined with the recycle bin training so that they complement each other.

7- How to customize the site in a “supported” way.
Microsoft (in their technet and msdn articles) have clearly defined what is supported and what is not. Yet there are cases where developers/SharePoint Designer users have made changes that are not supported in SharePoint. This can cause issues in upgrade/customization/backup restore and whole lot of stuff. Organizations need to make sure that the power users (who have the required permissions) be trained on what is supported and how they should make the changes.

8- Provide regular update about SharePoint and the changes that are done in the environment.
This way the user is aware of the changes done and not take any step that can cause harm.

Well, that’s the basic things that I can think of. It might not be as detailed as you expected, but I would like to leave the article searching skill to you. There is lot of content available on technet and msdn that can help you achieve the above goals. :)

Friday, April 16, 2010

What SharePoint Administrators should know about .NET Framework? (Part 2)

Find Part 1 of this series here:
Part 1 -

(..... continued)
.NET as a framework provides us with ASP.NET, a technology that is used for development of web based pages/sites. Now many of us get confused with .NET framework and ASP.NET. Some treat them as one single component/technology. But that is far away from reality. ASP.NET is a server side technology that again uses .NET framework. .NET framework code base can be used to create desktop or web based application. ASP.NET is the technology (built upon) .NET framework that helps us create web based applications using Visual Studio.
Now that we can differentiate between ASP.NET and .NET framework, we need to relate ASP.NET with SharePoint. But before relating it to SharePoint, we need to understand the relation of ASP.NET and IIS. ASP.NET is registered with IIS. So when a page request (for .aspx files) come to IIS, IIS knows that this request needs to be handled by ASP.NET. IIS authenticates the request first (this is when you get the username and password prompt and that is actually generated by IIS). Once the user is authenticated, IIS then passes the request onto the ASP.NET filter (aspnet_isapi.dll). The request is usually for a .aspx page. ASP.NET then reaches out for the page and processes the request with the help of .NET framework code base and CLR.
ASP.NET can be registered/Unregistered with IIS. When it is registered, we can check that out from IIS Manager -> Web Server Extensions. In this window, we will see the ASP.NET and it's version.
If ASP.NET is not registered properly, you now know that the web pages will not be rendered. IIS does not know where to pass the request and how to process it.

5) Web Services
A Web Service is actually a component sitting on the server. A call can be made to the web service from local or remote server. Mostly a web service is developed so that remote clients (which cannot be installed or are run on remote machines) and application need to use the functionality.
e.g. Office Clients use web services for getting meta-data (list.asmx), get workflow status, etc. So a Office application makes call(s) to the web service(s) located on the server. On the server, the web service is responsible for executing the code and return the result set back to the application from where the call was generated. The data transfer is usually done in XML (Extensible Markup Language).
If you want to check out the data that is being transferred between the client and the web service, take a network monitor trace and analyze the response that we get from the server. Also take a look at the .asmx (web service) that is being called. This way we can learn more about the web services and where they are used.

6) Windows Workflow Foundation
Workflows are used heavily in SharePoint. And Workflows need no introduction who have been working with SharePoint and administering it. But how do the workflow work and what is Windows Workflow Foundation.
Workflows that are executed on the Server is again something that .NET does. Also, Windows Workflow Foundation can be installed on Client Operating Systems like XP, Vista, Seven, etc. When a client open a document in Office and tries to make changes to the Workflow, the local Windows Workflow Engine starts to work. It can then communicate back to the server. Also, when SharePoint renders pages that are related to workflows, WWF runs on the server and executes to show up the results.
e.g. In a publishing site, if content approval is enabled for items in the "Pages" library, a workflow is started on the items (pages) that are created and eventually when the page is published the workflow is finished. This type of workflow is executed on the server. Well, frankly speaking, most of the workflows that are present in SharePoint are run on the server. There are timer jobs for Workflows that are run at specific intervals. These timer jobs communicate with the WWF/.NET for executing the activities present in the workflow.
We can look at WWF as a technology that standardizes workflow related activities across different machines. This technology provides various logic for the users/admins to create workflows that can be deployed and executed on SharePoint Servers. A workflow thus can be termed as a set of activities which run as per the business logic applied.
When a workflow fails, exceptions are usually trapped in the ULS logs (NOTE: We need to ensure that we are enabling logging for the workflow events from Central Admin site). You will find that the exception is raised from a class/assembly file, which is part of the .NET framework (System.Workflow class). Thus, we can find out which component within that Workflow class is failing and figure out what can be the possible issue.

What SharePoint Administrators should know about .NET Framework? (Part 1)

SharePoint is based on .NET technology and having knowledge about some of the .NET features and SharePoint Object Model will help administrators fine tune their troubleshooting and server maintenance capabilities. Previously, if we needed a Content Management System/Online Portal, developers need to develop custom applications from scratch. Now, this required creation of classes and pages from scratch. With .NET advancement, Microsoft included the basic set of functionality within the .NET framework which can be re-used and customized for array of common tasks that developers do while building web application. Let me give an example for the same.

If we need to build a calendar from scratch, we need to do a lot of coding, with .NET in picture and Visual Studio for our help; we already have an inbuilt calendar control which can be used on web pages. This greatly reduced the effort on developing such common tasks. Now, at the core, the idea still remains the same. We have a set of classes in .NET framework that renders the output on the page.
Thus, there is lot more functionality added to .NET framework with version 2.0 and 3.5. With such advances, .NET is greatly being adopted by many software professionals.

Now, that we have a “little” bit of understanding about the .NET framework, let us concentrate on what a SharePoint Admin needs to know about the .NET Framework.

1) Common Language Runtime.
As I have mentioned above, there are classes which are installed when we install the .NET framework. Now, to render the output of the code, files need to be processed. Common Language Runtime is a engine in .NET framework which understands the native Microsoft Intermediate Language (MSIL) and gets us the output. We need to understand that SharePoint is not a product alone and the core functionality comes from .NET framework, its classes and other Microsoft Technologies (NOTE: There are other technologies like IIS, SQL also used to help SharePoint Render the output)

When a web part/page is not rendered and we see an error message. It is good idea to turn on .NET tracing that will let us know what went wrong with SharePoint/.NET or any other component involved in the setup.
If you need detailed information on CLR, please refer to:

2) .NET authorization (Security Mechanism) used in SharePoint.
Authorization is different from authentication. Authentication is something handled by IIS. Authorization means which user has access to which content once they are authenticated by IIS. Thus, a user might be able to access the site, but he may not see the "Site Actions" link (because the user has read/limited access). This security is feature in SharePoint is taken from .NET. Also there has been some extensions done to the .NET code base, but the base classes used stay within the .NET framework. Check out New Security Features of .NET 2.0.
Authentication and Authorization.So, when a user gets access denied, we can check if everything is set up properly in SharePoint users and groups. There are situations, where we get only an "Access Denied" or "Unknown Error" error message and that is quite frustrating. We can take help from .NET here. Check for any .NET related errors in the event viewer and at the same time enable .NET tracing. This will again help in finding the root cause and resolve the issue.

3) Garbage Collection
Garbage collection is done by the CLR. Garbage Collection, is usually a termed used to refer a process of cleaning up system memory (once it is not in the scope for any use). CLR does the garbage collection automatically and there is little control a developer has on this. (Although there are ways to tell the CLR when to do the garbage collection, but that's from a developer stand-point). The concept of Garbage Collection can help administrators find out any issues with memory leaks, high performance usage on the server, etc. If the system is taking time we can look out for any issues with the .NET garbage collector process. This is usually done by doing a dump analysis (DebugDiag Tool). Although a dump analysis might not be easy for a SharePoint Admin, but if we find any .NET related errors, we can engage a .NET specialist to do the dump analysis for us. This will tell us if there is any Object that is not getting freed from the memory and what object is that. It can also help us narrow down any issues with custom code.
Garbage Collection (.NET)

What is SharePoint?

Hi Everyone, Welcome to my blog. I am working with SharePoint for last 3 years and have worked on mostly all the flavors (Except SharePoint 2001). From installation, planning to deployment and operation, I have been lucky enough to experience all the possibilities in which SharePoint can be used. Not only used, but also solve major business requirements and problems.

What is SharePoint?
SharePoint for me can not be termed as just a document management system or a web based collaboration tool. It is much more than that and can be used in many business areas. With proper planning and implementation, SharePoint can become a cultural change in your organization and improve the way people work.

SharePoint Portal 2003 can be termed as a product (which when properly implemented) can help people organize their files/items along with the metadata. With .NET 2.0 SharePoint had a major change in it’s architecture and functionality. Features like Search, Integration with Office, Authorization, Business App Integration, etc greatly improved. And this seems to be just the start, with the product in its early stages (although it has been more than 10 years that this product is in market with it’s different flavors). Microsoft is a visionary company and it knows the future of Web 2.0. With this in mind, many companies, apart from Microsoft are also developing applications that are web based and server collab and information sharing needs for individuals and organizations. Take for example Google Online Apps. The fact that SharePoint extensively uses the functionality of .NET framework, I have to admit that there is lot more to come in this product and bring changes…. positive changes.

SharePoint 2007 and Windows SharePoint Services 3.0 is a very improved product. It can serve an organization’s need for collaboration, organizing information, improve productivity, find relevant information in the organization’s (and external) data stores, and much much more. But this needs proper planning.

e.g. if we say that we need to take a dump of ‘unorganized’ files and put them into SharePoint (so that the files become organized), that is not going to help us. If we put the files without planning, it is just going to be an ‘unorganized’ pile of files in SharePoint. We need proper planning and implementation. Once done, as I said, it will bring a cultural change in the organization and we will now be having a very efficient way of storing data and finding it.

As the name suggest “Share” “Point”… we can also think of it as a single point where we can integrate other products and features and use it. With products like “SQL Reporting Services”, “Excel Services”, “InfoPath”, “Analysis Services”, “Dynamics CRM”, etc getting integrated with SharePoint, SharePoint alone can be used to get advantages of the other products.

As I am writing the article, I am also thinking about SharePoint 2010 and the new architectural changes it has gone through. I recently has a chance to get a look and use SharePoint 2010 and will try to incorporate all the things with the previous products (mostly 2007, WSS 3.0) along with SharePoint 2010 Server and SharePoint 2010 Foundation.

With that said, I would congratulate all the SharePoint lovers and users for making it such a success and improved product. Personally, I have been very thankful to SharePoint (and .NET framework) for what it has taught me.

If SharePoint was a person, I would like to meet and kiss him/her… :)

You might find these articles useful