Search Wiki:
dpelog.png

FabrikamShipping SaaS Demo – Source Code


Welcome to the source code home of the FabrikamShipping SaaS demo!

FShippingScreen.png

FabrikamShipping demonstrates many important aspects involved in architecting and developing subscription-based, multi-tenant applications. A fully functional instance of the demo is available online at www.fabrikamshipping.com.
This package contains all the source code of the demo scenario, including the parts that are not directly visible online (such as the ISV admin console, the provisioning process and so on). Certain parts of the source, such as the automated provisioning, are present but non-functional in the local test environment.


The solution can be run in the Windows Azure DevFabric: all the demo consoles (subscription, ISV management, customer management consoles) will be available, together with two test tenant instances (AdventureWorks demonstrating an Enterprise Edition instance, Contoso showing a Small Business instance).


■Run the Setup.cmd to complete the installation wizard and install prerequisites if needed.
■Once that finished, launch the utility SelfSTS.exe from C:\FabrikamShippingSaaS\assets\SelfSTS\SelfSTS\bin\Release and press the Start button.
■Run Visual Studio 2010 as Administrator, open the FabrikamShipping.sln solution in C:\FabrikamShippingSaaS\code and run it.

Known Issues

■Issue with PathTooLong.
DevFabric generates a package in a temporary directory of your profile. Since FabrikamShipping has long names in the projects, sometimes you might get an exception when running it. In order to fix this, create a new User Environment Variable (Start > Control Panel > System > Advanced system settings > Environment variables) and set the Variable Name = "CSRUNSTATE_DIRECTORY" to "C:\WAZ" (without the quotes). Create the folder C:\WAZ if not exists. This will tell DevFabric to use that folder in the packaging process (which is shorter than the TEMP path in the profile).

Last edited Oct 7 2010 at 10:18 PM  by Vittorio, version 4
Comments
Miro wrote  Dec 26 2010 at 7:26 PM  
After Downloading the Source.. I had a hard time trying get it working on my Dev box. I am running on Windows 7, VS 2010 with Auzure 1.3 SDK. One quick note is that the Fabrikam certificate's private key should be accessible by the NETWORK SERVICE account for your application to work correctly. The IIS app pool uses this account. Check the link http://www.houseofmorten.com/geeky/dotnet/error-id1039-the-certificate-s-private-key-could-not-be-accessed on how to give the NETWORK service account access to the private key of www.fabrikamshipping.com certificate.

PedroFelix wrote  Jan 18 2011 at 5:09 PM  
The Windows6.1-KB974405-x64.msu file, located at the Startup folder of the FabrikamShipping.Web project, has 0 bytes. Are we supposed to explicitly download this file, since it is a windows update? I didn't found any reference to this in the documentation.

jhakasjk wrote  Jan 27 2011 at 5:05 AM  
ProvisioningFramework.Worker ( Project Name)
WorkerRole.cs (file name)

var templateServiceCreationRequest = new StreamReader(resourcesContainer.GetFile("Template.ProvisioningCreateRequest.htm ")).ReadToEnd();
var templateServiceDeletionRequest = new StreamReader(resourcesContainer.GetFile("Template.ProvisioningDeleteRequest.htm ")).ReadToEnd();
var templateServiceDeleted = new StreamReader(resourcesContainer.GetFile("Template.DeprovisioningCompleted.htm ")).ReadToEnd();
var templateActivateAccount = new StreamReader(resourcesContainer.GetFile("Template.ActivateAccount.htm ")).ReadToEnd();


Can anyone please explain me what are those &var templateServiceCreationRequest = new StreamReader(resourcesContainer.GetFile("Template.ProvisioningCreateRequest.htm ")).ReadToEnd();
var templateServiceDeletionRequest = new StreamReader(resourcesContainer.GetFile("Template.ProvisioningDeleteRequest.htm ")).ReadToEnd();
var templateServiceDeleted = new StreamReader(resourcesContainer.GetFile("Template.DeprovisioningCompleted.htm ")).ReadToEnd();
var templateActivateAccount = new StreamReader(resourcesContainer.GetFile("Template.ActivateAccount.htm ")).ReadToEnd();



Can anyone please explain me what are those *.html files?

my email id is jitendra@symbi.in

kcs wrote  Mar 6 2011 at 8:10 PM  
Great sample, look forward to trying it out. Is it possible that the FabrikamShippingSaaS.Jan11.Source.exe needs to be updated to support Windows 7 with Service Pack 1? After I dloaded the sample's exe the Setup.cmd failed with a window that said:

Failed to Configure FabrikamShipping sample

