Posted by Troy on October 17, 2011 under Apple, Eclipse, iOS, IT, Microsoft, Mobile, Windows 7 |
This post assumes that you are a member of the iOS Developer Program and that you are familiar with creating a Mobile Project in Flash Builder for Windows. In this scenario you have created your first iPad2 application (HelloApple) and now you want to deploy and test it on the device:

When you first go to run the application you right-click the project and select Run As Mobile Application:

The first time you do this the “Launch method” needs to be configured. In our case we want to create a package so that it can be installed on the iPad2 device. I selected Standard Packaging method which takes awhile to compile but is useful for performance testing the application (release build). Click “Configure package settings”

At first the configuration for the Digital Signature looks fairly straightforward. You just need to provide a Certificate and Provisioning file. These file can be downloaded from the iOS Developer Center but you must first setup these files.
Jeanette Stallons has a great post on how to get the required certificates (the post covers Windows and Mac):
http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html
Below is a summary of the steps outlined in the article:
- Enroll in the iOS Developer Program
- Log into the iOS Provisioning Portal
- Create an App ID on the iOS Provisioning Portal
- Use iTunes to get iOS device IDs
- Register your iOS device
- Create a certificate signing request (CSR) file (Generate a CSR on Windows)
- Create developer certificate (CER) on iOS Provisioning Portal
- Convert iOS developer certificate to P12 format (Create P12 on Windows)
Steps 1 to 5 are straight forward. But steps 6 to 8 can be confusing depending on the current state of your provisioning portal. If this is your first time setting everything up then I recommend reading Jeanette Stallions post with the exception of the Mac sections.
If you have followed Jeanette’s post but are still having trouble generating the P12 files then review the notes below.
In order to perform steps 6 to 8 on windows you need to have OpenSSL installed on your Windows Machine. You can download OpenSSL for Windows from here:
http://gnuwin32.sourceforge.net/packages/openssl.htm
Another option for OpenSSL especially if you are looking for a Source Control tool is to download and install msysgit (Git for Windows). Git integrates well with Flash Builder but that is a topic for another post. When installing msysgit make sure to install Git Bash:

If you have Cygwin installed on your system it can also be configured to support OpenSSL but it is probably overkill to install it just for the purpose of using the tool.
The first thing we need to do using OpenSSL is to create a private key with a password:
openssl genrsa -out mykey.key -passout pass:mypassword 2048
Next (see Step 6) create the Certificate Signing Request (CSR) using the private key created in the previous step (mykey.key). The signing request contains important pieces of information that you must provide:
- emailAdress=email@domain.com
- CN=Your Name
- C=Your Country (two character code: United States: US, Canada: CA)
Step 7, is creating a new developer certificate. This is done by making a certificate request using the certificate created in Step 6. Click the “Request Certificate” button and upload the CertificateSigningRequest.certSigningRequest file.
 |
 |
| Request Certificate |
Choose File and then Submit |
If the process was successful you will have a new developer certificate with a status of “Approved”.

Refresh the Certificates screen and you will have the option to download it. Download the certificate file (developer_identity.cer) and convert it to pem format using OpenSSL utility:
openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM
This will generate the developer_identity.pem file which will be used with the mykey.key file to generate the P12 file (Step 8):
openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out ipad_dev.p12
When you run this command you will be prompted for the private key password which was “mypassword” in this example. Below is an example of running the command using the Git Bash prompt (openssl):

Next we need to configure the Provisioning File. The developer certificate must be configured and “Approved” before this file can be downloaded. Currently the Status of my Provisioning File is Invalid:

Select Modify and you should be able to see the Developer Certificate that was created and approved. Check the checkbox by the Certificate and click Submit:

Once the status is “Active” the Provisioning file can be downloaded. Now we can configure the Digital Signatures with the following files:
- Certificate: ipad_dev.p12 (full path to the file)
- Provisioning File: AppDev.mobileprovision (full path to the file)
When you select “Run” in the Run Configuration, Flash Builder will prompt you for the private key password (mypassword). Once you enter the password it may take several minutes for the compilation to complete.
 |
 |
