Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Wednesday, March 12, 2014

SharePoint Developer: How do I get started?

While there are many blogs and articles on different ways to get started.  The fact is that SharePoint is not just an application, it is a platform (it has all of requirements of PaaS).  One of the hurdles on getting started with SharePoint development is how do I write a Hello World! right?

question-markAs it turns out, just writing a hello world is not very complicated. If you are just starting up your career as a SharePoint developer, remember: It is not about writing the code, but WHERE do you write that code and WHERE do you execute that code that’s important (REST vs CSOM).

Before you can write your first Hello World, you will need to setup your SharePoint dev environment. One question that I get asked frequently is which version of SharePoint do I need? As of this writing there are 4 SKU for SharePoint 2013 (Foundation, Standard, Enterprise, O365) and 3 SKU for SharePoint 2010(Foundation, Standard,Enterprise).  Also there are many more versions of Visual studio (2010,2012,2013) [Express|Standard|Professional|Ultimate], and not to mention many versions of SQL server (2008, 2008R2, 2012, 2012R2). On top of that, the OS required makes an impact on your decision.  One of the best guides to get your dev environment setup correctly is from Andrew Connell –> SP2013 Setup Guide for Developers  However, following these steps will take some time.  If you are a web developer, be prepared to learn about PowerShell, Active Directory Services, DNS, Claims authentication.  Also, you will be force to learn more Admin stuff that you would want to know, From creating web apps to creating site collections, setting up managed service accounts, creating web apps for provider-hosted/auto-hosted apps, etc.

Fortunately for us, Brian  Keller has taken the time to do all of these steps and put together a virtual machine that is configured and ready to go.http://blogs.msdn.com/b/briankel/archive/2013/04/12/team-foundation-server-2012-and-project-server-2013-integration-virtual-machine-and-hands-on-labs-demo-scripts.aspx

The virtual machine contains the following pre-configured software:  (<--note:  pre-configured !!)

  1. Windows Server 2008 R2 Enterprise Evaluation Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS.
  2. Microsoft SQL Server 2008 R2 Enterprise Edition with Analysis, Notification, and Reporting Services.
  3. Visual Studio 2012 Ultimate Update 1
  4. Microsoft SharePoint Server 2013 Enterprise Edition
  5. Microsoft Project Server 2013
  6. Microsoft Office Professional Plus 2013 (32-bit)
  7. Microsoft Visio 2013
  8. Microsoft Project 2013
  9. Microsoft Team Foundation Server 2012 Update 1
  10. Team Foundation Server Extensions for Project Server

Notice the bold items:  Visual Studio, SharePoint 2013 and SQL Server all ready and waiting for you to write your first hello world.!!

now, http://www.bing-vs-google.com a Hello World! (or follow this one Hello World… :) 

welcomeFuturama

 

 

Welcome to the World of Tomorrow SharePoint Development…

Monday, July 22, 2013

RT 8.1 update–Windows Store not working with multiple profiles

Now that I have take the plunge and update to the 8.1 preview, I have been showing all of the features of the 8.1.  Logging as a different user takes a while.  It needs to apply all of the updates to the new profile.

However, whenever you try to access the store with this profile, an error message shows up: “We weren't able to connect to the Store. This might have happened because of a server problem or the network connection time out. Please wait a few minutes and try again.”

image

Looking everywhere on the web, I’ve followed this article and download and install this app from Microsoft. After a reboot, it still didn’t  work.  Went to the PC Settings and perform a windows update.  It said that it found some fixes, applied them, reboot.  Still the market place is not working.

I’ve noticed that there is a message when you open the store. However, it quickly gets hidden by the error message.  The message is something about your account. Sign in with a Microsoft Account. Weird, since this account was working properly prior to the update to 8.1. 

FixClick on PC Settings, Accounts, Your Account.  You will see the that it is now requiring to verify this account.

Solution

Once you click the Verify, it will ask you to type your password,

nextStep

Type in your password, and you will be all set.  Now, go back to the Windows Store and it will work.

Note: you will need to do this step to every user profile you have on the RT

Saturday, October 02, 2010

MOSS 2007 – Configure Incoming email

