Wednesday, November 10, 2010

Easily Import Visio Flowcharts as SharePoint Designer Workflows

So here is a another feature that makes you happier when you are using the SharePoint Designer 2010. The integration with Visio 2010 has been improved quite-a-bit. Now you can create your companies workflows diagrams as flowcharts in Visio 2010 and export the file, to consume/import it back in SPD 2010. Awesome! I like that.

So you must be thinking to get started right away……. but wait !!!

There are some pre-reqs to this. You need to have the Premium edition for Visio 2010. With this edition, you can find the specific “SharePoint Workflow” templates to start creating the flowcharts.

So buckle up – and lets start the tour.

#1. Open Visio 2010 Premium edition.

#2. Select “Flowchart” and then “Microsoft SharePoint Workflow” from “Choose a Template”. Select your own Units, I selected [US Units] and click Create.

image

#3. You will get to choose from a list of SharePoint Workflow Actions, Conditions and Terminators.

image

This can then be very easily exported as a .vwi (visio workflow interchange) file which can be imported in your SharePoint Designer workflows and vice-versa too.

So have fun with SPD 2010 workflows.

Tuesday, November 9, 2010

Configure Reporting Services with SharePoint 2010

This post is in continuation from this post, where we saw how to proceed with this install and configuration when we already have the DBEngine, Analysis Services, etc installed on a SQL Box except for the Reporting Services.
Here, I proceed from where we select the Reporting Services Configuration Manager from the Configuration Tools.
image
Start the Reporting Services Configuration Manager and find your server/instance.
image
Click connect and you will see the next screen:
image
Follow the screens depicted as below to complete the rest of configurations.
image
image
image
image
image
image
image
image
image
image
image
I skipped the Report Manager URL, Email Settings and Executive Account as it is not mandatory at this step.
image
Take the encryption key backup.
Scale-out Deployment was disabled.
Now go back to the Web Service URL and Click Apply.
image
Next, you need to configure the Central Admin.
Go to CA –> General Application Settings –> Reporting Services Integration
image
And that should be all.

Update: Dec 23, 2011
If you need to read more about some of the requirements for running SSRS in SharePoint Integrated mode, visit this MSDN article.

And this Technet details much about SSRS Integration in SP 2010.

Thursday, October 28, 2010

Install the SharePoint integrated mode default configuration option is disabled while configuring the Reporting Services on SQL Server 2008 R2

I had a SQL Server 2008 Standard edition setup for the DBEngine and Integration Services. For some reason I did not install the Reporting Services at that time. Now I was trying to get the Reporting Services (RS) deployed with SharePoint 2010 in the integration mode.

The first choice was to install the RS. I got started, but to my surprise I saw the first two options “Install the Native mode…” and “Install the SP integrated mode…” disabled. I only had the option “Install, but do not configure the report server.” available to me.

Man, where did I go wrong. This is what it came to me first. But after a little search, I realized that this happens if you try it installing after the initial installation. And that is what I was doing. So I decided to proceed. I did see some warnings but they were not of much concerns.

I had to start the RS Configuration Manager from the Configuration Tools option and the later setups were pretty much the same old way of going through the wizard steps.

So there I was. And as the next steps, definitely you need the RS Add-In on SP 2010 box and take care of the rest of standard CA configuration steps.

Tuesday, October 26, 2010

Cannot access a host named SharePoint 2010 site locally from the server

I had a SP 2010 site setup and access it from my client machines. I was able to perform all administrative tasks from CA when I decided to switch to the server box and use the same host url “http://sharepoint.mycompany.com” that I was using from my client machine.

Guess what, I was not able to login to the site and it kept prompting me for my userid/pwd.

After  much of looking around, found this useful article which seems to be pointing to the security measures put in place by Microsoft starting Windows Server 2003 SP1 and later. It essentially got the loopback check in-place to prevent Man-In-The-Middle (MITM) attack from malicious apps.

You can read more about is here.

Thursday, October 21, 2010

Fab 40 Templates for SharePoint 2010

The news that Microsoft was not going to upgrade these Fab 40 templates has been giving jitters to quite a bunch of people like me, as we were already using them in MOSS 2007 and needed to upgrade with SP 2010.

But fortunately enough, TechSolutions has come for rescue.

These guys are making the upgraded versions available as and when they are getting ready. You can find the different versions as below:

Fab 40 Templates for SharePoint Server 2010

Fab 40 for SharePoint Foundation 2010

Keep watching them, if you do not find one you are looking for.

SP 2010 List does not exist - error

