Thursday, November 24, 2011

Run STSADM command from anywhere with in the SharePoint Server

Follow the following steps :

(1) Right Click on My Computers and then Click on Properties
(2) Select "Advanced" tab
(3) Now in the Environment Variables -> System Variable Section, select each entry, click edit and in the value text box, after the existing Variable value place a semi-colon ";" and then add the bin path i.e., "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\ "
for e.g.,


(4) Now Click OK. Do this for all the entries that are there in the Environment Variables.


Now you are ready to run the STSADM command from anywhere in the SharePoint Server.


Date Changes, Month Changes, Year Changes, Be Yourself, No Matter What ever Changes......!

Thursday, March 17, 2011

Pulling up the data from the SQL Database Server (other than SharePoint Lists) and reusing the SQL Data Viewer Webpart for SharePoint

- This was actually the inspiration from one of the Sam's Blog. Purpose to repost is to put it all together in my Blog with other SharePoint Related Blogs.

Requirement:
  • This Webpart is being developed for SharePoint Sites.
  • To make the Webpart more user-friendly, we will provide the Webpart properties for the user to configure the Data source, connection and query instead of making it hard coded
  • Username and Password for the Database should be configurable through Webpart properties and once the Password is entered, it must be hidden with the Password character
  • User must have the ability to enter the T-SQL command in one of the Webpart property and the query result should be displayed in the Grid View
  • The Grid View must have paging and user should be able to control how many records to show in each page by setting a Webpart property

Enough of the requirements part, now let us design this:


I am going to design this Webpart development in 3 phases mentioned as follows

  1. Developing the re-usable Webpart in Visual Studio 2005 and deploying it to SharePoint (Just with a simple text message – to verify whether the Webpart has been deployed successfully into SharePoint Site or not)
  2. Create the Data Access library and display query results in Grid View
  3. Customize the Webpart properties for Dynamic connection to SQL Server and to enable paging in Grid View

We had enough design for this custom Webpart. We now see each phase in detail.

Things we need before starting any of the 3 phases:

  • Experience in C# or similar programming language
  • This has to be developed in Visual Studio 2005 where the SharePoint Server is being hosted.


PHASE I - Building a Webpart project in Visual Studio 2005

  • Start Visual Studio 2005 and select File -> New -> Project and click on Visual C# -> Windows -> “Web Control Library”
  • In the name field type DataViewer and then Click OK
  • In the Solution Explorer, rename the file WebCustomControl1.cs to DataViewer.cs
  • Open DataViewer.cs and delete the following lines just below the DataViewer namespace
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:WebCustomControl1 runat=server>")]
  • Examine the line below
    public class DataViewer : WebControl
  • The above line is inheriting from the WebControl Class and as we are developing the Webpart, we will inherit this from the Webpart class as follows
    Public class DataViewer: System.Web.UI.WebControl.Webparts.Webpart
    You can also write the above line as highlighted below by using the name space on top of the cs file as follows:
    using System.Web.UI.WebControl.Webparts;
    Public class DataViewer: Webpart
  • Now delete all the text property code and write the following in the RenderContents method as follows:
    output.Write(“DataViewer Webpart Testing”);
  • Now open the assembly.info.cs and modify the AssemblyVersion to [assembly: AssemblyVersion(“1.0.0.0”)]
  • Now open the properties page for the Project by right-click on the Project name and select Properties
  • Click on the Build on the left menu and change the Output path to the SharePoint WebApplication ‘s Bin folder to make this Webpart available for the whole Site Collection.
  • Now build the Project – now dataviewer.dll and dataviewer.pdb will be generated upon successful build.
  • Add the SafeControl for this Webpart in the web.config file of the SharePoint Webapplication for which you have choose the Output Path for the build
  • Save the web.config file and close it.
  • Now go to the SharePoint WebApplication in which you have deployed this Webpart.
  • Site Actions -> Site Settings and under Gallery Section click on Webparts and then click on NEW and you will find the recently deployed Webpart, click on this and name the Group type and Quick Add Groups to easily find this Webpart in the Add Webpart gallery.
  • Now go to the SharePoint Page where you wanted to add this Webpart and edit the page and click on Add a Webpart and then choose the recently added “DataViewer Webpart”.

