The Microsoft SQL Server product team finally released the long awaited SQL Server Data tools – BI templates for Visual Studio 2012. This release installs the SQL Server Business Intelligence projects for Analysis Services, Integration Services, and Reporting Services. Among other things, the release also enables you to create and edit SQL Server 2008 R2 or SQL Server 2012 SSRS reports. You can download and install the tools from here: http://www.microsoft.com/en-us/download/details.aspx?id=36843
Installing the tools however had the adverse effect of causing the data projects in our Visual Studio solutions to fail from working. Here’s what you will need to do to resolve the issue if your database projects are failing to load as well:
- Download and install the SSDT December 2012 Update from here: http://go.microsoft.com/fwlink/?LinkID=274984
- Download and install the Data-Tier Application framework from here: http://www.microsoft.com/en-us/download/details.aspx?id=36842.
If you are on an x64 machine, make sure you install the x86 updates (first) as
well the x64 updates listed in this URL.
Your database projects should work fine after installing the above updates. One last thing worth mentioning is that I currently am on Visual Studio 2012 Update 1 and also that the December 2012 update is the latest one available at this time.
I recently wrote this post on launching the Windows Phone 8.0 emulator without launching Visual Studio 2012. One of the reasons to be able to use the emulator without the need for Visual Studio could be when you only want to view/ demo your sites or applications on the emulator without having the need to develop and deploy them using Visual Studio. In my case, for example, I wanted to do demo the BI capabilities of SharePoint on a mobile device. You may want to use the emulator to just test on a Windows Phone 8.0 device your SharePoint sites hosted on a virtual machine. So here how you can do it:
- Configure the Hyper-V feature: The Windows Phone 8.0 emulator is essentially a virtual hard drive (VHD) that is launched using Hyper-V. Ensure that you have the Hyper-V feature installed on your Windows 8 machine. You can do this by browsing to Add or remove programs –> Turn Windows features on or off –> Selecting Hyper-V from the pop-up screen:
- Download the installer: Next, we’ll need to do is to download the Windows Phone 8.0 SDK from here: http://www.microsoft.com/en-us/download/details.aspx?id=35471 Clicking on the Download button next to “WPexpress_full.exe” file will cause your browser to prompt you to Run or Save the file. Since we are doing a custom installation, we will want to save the executable to a local drive.
- Open it using the command prompt: Once you have download the file, you will need to open the file location in the command prompt. You can do this by either:
- Opening the command prompt and changing the directory to the download directory OR
- Shift-Right clicking the download folder and selecting the “Open with command prompt” option:
- Download all the installation files: Next, we are going to download the installation files onto the local hard drive. This will allow us to only install the components necessary for the emulator to run. To do this, type ”WPexpress_full.exe /layout <DOWNLOADLOCATION>” in the command prompt. The <DOWNLOADLOCATION> in the above command is the location where you would like to download the installation files to. This will launch the Visual Studio 2012 installation Wizard in the download mode. Make sure you have about 1.5 GB free in the drive where you intend to download the installation files:
- You should see the following folder structure once the files have downloaded – <DOWNLOADLOCATION>\packages\MobileTools:
- We are now ready to run the installation media for the emulator. Browse to the <DOWNLOADLOCATION>\packages\MobileTools\XdeHost folder within the downloaded files and run the MobileTools_XDEHost.msi file. This will install the XDE.exe tool that will launch the emulator. Once the setup is complete, you can verify that the relevant files have been created by browsing to the following path: “C:\Program Files (x86)\Microsoft XDE\8.0″ (assuming that you have installed the files in the C: drive)
- Next, we need to install the virtual hard drive for the Windows Phone 8.0 that the emulator will launch. To do so, browse to the ”<DOWNLOADLOCATION>\packages\MobileTools\WpFolder” folder and run the “MobileTools_WPImages_enu.msi” Windows Installer package. This will install various VHD files for the Windows Phone. Once the setup is complete, you can verify that the relevant files have been created by browsing to the following path: “C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images” (assuming that you have installed the files in the C: drive).
That’s it. You are now ready to launch the Windows Phone 8.0 emulator without having to run or even install Visual Studio 2012. To view instructions on how to launch the emulator, please refer my earlier bog post at: http://gauravmahajan.net/2013/02/06/launch-windows-phone-8-emulator-without-launching-visual-studio-2012/
One of a recent pre-sales engagements that I was working on required me to demo the BI capabilities of SharePoint 2010 on a Windows 8 phone device. Considering that it needed to be projected for the benefit of the audience and the fact that the demo SharePoint environment was not exposed to the internet and therefore could not be accessed from a mobile device, I decided to perform the demo using a Windows Phone 8.0 Emulator.
The Windows Phone 8.0 emulator is essentially a virtual hard drive (VHD) that is launched using Hyper-V (cool ). So here’s what you need to do to be able to launch the Windows Phone 8 emulator without having to launching Visual Studio:
- Ensure that you have downloaded and installed the latest version of Windows Phone 8.0 SDK from here (at the time of writing the blog): http://www.microsoft.com/en-us/download/details.aspx?id=35471
- Ensure that you have the Hyper-V feature installed on your Windows 8 machine. You can do this by browsing to Add or remove programs –> Turn Windows features on or off –> Selecting Hyper-V from the pop-up screen:
- Open the command prompt in elevated mode and change the current directory in the command prompt to: “C:\Program Files (x86)\Microsoft XDE\8.0″ (assuming you have installed the SDK to the C:\ drive). Alternately, you can browse to this folder in Windows Explorer, press the “Shift” key, right click the folder and then select “Open command window here” to directly open the folder in command prompt:
- If you are launching the emulator for the first time, you will need to provide the path to the virtual hard drive to be used by it. The Windows Phone SDK installer installs the windows phone 8.0 VHDs in the “C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images” folder(again, assuming you have installed the SDK to the C:\ drive). We are going to launch the “Flash.vhd” hard drive from this folder. To do so, we will run the following command from the command prompt opened in the above step:
xde -vhd “C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.vhd”:
- When the emulator launches for the first time, it tries to configure the Hyper-V network settings (adds and configures new network adapters to your machine so the phone is connected to your network and consequently the internet). If you did not launch the command prompt in step 3 above in elevated mode, you will receive the prompt shown in the image below. This is absolutely normal. If this happens, click the “Retry” button and XDE.exe will automatically launch with elevated privileges. Remember that the emulator only needs to run in elevated mode the first time. So if you shut down the phone and start it again, you will not need to launch it in elevated mode:
- This will now launch the windows phone 8 emulator for you:
- After the first time of launching it, XDE will remember the path to the vhd file. So if you shut down the phone and would like to launch it again, you will only need to double click the XDE.exe file to launch it again. I’d recommend creating a shortcut for it on the desktop or another convenient location.
The following link provides some nice troubleshooting tips in case you face issues running the emulator: http://social.msdn.microsoft.com/Forums/en-US/wptools/thread/b06cc9f2-aa5e-4cb3-9df1-0c273e1dfd68
I will also shortly blog about installing the Windows Phone 8.0 emulator without having to install Visual Studio 2012. Hope you have fun with you new phone…
The pre-requisites installation in one of my recent SharePoint 2013 farm installations was failing at the step where it configures the Application Server and Web Server role for the Server:
Further, the error logs had the following entry:
- Request for install time of Application Server Role, Web Server (IIS) Role
- Install process returned (0)
- [In HRESULT format] (0)
- “C:\Windows\system32\cscript.exe” “C:\Windows\system32\iisext.vbs” /enext “ASP.NET v4.0.30319″
- Request for install time of Application Server Role, Web Server (IIS) Role – Install process returned (1)
- [In HRESULT format] (-2147024895)
- Error when enabling ASP.NET v4.0.30319 – Last return code (1)
Since I did not find much community guidance around this, I thought I’ll do some research myself and post the solution for other’s benefit as well.
A little bit of digging around revealed that the IISExt.vbs script file was indeed missing from the C:\Windows\System32 folder. Further research revealed that the script is part of the IIS 6.0 scripting tools. The solution therefore is as simple as enabling the IIS 6.0 Scripting Tools through the Server Roles and Features Wizard. The path to the IIS 6.0 Scripting Tools is shown in the following screen capture:
That’s it. Your pre-requisites installation should proceed as intended after you install these tools… Good Luck with your install!
Microsoft has published a very comprehensive set of guidelines for installing, configuring and managing Apps for SharePoint 2013. These guidelines are available on the TechNet site here: http://technet.microsoft.com/en-us/library/fp161232.aspx. Without duplicating those details however, I wanted to capture the few necessary steps for those who wanted to quickly get apps for SharePoint 2013 going on a dev. farm. Please note that the examples assume you are using the VM downloaded from my earlier blog post:
- Configure DNS entries: First a little background on why we need to do this - Each installation of an app has a unique URL in your environment. You determine the template for that URL (by determining a domain name and an app prefix), and then app URLs are automatically generated based on that template. Paths for the apps are based on the URL for the site where they are installed. When you install an app to a site, a SubWeb of that site is created to host the app content. The SubWeb for the app is hierarchically below the site collection, but has an isolated unique host header instead of being under the site’s URL. It is recommended to configure a separate DNS for your apps. The difference in domain names provides a layer of isolation for the apps. The use of a different domain name from the SharePoint sites prevents cross-site scripting between the apps and sites and unauthorized access to users’ data. Once you have configured the DNS, you will want to create a wildcard DNS so any app URLs that SharePoint creates can be serviced. The screen shot below shows a “*.apps” wildcard CNAME record:
- Enable Services on the server: Browse to “Central Administration –> System Settings –> Manage Services on server” and ensure that the “App Management Service” and “Microsoft SharePoint Foundation Subscription Settings Service” services are started:
- Configure the Subscription Settings service application and proxy: You can do so by running the following commands in the SharePoint 2013 Management Shell (PowerShell) – examples below assume you are using the VM downloaded through my blog post:
- $account = Get-SPManagedAccount “<farm account>”
- Where: <farm account> is the name of the Farm administrators account in the SharePoint farm
- Example: $account = Get-SPManagedAccount “sp_farm”
- $appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
- $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName <SettingsServiceDB>
- Where: <SettingsServiceDB> is the name that you’d like to give to the new Subscription Settings Service database that the above command will create
- Example: $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName App_SubscriptionSettingsService
- $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
- Configure the App Management service application and proxy: You can do so by running the following commands in SharePoint 2013 Management Shell (PowerShell) - again, examples below assume you are using the VM downloaded through my blog post:
- $account = Get-SPManagedAccount “<farm account>”
- Where: <farm account> is the name of the Farm administrators account in the SharePoint farm
- Example: $account = Get-SPManagedAccount “sp_farm”
- $appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
- $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName <AppServiceDB>
- Where: <AppServiceDB> is the name that you’d like to give to the new App Management Service database that the above command will create
- Example: $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName App_AppManagmentService
- $proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
- Configure the app URLs in Central Admin: Browse to “Central Administration –> Apps –> Configure App URLs” and enter the wildcard CNAME entry that you created above (in step 1) along with an app prefix as depicted below:
That’s all you would need to do to get started. Now, a few issues that I faced in my environment (and how to overcome them):
- Access denied error when trying to configure the Subscription Settings service application: You are most likely going to face this issue if you are using the VM created by me. The underlying cause for this issue is that for some reason, the SQL server installation did not configure permissions correctly on the “Data” directory. This results in a failure when PowerShell tries to create the database for the service application. To overcome the issue you will manually need to grant the “SQLServerMSASUser$SP2013$MSSQLSERVER” Read and Write access to the data directory:
- 401.1 error: The second issue that I faced was the http 401.1 error that I received after adding an app from the SharePoint App Store and browsing to this newly added app. There are 2 workarounds for this issue that Microsoft describes in this KB article. I am going to duplicate the recommended approach described in this KB:
- Open the registry editor (regedit.exe)
- Browse to the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
- Add a new Multi-String Value and call it: BackConnectionHostNames
- Edit the value and enter *.gauravmahajan.net and gauravmahajan.net in two different lines:
- Close the registry editor and restart the machine
- Browse to your app again and it should now open just fine after you provide the required credentials.
- In case the above does not work, you may want to go for the second workaround described in the KB (but only in non-production environments)
Hope the above helps you in getting a quick start on using Apps for SharePoint 2013!
Since the time I created this SharePoint 2013 Virtual machine using the preview version on Windows Server ’08 quite a few enthusiasts have asked if I could upload one with SharePoint 2013 RTM and Win Server 2012. So I spent some time these holidays to create and upload one. Here it goes…
- The VM was created using the VMWare Player version 5.01 which can be downloaded as a free download from the VMWare site.
- It was created using the 180 day evaluation versions Windows Server 2012, SQL Server 2012 and the SharePoint 2013. If you’d like to, you can enter your own keys to activate the trial/ evaluation versions.
- It consists of 6 hard drives and a VMWare virtual machine configuration (.vmx) file. Both the configuration file and hard drives are part of self-extracting .rar files (with the actual total current size at 23 GBs) which can be downloaded from the download links below.
- It has 8 GBs of RAM allocated to it by default (controlled by the settings in the “.vmx” file or via the virtual machine settings in the VMWare player )
- It has the Classic Shell start menu installed from http://classicshell.sourceforge.net/ so you can get the old Windows start menu in addition to the new Windows “Start screen”. This also results in Windows booting up to the desktop instead of the new Windows start screen. Although, if you’d like to, you can get to the Start screen by clicking the Shift+Windows button combination. You can also configure Classic Shell so Windows boots up to the start screen instead, if you so desire.
- It has the start up type for a few non-necessary Windows and SQL services changed to “Manual” or “Delayed start” to conserve overall and start up resources. This includes services for the SQL Server 2012 SSAS, SSIS and SSRS features which I installed just in case anyone needs them.
- Has the Apps service configured to use the URL apps.sp2013.gauravmahajan.net
- Once you fire up the Virtual machine, Windows will auto login to the Administrator’s account. The “sp20130\administrator” account is the account used to install SharePoint and should be used to access central admin.
- The virtual machine additionally has the following accounts:
sp_adminuser: This is a regular user account I created to be added as a site collection admin. This account has site collection admin privileges on the default site collection on the port 80 Web App
sp_apppool_content: This is the app pool account for web applications
sp_apppool_service: This could be used as the app pool account for the service apps that you may configure
sp_cache_supperreader and sp-cache_superuser: The object cache access user accounts
sp_farm: The farm account that is configured while installing Sharepoint
sp_search: The search service account
sp_searchcrawl: The search crawl account
sp_service: This account is used for various service applications
sqladmin: This is the SQL server service account
- All accounts in the VM share the same password which is part of the readme file accompanying the downloads.
Finally, the files are uploaded as part of the following 2 links. The first link contains the first 7 .rar files. The second link contains the remaining .rar files and the ReadMe.txt file:
http://goo.gl/ffTcK (Alternate link: https://docs.google.com/folder/d/0B9wZANcWVSfDdHNzMGx3c01VUWc/edit)
Instructions for extracting the VM: You will need to download all the .rar and .exe files to your machine and then run the “SP2013.exe” executable to unpack the virtual machine hard drives. After ensuring that you have the latest version of the VMWare Player installed, you can then double click the “SP2013.vmx” file to run the virtual machine.
UPDATE (16th April 2013): For those who are getting a 500 error when accessing the second link: Google Drive seems to be having an internment issue where the publicly shared folders are not accessible: http://productforums.google.com/forum/#!topic/drive/s3cKirEuDYs The workaround is to use this link in the meantime: https://docs.google.com/folder/d/0B9wZANcWVSfDWml2ZDktMksyNk0/edit
Hope you will find the VM useful and will share any feedback that you may have! Happy SharePointing! :)
Recently, our team was tasked with moving all the SharePoint databases of a SharePoint 2007 farm from one database server to another.
Microsoft recommends using SQL aliases while installing SharePoint. This makes such database moves much easier. Unfortunately, this guideline was not followed when the farm was first created, probably because such guidance was missing in the early days of SharePoint 2007 when the farm was originally created. The key to performing such a move is to create an alias for the new SQL instance and give this alias the same name as the current instance of SQL Server that the SharePoint databases are hosted on. Of course this would mean that the alias can only be configured after the original SQL instance is stopped to avoid any conflicts.
Microsoft provides a fairly comprehensive and accurate guideline around moving all SharePoint 2007 databases via this TechNet article: http://technet.microsoft.com/en-us/library/cc512725(office.12).aspx. Here are a few notes of my own in addition to the TechNet article:
- The article enlists various SharePoint services to be stopped before the databases are detached and the move is carried out. The article is correct in that it does not mention the “Windows SharePoint Services Web Application” as one of the services to be stopped on the front end servers. I wanted to put out an additional note of caution that the service should NEVER EVER be stopped or restarted. Doing so has the potential to delete any customizations that were deployed, including but not limited to web.config entries, assemblies deployed to GAC and so on. This can be disastrous particularly if you don’t have any backups that you can restore these customizations from.
- The article also mentions steps to back up and restore Shared Service Providers for the farm. One issue we faced here was that the SSPs were not getting restored. Further investigation revealed that this was due the Search service not getting correctly restarted. The solution was to rectify the search settings and perform the steps to restore the SSPs again. In addition when you restore the SSPs again, you will need to delete any corrupted SSPs that got restored previously and also delete the content databases for such SSPs that got restored as part of the previous restoration attempts.
That’s pretty much it. Good luck with your move!