I was getting “List does not exist error” while accessing any list or doc library. It said something like this below:


The page you selected contains a list that does not exist.  It may have been deleted by another user.

=======================================================

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: 9067ed55-d26c-46a7-84d6-7c1838441992

Date and Time: 9/14/2010 4:12:33 PM

<- Go back to site

=======================================================

Got this resolved. Actually, there was no proper AAM for the corresponding DNS entry for the Intranet zone.

Technorati Tags: ,,,

Friday, September 10, 2010

Choosing the correct site template in SharePoint 2010

This is a great compilation of various Sub-site templates (the new and deprecated ones) as well as available Lists and Pages in SharePoint 2010.

Todd has done it again in 2010 here as he did it in 2007 here.

Monday, August 16, 2010

How to enable a List to allow sorting on its class attributes

In my earlier post here, I had tried to convert a List to a DataView, in order to display a tabular result format in an asp:ListView control.

Once I got to display the table, I needed to sort the display based on CustomerID field of the Class “Customer”.

Thanks to Anand Malli, for having a great post on the Code Project for describing it beautifully and in a very simple, extensible manner.

Here is what I landed up doing:

Step #1: Inherited my class from IComparable

public class Customer : IComparable<Customer>
Step #2: Implement the IComparable member
public int CompareTo(Customer other)
{
throw new NotImplementedException();
}
Step #3: Add the Comparison member to the class
public static Comparison<Customer> CustomerIDComparison = delegate(Customer p1, Customer p2)
{
return p1.CustomerID.CompareTo(p2.CustomerID);
};
Step #4: Finally, getting the sort to work before setting the DataSource of the ListView.
lstCustomer.Sort(Customer.CustomerIDComparison);
And that’s it. A big thanks to Anand for sharing this information.
Technorati Tags: ,,,

Convert a List to a DataTable or a DataView

Let’s say we have a class Customer, defined as:

public class Customer
{
public string Name { get; set; }
public string Address { get; set; }
public string ContactNumber { get; set; }
public int CustomerId { get; set; }
public string Email { get; set; }
public string CustomerType { get; set; }
}
Now, let us try to instantiate an object type <List> from this class.
List<Customer> lstCustomer = new List<Customer>();

And let us fill this with some data, I add just 2:
lstCustomer.Add(new Customer { Name="myName1",Address="1234 Spring Pike", ContactNumber="123-456-7899", CustomerId=1002, Email=”abcd@cc.com”, CustomerType="New" });
lstCustomer.Add(new Customer { Name="myName2",Address="1234 Spring Pike", ContactNumber="123-456-7899", CustomerId=1002, Email=”abcd@cc.com”, CustomerType="New" });

Now the actual action, let’s convert this List “lstCustomer” to a DataTable……

//#region Convert the List to a DataTable.

List<Customer> items = lstCustomer;
var tb = new DataTable(typeof(Customer).Name);
PropertyInfo[] props = typeof(Customer).GetProperties(BindingFlags.Public BindingFlags.Instance);
foreach (PropertyInfo prop in props)
{
Type t;
if (prop.PropertyType != null && (!prop.PropertyType.IsValueType (prop.PropertyType.IsGenericType && prop.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>))))
{
if (!prop.PropertyType.IsValueType)
{
t = prop.PropertyType;
}
else
{
t = Nullable.GetUnderlyingType(prop.PropertyType);
}
}
else
{
t = prop.PropertyType;
}
tb.Columns.Add(prop.Name, t);
}

foreach (Customer item in items)
{
var values = new object[props.Length];
for (int i = 0; i < props.Length; i++)
{
values[i] = props[i].GetValue(item, null);
}
tb.Rows.Add(values);
}

//#endregion
And finally, convert the Datatable to a Dataview
//#region Convert the datatable to dataview.

DataTable dt = tb;
DataView dv = new DataView(dt);

//#endregion
You may very well extract the conversion of a List to a DataTable into a separate method and pass the List “lstCustomer” to that method. I’ll leave the exercise for the rest who are interested to do so. Also, this is not a tested code, so please, no warranties… use it at your own responsibilities and make changes as you wish.
Technorati Tags: ,,,

Friday, August 13, 2010

Setting up the Log file locations is SharePoint 2010

Health Monitoring alerts in SP 2010 are the good things to happen to us Administrators :)

I like the way now SP 2010 gives you the pop-up alerts in Central Admin, to review and mitigate the same.