Once you have added this Webpart, this Webpart should display the text “DataViewer Webpart Testing” and this concludes Part I.

Further to this phase we will see how the coding is done in Data Access Class followed by how the Webpart properties are developed to re-use this SQL Data Viewer Webpart for SharePoint.







Date Changes, Month Changes, Year Changes, Be Yourself, No Matter What ever Changes......!

Saturday, March 5, 2011

Why Decryption when we can go for Encryption in ASP.NET?

As I was a bit busy these days with no work, got deviated in other activities for the welfare of my career and so have to be away in updating my blogs - Anyways.

This time, I would like to share with you, few of my ideas on Encryption and Decryption and more over would like to know what could be the challenges if I follow this while dealing with Password code. I thought, it would be a good idea to put it in the blog and participate in this discussion.


Baseline: WHY TO USE DECRYPTION, WHEN WE CAN MANAGE THE CODE WITH JUST ENCRYPTION. (Specific to only scenarios where we go for Decryption even if it is not necessary)

First thing first: There are several functions and we can create our own encryption functions, however, we have direct functions to encrypt the text and submitt it. i.e.,

FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassWord.Text, "SHA1");

Lets take a simple example of a Registration Screen and Login Screen.


Simple Registration Screen:

If we think about this, we can have just a Username, Password, DOB. (we can have many more but as we are considering simple Registration Form, I am just considering this)

We need to take care of the following:


  • Username should be Unique.
  • Password should be encrypted while submitting the data to the back-end and
  • Any other field such as DOB for verification in case of forgotton password or something else

As I am now confined to with Encryption and Decryption, in this blog, I will worry about only the highlighted thing i.e., "Password should be encrypted while submitting the data to the back-end".

In such scenarios where there is a Registration Form and a Login Form, and where we need to submit the data and need to retrieve the submitted data, using Decryption doesn't make any sense (no offence on making this sentence) because of the following strong reason.

* Not safe to transfer the clear text to the server due to theft and more over Password is the only way to secure and have to be very keen about securely providing the information while sending through electronically.

Simple Login Screen:

If we think about this, we can have just a Username, and Password only.

For this, we need to take care of the following:

•Username should be Unique.
Password from the Database should be decrypted while checking the login information with the data which is already there in the back-end server.

As I am now confined to with Encryption and Decryption, in this blog, I will worry about only the highlighted thing i.e., "Password from the Database should be decrypted while checking the loging information with the data which is already there in the back-end server.".


We now need to ensure, that the login information matches with one of the records in the Back-end server, hence for this, we usually decrypt the Password residing in the server and then bring it to the Front-end and compare the Clear text value, which is not safe, instead, if we encrypt the login information and compare the encrypted values at the server, and based on the match we will redirect the user to the corresponding pages.


Transffering the sensitive information electronically is not safe atleast to some extent, and hence I prefer to encrypt the login information and compare the encrypted values at the Back-end server as it is going to be a one time job (as mentioned in the specific scenarios only).

Hence, I think "Why Decryption when we can go for Encryption in ASP.NET".


Any comments or contradictions, please feel free to put it here.

Everyday is a learning day.











Date Changes, Month Changes, Year Changes, Be Yourself, No Matter What ever Changes......!

Tuesday, January 25, 2011

Debug Diagnostic tool v1.1 for troubleshooting IIS Processes

What Debug Diagnostics Tool can do for us?

Debug Diagnostic Tool is mainly used for troubleshooting IIS Processes which includes the following:

  • IIS Crashes
  • IIS Hang
  • Memory and Handle Leak