Reading through these 2 technet articles, you get the main idea on how to set this up

Plan incoming e-mail (Windows SharePoint Services)

and in here

Configure incoming e-mail settings (Windows SharePoint Services)

In Windows Server 2008 R2,  there are some steps that are different from the technet articles.  My environment is as follow:

image

First is to add the SMTP server feature.  Open Server Manager, add features, and select the SMTP Server

image

once you click on this, it will bring another dialog box, prompting you to add more role services

image

It seems that it requires the SMTP Server Tools from the Remote Server Administration Role, and also the ODBC Logging.

click Add required button and continue. Now click on the Next button on the features wizard.

On the confirmation screen you can verify these 2 new roles

image

Click install.

After the installation, Open IIS 7, and under the Features View, double-click SMTP Email.

image

Click on Apply.

Now go back to MOSS Central Administration and click on the Incoming e-mail settings task for the Administrator

image

On the item,  task, select the Action: Configure Incoming E-Mail Settings.

image 

After you have configure the incoming email you can now receive emails on our SharePoint document libraries. Now you can follow the instructions on this article to get those emails inside your document library enable/configured email article.

Wednesday, September 22, 2010

How to Pre-Populate MySites with Pictures in SharePoint

Allowing MySites in a SharePoint environment is good.  But you have to put some governance into it.

Maybe one of the requirements from the HR department is to have only official taken pictures of all employees.  Make this easy to update, but do not allow the employee to change that information.

It's not me, nor you... ;)

Maybe, we need to avoid employees from uploading pictures on reflectives surfaces (bing keywords: ebay pictures kettle).

Anyways, the solution is to give control where control is needed.  In our case, we want the HR department to control what pictures are displayed and we want this process to be painless for them.

I have seen another solution in which they store the picture inside the AD.  But that solution is very cumbersome and not very user friendly.  Not to mention, that it will make the size of your AD database grow exponentially.

Here is an easier way.  Store the pictures in a picture library and then just store the url inside a custom field in your AD. There are 5 easy steps.

image

Step 1:  create a picture library to hold pictures (duh.)

Step 2: Modify your AD to put the url of the picture into the ExtensionAttribute1 field

image

Step 3: Map your AD field to the SharePoint field, and don't forget to set this field to Read-Only mode

image

mapped the field.

image

Step 4: import your user profiles from AD

Step 5: crawl through the user profiles to populate the information.

To test this, perform a search

image

there, Picture is display correctly.!

Sunday, July 25, 2010

Using Excel as a Source for your Data Generation Plan in Visual Studio 2010

I like to use DataDude for almost anything related to SQL Server.  I use the data generation feature quite a lot.  Most of the times, I am happy with the string randomly(RegEx) created by it.  However, I encounter a situation in which I needed the random source to be in a group while still preserving the randomness of the wizard.

Of course, I could have created a SQL server temp table and use that as my sequential data bound field. However, I wanted to try to see if I could use a different source.

I’ve created a simple CSV with 3 columns, that I’ll use to populate my SQL server project.

image

Notice the name of the columns, and also the name of the worksheet.  You will need those for later.

Assuming your SQL Server Database has a table named CommtDefn.

image

Import the schema into a SQL server project in Visual Studio 2010. After you have imported your schema in your solution, you would be ready to populate this table with data. 

First step, is to add a new data generation plan, then select the table CommtDefn and, select the first column.

Your Data Generation plan would initially look like this

image

Select the first column and choose the Sequential data bound generator option.

image

Under the properties window, select <Add new connection..>

image

then on the Data source screen, select <other>.  For the data provider, use the ODBC provider, and not the OLE DB Provider as instructed in MSDN.  Now click Continue

image

On the connection properties, select the Use Connection string. NOTE: the trick in here is to specify the type of connection we are going to use

image

So in this box type the following:

Dsn=Excel Files

Now, click the build button. A dialog box will pop up asking you to select the Data Source, click OK to dismiss this dialog box. This action will bring another dialog box where you can specify the actual excel file you want to use.!!

image

Select your Excel worksheet, and then click OK.  The Use Connection string field is populate with the proper connection string:

Dsn=Excel Files;dbq=C:\vsProjects\2010\PowerShell.SQL\PowerShell.SQL\Excel CSV\Committees.xlsx;defaultdir=C:\vsProjects\2010\PowerShell.SQL\PowerShell.SQL\Excel CSV;driverid=1046;maxbuffersize=2048;pagetimeout=5

Click on the Test Connection button, make sure it is successful. Click OK twice to close all dialog boxes.

Go back to your Properties window and write the following query

SELECT * FROM [CommitteesDefinitions$]

In here, don’t forget to enclose the name of the worksheet in parenthesis and also you need to add the “$” at the end of it.

Your screen should now look like this

image

Now if you go back to the data generation screen, you will see that the Generator Output column has been populated with the columns extracted from the Excel worksheet.!!

image

* BTW, there is a MSDN article on how to generate data from an excel spreadsheet, but after following those instructions I could not get that to work with VS2010 data generated plans.

Tuesday, June 29, 2010

How to remove SQL Mirroring from MOSS 2007

So mirroring technology with SharePoint 2007 does not seem to be working as expected. As a consequence, the decision to remove it from our production servers was made.

I have been trying to remove the mirroring from the SQL Serve 2008 R2, and it still shows the Mirror Databases on the secondary server.  Worse, the status does not change, it is still showing as (Restoring).

image

from the MSDN, this is supposed to be an easy step: ms189112 but it is not.!

As you can see, my SQL1 server has the actual databases, while SQL2 is supposed to have the mirrors of SQL1.

A quick search on the internet turned nothing to the (Restoring…) status message.  Connecting to the second SQL Server and trying to delete the database were encountered with failure.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Alter failed for Database 'SPSProd_Main_Search'.  (Microsoft.SqlServer.Smo)

For help, click: Some useless article on MSDN

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

ALTER DATABASE is not permitted while a database is in the Restoring state.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5052)

  Then I went into the query editor and ran the

DROP DATABASE <databasename> from the master databases. It worked.!

image 


Command(s) completed successfully.!  :)

Monday, April 26, 2010

How to Synchronize LiveWriter’s blog drafts using LiveMesh

Technorati Tags: ,,

I have a myriad of environments that I am working with.

image

Windows XP Pro, Vista x64, Win 7 Ultimate x64, Win 7 Home Premium x86, Win Server 2008 R2.

Throughout the day I am in any one of these environments. I would get an idea for a blog post, then I start to write a draft.  Next thing you know, I am out to do something else so I save the blog post as a draft and exit live writer.  However, there are times when I could dedicate a couple of minutes to continue that draft (Dr's appt which are the norm and not the exception lately.. :(.   Come to find out that I've written the latest updates on a different computer.  I began to research on the practicality of using an online storage. 

Experimented with Dropbox for a little bit. It works ok for single files, but it is not very flexible for blogging.

So, I have started to use Live Mesh to keep all of my drafts, that under different locations, into a single repository. The only problem with Live Writer is that it does not allow you to specify the location in which to save the drafts/posts (Build 14.0.8089.726)

The trick to get Live Mesh to synch all of the content,  is to find the path where the drafts are stored.  I have compiled a handy table of paths for the OS'es I've used:

Environment Path
XP Pro C:\Documents and Settings\arnulfo\My Documents\My Weblog Posts
   
Vista C:\Users\Arnulfo\Documents\My Weblog Posts
   
Win 7 C:\Users\arnulfo\Documents\My Weblog Posts

 

Then all you have to do is setup your Live Mesh folder to point to these locations.

Go to your Mesh folders, Manage Folders

image

Then when you set the folder in Live Mesh, specify the correct path location depending on the OS you are running.  For i.e. this the default location for Win 7

image

I change it to

image

That’s it.!  Now if you go to the Live Mesh Folders and check the synch settings

image

you will see all of the devices where my blog draft/post will be synchronized.

image

happy blogging… :)

Thursday, September 10, 2009

Installing SQL Server 2008 x64

If you want to have the DAT and LOG files on a separate drive, perform the standard setup and choose the default values.

On the feature selection window, make your selection and DO NOT CHANGE the location where your shared features will be.

image