The very common issues faced in the MOSS 2007 world, was that of running out of Hard Disk space on the servers. And the weird thing about these errors, at least to the developers, were that they never pointed out to the fact that these were caused due to in-sufficient HDD space. Admins could, well look into the Event logs and see some of them, talking about DB spaces getting full. But yes, as I said, in most cases, it wasn’t obvious looking at the so called “generic error page” ------ don’t remember now ---- was it something like ------ “An error has occurred in your application….”. Not sure, but it was the most hated error page for the MOSS developers :)

So here are the alerts to the rescue. But what next !!!

What should you do when you see these kind of alerts.

Okay, check the message. In high probability, it may tell you these:

- Error message

- its severity

- a short description

- maybe, a remedy

- and the server names.

So now you know what server needs your kind attention.

If the message is about the drives running out of free spaces, then probably here are what your options could be.

#1. Provide a new Logging Directory path in IIS for that server.

#2. Also update the “Trace Log” in the Unified Logging System. You may find this in Central Admin –> Monitoring –> Reporting –> Configure Diagnostic Logging.

Modify the Path “%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\LOGS\”

to your new locations for the log files, say, “X:\SP2010LogFiles\”.

Also, do not forget to move all the existing log files that pre-existed on the old locations and were the actual cause of disk full.

Thats it, now the new logs would be created at this new location.

Thursday, August 12, 2010

Code Samples from Microsoft for SP 2010 development in VS 2010

These sample codes have been very helpful for me in learning the new SP 2010 dev environment from within the VS 2010 IDE.

These samples demonstrate the SP 2010 development projects, tools, and techniques using VS 2010.

Has a good list of projects:

- Sequential Workflows

- BDC Samples

- Custom Action

- Event Receivers

- Web Parts and Silverlight web part.

You can download them for the Microsoft site available here.

Highlight the GridView row when you mouse-hover

Recently while working on a ASP.Net MVC project, I needed to display data in a GridView of one of the Views. I also wanted to highlight each row, as I moved my mouse over the rows of the grid.

I got to the rescue with JQuery. This is awesome, it lets you do these kind of stuffs fairly easy. Think like javascript, but needs a little different syntax. This is how it got to working:

<script type="text/javascript">
  $(document).ready(function () {
    $("tr").filter(function () {
         return $('td', this).length && ! $('table', this).length
    }).css({background: "#FFFFFF" }).hover(
     function () { $(this).css({ background: "#EEFF77" }); },
                function () { $(this).css({ background: "#FFFFFF" }); }
                );
        });
    </script>


Thursday, August 5, 2010

LightSwitch Beta 1 for VS 2010 – Now available

LightSwitch Beta 1 was made available to the MSDN Subscribers on Wed Aug 18, 2010.  Also, it was announced that it will be available for Public download starting today Aug 23, 2010.

I hope to get this on my machine sometime this week and am pretty sure would be lots of fun.

Monday, July 26, 2010

Silverlight controls with a 3D appearance

Wow !!!

Yes, this is what many have reacted to this new behavior of the Silverlight Apps recently.

Codeplex has a new project on Silverlight 3D Controls for transforming the look-n-feel of the controls in your app, or more precisely, the app itself with an effect of adding more depth to its dimension.

This is achieved using a control from this library, DepthCanvas.

You have the option to set its ZDepth as well as set the Speed for the animation.

You can find this on Codeplex here.

Friday, July 16, 2010

How to install the Blend 4 Item Templates into VS 2010

Recently I was trying to create a Behavior in VS 2010. I thought I already had everything needed for this. This is what I had installed on my machine:

- Microsoft Silverlight 4 (ver 4.0.50524.0)

- Microsoft Silverlight 4 SDK (ver 4.0.50401.0)

- Microsoft Silverlight 4 Toolkit April 2010 (ver 4.0.40413.2020)

- Microsoft Silverlight 4 Tools for Visual Studio 2010 (ver 10.0.30319.156)

- Microsoft Expression Blend 4 (version 4.0.20421.0)

- Microsoft Expression Blend SDK for .NET 4 (version 2.0.20525.0)

- Microsoft Expression Blend SDK for Silverlight 4 (version 2.0.20525.0)

But, when I tried to create a “New Item” in my Silverlight project in VS 2010, I couldn’t find any installed templates for this.

But I knew, that I had been doing this in Blend and VS 2008 recently. So I jumped onto the band-wagon to look back for the installedtemplates option in the “devenv” command for Visual Studio.

So, this is what I did:

#1. Locate the “Expression Blend” folder in this location: “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp” (your loc may be different based upon your installation). There is a sub-folder “1033”, which contains Action.zip, Behavior.zip and Trigger.zip.

#2. Copy-Paste this folder to this location “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp” (again your loc may be different based upon your installation.)

#3. Close all the VS running environments.

#4. Start the VS command prompt from the VS Tools menu.

#5. Run the command [devenv /installtemplates]

#6 Start VS 2010, open any new/existing project, try creating/adding a new item now. You will find a new folder under “Visual C#” namely, “Expression Blend”. (Under C# because we copied from the CSharp location in step #1 above.) This will list the three installed items.

Now go ahead and start creating those Actions, Behaviors and Triggers.

Wednesday, June 23, 2010

Process explorer

I wanted something more than what today’s Windows Task Manager had to offer. Looking over the internet found this free download which seems pretty much offering something extra. So I got this.

Hope you find this as useful.

Technorati Tags: ,,,,

Wednesday, January 27, 2010

Visual Web Part in SharePoint 2010

There is a new web part template in Visual Studio 2010, that actually lets you develop and deploy user controls by packaging all in a single unit.  Lets take a look at what this single unit contains when you create the project:

image

- The “properties” and “Reference” are the similar standard folders created for all projects.

- The “Features” is a new folder that contains the configuration information for the feature.

- The “Package” is also a new folder that contains the configuration information for the WSP.

- The last folder (in my case “VisualWebPart1”, this is the name that you provide during the project creation) is the standard user control project template folder structure. It hosts a number of files: a .cs file, a .webpart file, an elements.xml file, and a .ascx file. 

So actually it creates an ASP.NET user control and the VS 2010 lets you open the designer for the user control already wrapped within the web part.

This is not very different than what we used to do earlier by creating to separate projects in a single solution – one for the web part and the other for the user control. Then the web part would actually embed the user control by issuing the command Page.LoadControl() method pointing at the user control. 

So VS 2010 has done a great job to hide a lot of tasks from the developers by bringing many pieces together at one place and packaging as a single unit for an easy deployment to SharePoint.

 

Wednesday, January 20, 2010

Tuesday, January 19, 2010

Installing SharePoint 2010 on Win Server 2008 R2

I have started to put together a series of posts pertaining to the title “Installing SharePoint 2010 on Windows Server 2008 R2”.

Background:

I am running Hyper-V on my Windows Server 2008 R2 machine and have configure the virtual server with Windows Server 2008 R2. All the description of this install would be in association with this virtual machine. So, in all, I have pre-configured my virtual server with Win Server 2008 R2 and start with the SQL Server 2008 installation.

I will appreciate all your feedback, to improve-correct any mistakes related to this series of posts.

Installing SQL Server 2008

Capture the ISO file to start the setup.image

image

Click Open.

image

Click Run Setup.exe

image

Click Run Program

image

Click OK. Microsoft .Net Framework 3.5 SP1 install starts but fails immediately with the messages below:

image

Click OK.

image

I forgot, I needed to configure the Application Server Role on the Server before I could proceed.

image

Select Application Server.

image

Click “Add Required features”.

image

Now, Select Web Server (IIS).

image

Click Next.

image

Select “Web Server (IIS) Support”.

image

Click “Add Required Role Services”, click Next.

image

Click Next.

image

image

image

Click Next.

image

Review the info and Click Install.

image

image

image

Click Close.

image

                                        >> Step 2: Installing the SQl Server 2008

 

Useful ASP.Net/C# questions and answers

And here are few  ASP.Net and C# question URLs, HTH.

Dot Net Questions

Interviews World

ASP.Net Qs and As

C# Questions

More ASP.Net Qs and As

Code Project - Asp.Net Interview Question Part 1 (This has a PDF download link)

Basic and Advanced .NET and ASP.NET interview questions

Another look at the ASP.Net Qs and As

ASP.NET questions and answers for cascading style sheets

http://blogs.crsw.com/mark/articles/252.aspx

C# General Questions 

.Net Framework/Namespaces related

GAC/ Assembly related

Most frequently asked ASP.NET Interview Questions

Looking at ASP.NET Questions

Answers to ASP.NET interview questions

Technorati Tags: ,,,

Useful MOSS Question-Answer links

I found some of these blog sites with lot of very common MOSS related questions, most with answers too :)

Hopefully, you will find it useful.

Sharepoint Interview Questions

Basic Sharepoint Online Test

Some Developer Tests

More SharePoint Questions

Point SharePoint questions

Sharepoint Developer Interview Questions-Answers