IIS Crashes - Captures user Crash dumps on unhandled exceptions. Optional configuration allows associating actions on handled exceptions, breakpoints and process events.

IIS Hang - Capture user dumps and performance logs used to troubleshoot IIS Hang symptoms.

Memory and Handle Leak - Use Leak track to track outstanding memory allocations and kernel object handles. Capture an user dump used to analyze memory and handle leaks.

We can download "Debug Diagnostics Tool V1.1" this tool and it is free and available at URL:http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en Note: This installer is also associated with .dmp files(dump files). We can check this option or ignore at the time of installation.














Date Changes, Month Changes, Year Changes, Be Yourself, No Matter What ever Changes......!



Saturday, January 15, 2011

Information about SharePoint 2010 by an Expert

Kick Start SharePoint 2010 - A Session with Valuable Information by a MicroSoft Expert


In past, SharePoint is well known as a product, and now Microsoft proudly announces that Microsoft SharePoint 2010 is no more a product, instead it is a Platform. Microsoft 2010, is not just only a portal site, it is enhanced in many ways for Content Management, Business Connectivity Services, faster customizations by using Office tools like SharePoint Designer, webparts, highly integrated with various Database Servers to get and also to update the data in the external Databases, and much more which we will be discussing further in this post.


Microsoft SharePoint 2010 is robust, more unique and sophisticated when compared to its previous version and below are the key differentiators for making Microsoft SharePoint 2010 so unique.



  • Performance Point Service being integrated in the SharePoint Server.

  • Embedding Business Connectivity Services

  • Enhanced Search Results which allows you to see the content with in the document, page, site, e.t.c.,

  • Greater User Interface which allows the development rigorously faster and easier.

  • Many new features such as REST, Client Object Model, LINQ, Out of the box XSLT Views and much more...

  • Ribbon is added, which behaves contextually - will see in detail in this post.

  • Enhanced Out of the box Workflows, which can be further customized using browser itself.

  • Service Application Architecture is an substitute for Shared Service Provider - SSP is no more in Microsoft SharePoint 2010.


Basic concepts of Microsoft SharePoint 2010 are categorized into the following:



  • Business Collaboration Platform for Enterprise and the Web

  • SharePoint 2010 Development Platform

  • New Service Application Architecture

Business Collaboration Platform for Enterprise and the Web

Sites

Communities

Content

Search

Insights

Composites



Sites


  • Quickly and easily find and use relevant features with the new contextual SharePoint Ribbon.

  • Manage SharePoint 2010 more efficiently with a streamlined administration experience.
  • Use the SharePoint Ribbon to configure and manage your server farm.
    Use SharePoint more effectively with improved accessibility, including built-in support for keyboard navigation and support for industry-wide accessibility standards.
    Access SharePoint through Internet Explorer, Firefox and Safari.

  • Use more than 40 out-of-the-box Web parts to add functionality anywhere in a site with point-and-click simplicity.

  • Quickly find and fix potential problems across all of the servers in your farm. The SharePoint Health Analyzer monitors farm health and can automatically fixes many common configuration and performance problems.

  • Temporarily mount an unattached content database and browse content, back up a site collection, or export sites and lists without a recovery farm.

  • Upgrade to SharePoint 2010 but keep the SharePoint 2007 look-and-feel until you are ready to switch. View a site with the SharePoint 2010 user interface before committing to it.

  • Use Web Parts to add new functionality to SharePoint sites. Add a Web Part to any page, and the new functionality will appear when the page is displayed.

  • Achieve greater control and productivity with Windows Power Shell, a command line shell and scripting language. SharePoint 2010 offers a snap-in so you can take advantage of Power Shell for your SharePoint deployments and manage your server farm and automate tasks with out-of-the-box cmdlets.