If you do so, you will get this error message, and WILL have to restart the installation all over.

The INSTANCESHAREDWOWDIR command line value was not specified. This value must be specified when the INSTANCESHAREDDIR value is specified.

image

Read about it from the msdn knowledge base 955458.

Funny, it complaints about INSTANCESHAREDDIR when it is really looking for the WOW64 shared components directory INSTALLSHAREDWOWDIR.

Check the Configuration file path at the Ready To Install screen:

image

If you open this ConfigurationFile.ini you will see the entries what the boot strapper is looking for.

Continuing with the default installation, you will get to the Database Engine Configuration screen, that’s is where you can specify the location for the DAT and LOG files.

image

Non-intuitive, IMHO.

Thursday, February 12, 2009

How to Synch Google Calendar with a SmartPhone Running Windows Mobile without a Computer.!

Finally.!

image

I just discover that Google has a setup that supports the Microsoft Exchange ActiveSync protocol to provide synch between their products and your Windows powered device. Follow the instructions in Set Up Your Windows Mobile Phone.

I did this configuration without having to craddle my SmartPhone to the computer.  I have the Motorola Q9c running Windows Mobile 6.1.  On your phone, open up  ActiveSync.

image

select Menu

image

select Add Server Resource.  After this step. I followed the instructions on their site. [I repeated them here for posterity]

image

add your username and password, leaving the domain field blank

image

Now on the next screen, I selected the Calendar option ONLY.

image

It was giving me some errors when I selected tasks, email, and contacts.  I think it does not handle tasks created in Outlook.

Click on Finish and Voila.!  It synchs wirelessly.!

image

Once it had synch all of my calendar entries, I went back and added the option to synch my Contacts.  The one drawback to synching your contacts for the first time, is that you have to go to Gmail and categorized them all.  And this is not fun when you have too many contacts…

image

This is very cool.  I have a share calendar with my wife and now we both can add/delete/modify entries into it, and it is REAL TIME synch.

Wednesday, December 03, 2008

How to get Hyper-V to read corrupted VHD files

We have a lots of projects that are virtualized.  When we finish with a project it is common practice to de-hydrate the servers and put them away.  For one of our customer's project, we followed this process over a year ago.  Lots of things have changed in the past year. First, we moved from one building to a different building.  On the process, we added new servers, clean up some old AD's, change OS's (Windows 2008 DataCenter... oh yeah.!), etc...

Now trying to hydrate back online this one project's environment with all of the infrastructure changed was a challenge. For this enterprise application we have Oracle, App Servers, Web Servers, Test Servers, etc.

Out of all of the VHD's that we needed to bring back, only 2 were recognized by Hyper-V.! Doing a check on the rest of those VHD's gave me the file or directory is corrupted and readable message... :(

image

This is how to check for integrity using the Hyper-V. Add the vhd file to the IDE controller and then hit the Inspect button.

image 

[Main Instruction]
An error occurred when attempting to retrieve the virtual hard disk "F:\hydrate\Project1-Agent.vhd" on server XXX.

[Content]
The file or directory is corrupted and unreadable.

At this point, if we try to recreate all of the settings/configurations stored on those servers will take days.! Some entries in the TechNet forums mentioned that they got it working by re-opening the files on VirtualPC. This is the way I got my corrupted vhd's to work:

First, I create a new Virtual Machine with a new HD.  Then went to Settings|Hard Disk 1 and loaded this corrupted vhd file.

image

There you will find the Virtual Disk Wizard. Click on it, go through the prompts and select the option to Edit an existing virtual disk.

Then choose to Compact it.  The reason for this, is that if you select the Convert it to a fixed-size virtual hard disk, the wizard will make the new hard disk EXACTLY the same size of what content is written at the moment in it.  Which means, if you have allocated 20GB to this disk initially, and have used 12GB of it.  Now instead of having a 20GB with 8GB free, you ended with a fixed 12GB hard drive with NO SPACE LEFT on it.

image

On the next screen, I save the file under a different name for precaution. Now click next and wait. It will take about 1hr for a 28GB file.  Once this process completed, I copied the new file back to our Windows 2008 server, load it on Hyper-V and it was recognized.!

Success.