| Private Key Password |
Packaging |
Once packaging is complete follow the instructions to install ipa package on the iOS device. Refer to the Using Flash Builder 4.5 to package applications for Apple iOS devices post for the remaining details.
Troy
Posted by Troy on August 22, 2010 under Microsoft, Sony, Windows 7 |
I was trying to backup some videos on my Sony PS3 the other day so I grabbed one of my old 80 GB hard drives. Of course the Sony PS3 didn’t recognize the NTFS file system, it needs to be FAT32. Simple enough, I thought, I’ll just backup the old files and format the drive as FAT32.
If you right click on the drive you and click Format there are two options
But there was no FAT32 option.
This was a job for Disk Manager not the simple format tool. Click Start and search for “Computer Management”. Then select the Device Manager.
Click on the drive you want to format and delete the old Volume. Make sure you have selected the correct drive.
Right-click on the disk to create a new volume. This will take you through a wizard that will allow you to select FAT32 to format the drive. The volume must be less than or equal to 32,768 MB.
Once I formatted the drive FAT32 the Sony PS3 recognized the device an I could backup the files.
If you want to get around the 32 GB limitation you could format the drive using Linux or a Linux Live CD like Knoppix.
Troy
Posted by Troy on August 7, 2010 under Blogging, Business, Business Intelligence, IT, Microsoft, Performance Management, Social Networking |
Well I am not sure how much sense it makes for a Blog to have a Facebook Page but I though I would try it out. I am always looking for new topics or issues to write about especially in the area of Business Intelligence or even day to day question on how to use Microsoft Office and SharePoint to enhance business activities. Feel free to post ideas or comments.
Troy Scott – Blog
Promote Your Page Too
Posted by Troy on under csharp, Microsoft, SharePoint, SQL Server, Visual Studio, Web |
When I first started building External Content Types in (ECT) SharePoint Foundation Server I used SharePoint Designer. SharePoint Designer is a good place to start if you are learning how build ECT’s. It does not require any .NET code and you can build a fairly decent application in little time especially if you have a solid relational database background. But I wanted to try build an External Content Type using Visual Studio 2010. In this case I am going to build a simple BDS Model based on the SalesLT.Customer table in the AdventureWorksLT2008R2 database.
First, lets start by creating an empty SharePoint 2010 Solution (C#) in Visual Studio 2010. Select File > New > Project from the file menu. In the Installed Template section under Visual C# > SharePoint > 2010 select the Empty SharePoint Project and name the project SPDev1. This will create an empty SharePoint project which we can add multiple projects to.
When you select Ok the SharePoint Customization will be displayed. Enter the the site you want to use for debugging the project and make sure you select “Deploy as a farm” solution:
Right-click on the SPDev1 project and select Add New Item:
Now Select Business Data Connectivity Model from the Add New Item list and name it AWLTCustomer. Once you enter the name of the model click Add:
 |
 |
| Add BDC Item |
BDC Solution |
When the BDC Model is added it is fully functional. If you Build the project it will compile without any errors.
You will notice that I named the Blog Post “BDC Models in Visual Studio 2010 for SharePoint Foundation Server 2010” and not “BDC Models in Visual Studio 2010 for SharePoint Server 2010” . If you created this project using SharePoint Server 2010 you can actually deploy this project to the debug site and it will create an BDC Model with an entity called Entity1. But if you are using SharePoint Foundation Server 2010 you will receive the following error when the project is deployed (Right-click the project and click Deploy):
Error 1 Error occurred in deployment step ‘Add Solution’: Failed to load receiver assembly "Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" for feature "SPDev1_Feature1" (ID: 1a75169a-e716-4d4b-a43c-3c0cf032fc40).: System.IO.FileNotFoundException: …
In order to deploy a BDC Model to Foundation Server a Feature Event Receiver is required to publish the mode to the site:
Publish BDC Model project to SharePoint Foundation 2010 with Visual Studio 2010
The following post on one of the Microsoft Blog sites provides details on how create the Feature Event Receiver.
Deploy a BDC Model project to SharePoint Foundation 2010 using Visual Studio 2010
Basically you need to download the following file from the first link:
Feature Event Receiver (C#)
In the current project, add an Event Receiver to Feature1 by right-clicking Feature1 and select Add Event Receiver:
First copy the existing content of Feature1.EventReceiver.cs to a file using notepad. Next, replace the contents of Feature1.EventReceiver.cs with the contents of the file downloaded from the Microsoft site (FeatureEventReceiver.cs) (Ctrl-C, Ctrl-V). The details from this point on can be found in the Microsoft Blog post mentioned above (Deploy a BDC Model project to SharePoint Foundation 2010 using Visual Studio 2010), but I will provide some additional screenshots along with the steps.
We need to Add a reference to the MicrosoftBusinessData.dll. In order to do this you have to copy the dll from the GAC. Click Start > Run and enter the following:
- C:\Windows\assembly\gac_msil
Find the Microsoft.BusinessData folder and copy the Microsoft.BusinessData.dll to the following folder:
- C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI
Next add the following references to the project:
|
|
| System.Web |
Microsoft.BusinessData.dll |
Set the BDC (SharePoint item property) which in our case is located in the AWLTCustomer model and set the following properties located under Feature Receiver Category:
- Assembly = Assembly = $SharePoint.Project.AssemblyFullName$
- Class Name = SPDev1.Features.Feature1.ImportModelReceiver
|
|
| Properties Before |
Properties After |
Set the Feature property by double clicking on Feature1.Feature and update the following property:
- Receiver Class = SPDev1.Features.Feature1.ImportModelReceiver
|
|
| Properties Before |
Properties After |
One last thing, we need to change the Namespace of the code that was copied into Feature1.EventReceiver.cs from BDCModelReceiver to SPDev1:
I have been writing this post while following Microsoft Blog. So, here is the moment of truth. After the last step we should be able to deploy the BDC model. Right-click on the project and click deploy or click F5 if you want to debug the solution. To view the content type you can open SharePoint Designer and navigate to the External Content Type sit object:
Before you can create an External list based on the new External Content Type the permissions must be set. Check out this post for setting the permissions using the SharePoint Central Administration site:
Setting Permissions for an External Content Type
Once the permissions have been set an External List can be created. In this example the External List is very basic and in fact the model has not been connected to the External table in the Adventure Works. But that is a topic for another post.
For more information on BCS check the Microsoft BCS Team Blog:
http://blogs.msdn.com/b/bcs/
Troy
Posted by Troy on August 6, 2010 under .net, IT, Microsoft, SharePoint, Visual Studio, Web |
This week I was creating my first SharePoint 2010 Sandboxed solution using Visual Studio 2010. I have successfully built and deployed other SharePoint projects on the server but I always used Farm based solution due to the requirements.
When I built the Sandboxed solution the project would build and package without any errors but when I tried to deploy it to the SharePoint site the following error occurred:
Error 1 Error occurred in deployment step ‘Activate Features’: Cannot start service SPUserCodeV4 on computer ‘SERVERNAME’ 0 0 SP2010Dev1
The error can be easily resolved by starting the Microsoft SharePoint Foundation Sandboxed Code Service which can be accessed through the Central Administration site in SharePoint. Open the Central Administration site and go to System Settings and click on Manage Service on server:
Check to see if Microsoft SharePoint Foundation Sandboxed Code Service is running, it should be stopped :
Start the service and try deploying the Sandboxed solution.
Thanks to Sergey Hyper Kravchenko for his post on the MSDN SharePoint discussion forum:
error occurred in deployment step ‘retract solution’ cannot start service SPUserCodeV4 on this computer
Troy