Communities

  • Use the new SharePoint Ribbon to format blog text and easily upload images.

  • Keep your colleague network current with an automated service that suggests colleagues based on your reporting structure, communities membership, e-mail distribution lists, Office Communicator contact lists, and analysis of most common Office Outlook e-mail recipients.

  • Centrally store and manage your documents, favorite links, personal blog, and wiki pages on the My Content section of your My Site. Customize your pages and set access and permission levels for any content in the section.

  • Learn more about your colleagues with Profile pages. The My Profile page contains information about employees, including biographies, job titles, location, contact information, interests and skills, and previous projects.

  • Help people recognize each other with photos. Use presence to email, IM, or call someone with the click of a button.

  • Rate SharePoint pages, lists, libraries, and individual documents with a five-star rating system.

  • Let people know what you're up to with the Recent Activities feed on your profile page.

  • Classify and organize large amounts of information in your company by applying tags. Use standardized taxonomy tags defined by the organization and informal social tags defined by employees.

  • Create pages that combine the ease of wikis with the functionality of Web Parts.


Content
  • Manage versions, apply retention schedules, declare records, and place legal holds, whether you're dealing with traditional content, Web content, or social content.

  • Create a Document Set to manage related content as a single entity, speeding up common processes like RFP responses.


Search
  • Tailor different results and refinement options based on the profile of the user or audience.

  • Take advantage of out-of-the-box support for multilingual experiences in SharePoint 2010. Give your people language options in site navigations, menus, the SharePoint Ribbon, and customized list fields.

  • Search for people by name or by associated terms.


Insights
  • Use the examples in this dedicated SharePoint Site template to help you get started with your Business Intelligence projects.

  • Create rich dashboards that convey the right information the first time, aggregating content from multiple sources and displaying it in a web browser in an understandable and collaborate environment. Rich interactivity lets you to analyze up-to-the-minute information and work the data quickly and easily to identify key opportunities and trends.

  • Perform root cause analyses using powerful analytics to examine core data. View only the most pertinent information using the new Decomposition Tree.

  • Publish Visio 2010 diagrams to SharePoint 2010 to let your people view and refresh diagrams in a browser without opening Visio. Integrate diagrams into other SharePoint applications and develop rich mash-ups.


Composites
  • Publish Access databases in SharePoint.

  • Customize pages and web parts to create Web sites that meet your specific business needs.

  • Work with external data, whether online or offline, in SharePoint 2010 and Microsoft 2010 applications using Business Connectivity Services (BCS, formerly named the Business Data Catalog).

  • Maintain security and manage system performance with Sandbox Solutions. Sandbox Solutions separate code from other processes; improving the security and helping you control resources and prevent performance problems.

  • Deliver no-code customizations with the new tools in SharePoint Designer, including List and Content Type editors, reusable workflow, XSLT templates, and external content types.

  • Upload Silverlight XAP applications to a document library and use them immediately with the built-in Silverlight Web part.




PPS: Performance Point Service which used to be seperately configured out of SharePoint Server in 2007 is now changed. PPS is now configured with in SharePoint Server 2010 to effectively increase the performance and allocate the services respectively to the servers in the farm installation and also plays a vital role in the Service Application Architecture.


BCS: Business Connectivity Services is a huge achievement in SharePoint 2010, which is an added feature to Licensed Enterprise edition of SharePoint Server 2010. If we recall BDCs - Business Data Catalogues in SharePoint Server 2007, we have to write huge code for Definition files, Configuration files e.t.c., to get the data from the external Databases. Moreover the data that can be accessed through BDCs used to be readonly, we were not able to do any modifications to that external data that was retrieved using BDCs. And here is the role of BCS, where in there is no much use of writing definition files, no need to worry about XML files, and moreover these can be configured using UI, and also the data that is retrieved using BCS can also be modified and the modified data will be updated in the external Databases by synchronization when in connection with the External Databases.


 


 


 


Date Changes, Month Changes, Year Changes, Be Yourself, No Matter What ever Changes......!

Followers