Operating System Not Supported.
Please review your machine configuration and try again. Click close to exit the Configuration Wizard.

ercenk_keresteci wrote  Mar 9 2011 at 7:34 AM  
kcs, you can open the "depdencies.dep" file with notepad in the folder "FabrikamShippingSaaS\dependencies", find the attribute "buildNumber" in the <os> element, under <dependencies> and add the value 7601.

kcs wrote  Mar 12 2011 at 4:50 PM  
...
ercenk_keresteci, thank you very much, that worked!
...
Windows 7 SP1 and Windows Azure Tools for Microsoft Visual Studio 2010 1.3 Fixes:

Here is a summary of what I had to do to get FabrikamShippingSaaS.Jan11.Source.exe to complete the setup and for the sample to run as of 3/12/2011 BEFORE I installed Visual Studio 2010 SP1:

When running Setup.cmd it will say, “Operating System Not Supported.” If you have installed Windows 7 Service Pack 1.

To Fix: Open \FabrikamShippingSaaS\dependencies\Dependencies.dep in Notepad.

Search for “buildNumber” and add 7601 to the end of that string like this:

<os type="Vista;Server" buildNumber="6001;6002;6000;6100;6200;7100;7600;7601">

That should fix W7 SP1 issue.

If you have installed the “Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio (March 2011)” update:

It installs the Windows Azure SDK version 1.4. So that setup would not complain that I didn’t have “Windows Azure Tools for Microsoft Visual Studio 2010 1.3” installed I had to modify:

\FabrikamShippingSaaS\dependencies\scripts\dependencies\check\CheckAzureTools.ps1

I changed the “1.3.*” to “1.4.*” in these two lines of that file:

$res3 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.4.*' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';

$res4 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.4.*' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';

The sample then installed and ran fine.



SHaddy wrote  Mar 29 2011 at 5:39 PM  
Honestly, I'm a little disappointed with the Identity Provider implementation. Very obscure, and handled by javascript? No thanks. Logic should be removed from the view in MVC.

Vittorio wrote  May 26 2011 at 8:30 PM  
Shaddy, the identity provider is the only thing you should not look at in the demo. It is there only as a placeholder and enabler of everything else. We do not recommend building your own identity provider. The IP project is in the demo only because we need an IP endpoint for demonstrating everything else.

jj2taylor wrote  May 31 2011 at 12:21 AM  
The DeploymentReference is a great addition to the April update. Regards.

drevange wrote  Nov 11 2011 at 10:56 PM  
Really excited about the Demo and Short Code - BUT it will not install anymore. When detecting required prerequisites - it is looking for the March version of Azure of Azure SDK and Tools, but you cannot install that if you already have the more recent September version. How can we can past that? Can a new installer be created??

drevange wrote  Nov 11 2011 at 11:15 PM  
Actually I figured it out - had to change the dependency checker, which fortunately was editable:
Go to: FabrikamShippingSaaS\dependencies\scripts\dependencies\check
Edit CheckAzureTools.ps1:

Modified lines 22-30 to read the following, and the dependency checker worked.
$res1 = SearchUninstall -SearchFor 'Windows Azure Tools for Microsoft Visual Studio 2010*' -SearchVersion '1.3.*' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';
$res2 = SearchUninstall -SearchFor 'Windows Azure Tools for Microsoft Visual Studio 2010*' -SearchVersion '1.3.*' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';
$res3 = SearchUninstall -SearchFor 'Windows Azure Tools for Microsoft Visual Studio 2010*' -SearchVersion '1.5.*' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';

$res4 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.4.*' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';
$res5 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.4.*' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';
$res6 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.5.*' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';

($res1 -or $res2 -or $res3) -and ($res4 -or $res5 -or $res6 );

Tony292929 wrote  May 29 2012 at 10:33 AM  
When i run the application i get the following error:
------------------------------
ACS50015: An error occurred while attempting to get identity provider metadata.
Trace ID: e19c44b5-e4ae-4cf0-9248-abecfb99d8a2
------------------------------

If i do a view source i can see that is tries to access
https://fabrikamshippingsourcecode.accesscontrol.windows.net:443/v2/metadata/IdentityProviders.js?protocol=wsfederation&realm=https%3A%2F%2F127.0.0.1%3A9446%2F&reply_to=https%3A%2F%2F127.0.0.1%3A9446%2Fcontoso%2FAccount%2FLogOn&context=%2Fcontoso&version=1.0&callback=ShowSigninPage

This error means that i cannot sign in :-(

pavang6 wrote  Jul 4 2012 at 11:56 AM  
we are also facing the same issue

Updating...
Page view tracker