Office 365 – DTD is prohibited in this document issue


 

 

 

 Office365logo       SP2013logo

Got trouble Connection PowerShell to SharePoint online? This could be the resolution to your troubles.
I had this myself, or we had it in our Company tenant. This is what the issue was and this is how I fixed it:

When trying to connect to PowerShell for SharePoint Online, using the Connect-SPOService command, we got a error that did not tell us anything.

PS dtd error 1

The error is:
Connect-SPOService : For security reasons DTD is prohibited in this document. To enable DTD processing set DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

Well, its almost a joke right…
When searching the web for information on this particular, I struck zero…all I could find related to the ISP and the default search provider something. I quickly dismissed them as unrelated.
Then after some time had passed, I found a similar issue, this seemed related and it was a connectivity issue same as mine (If I still had the link I would give credit to where credit is due). This fellow had resolved the issue by adding a missing DNS record.
This made me think, since our tenant has existed since way Before Office 365 existed (BPOS) perheps we were also missing some of the required DNS records?
I checked with my collegues, and apparently we were missing the record as well.

So, if you ever see or get the ‘DTD prohibited’ issue, remember to check the DNS for the following record:

Type: CNAME
Alias: MSOID
Target: clientconfig.microsoftonline-p.net
Info: Used by Office 365 to direct authentication to the correct identity platform More Information

After I added this to DNS, Connect-SPOService works just fine!

SPO-Connect

 

Microsoft’s official explaination on the DNS record:
What’s the purpose of the additional Office 365 CNAME record?

When you run a client application that works with Office 365 such as Lync, Outlook, Windows PowerShell or Microsoft Azure Active Directory Sync tool, your credentials must be authenticated. Office 365 uses a CNAME record to point to the correct authentication endpoint for your location, which ensures rapid authentication response times.If this CNAME record is missing for your domain, these applications will use a default authentication endpoint in the United States, which means authentication might be slower. If this CNAME record isn’t configured properly, for example, if you have a typo in the Points to address, these applications won’t be able to authenticate.

If Office 365 manages your domain’s DNS records,, Office 365 sets up this CNAME record for you.

If you are managing DNS records for your domain at your DNS host, to create this record, you create this record yourself by following the instructions for your DNS host.

 

References and Credits
Nope, not this time…Credits & many thanks to To all of you.

_________________________________________________________

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

Advertisement

SharePoint prerequisites, this is how you do it!


This post will cover most of what you need to know about the prerequisites of SharePoint Server 2010.
There are a few tricks to it that can help you out, there are a few things never before documented…and there are links that need to be collected into one place.
That, is what will show up in this post eventually…

Adding the obvious starting point for now, this is an absolute must before starting to fiddle with alternate ways of installing the prerequisites:
Install prerequisites from a network share (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/ff686793.aspx

Finding them and Collecting them:
All of the requirements needed for a successful installation of SharePoint Server 2010 or SharePoint Foundation 2010 are listed in the technet article:
Hardware and software requirements (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/cc262485.aspx

There is a full set of prerequisites that have to be on the servers before installing the SharePoint binaries.
IIS:
Server (IIS) role
Application Server role
Add-ons:
Microsoft .NET Framework version 3.5 SP1
SQL Server 2008 Express with SP1
Microsoft Sync Framework Runtime v1.0 (x64)
Microsoft Filter Pack 2.0
Microsoft Chart Controls for the Microsoft .NET Framework 3.5
Windows PowerShell 2.0
SQL Server 2008 Native Client
Microsoft SQL Server 2008 Analysis Services ADOMD.NET
ADO.NET Data Services Update for .NET Framework 3.5 SP1
Windows Identity Foundation (WIF) (If the Geneva framework is previouisly installed, it needs to be uninstalled before WIF is installed)
(A hotfix for the .NET Framework 3.5 SP1 that provides a method to support
token authentication without transport security or message encryption in WCF.)
For Windows Server 2008 SP2, download the Windows6.0-KB979917-x64.msu (Vista) file.
For Windows Server 2008 R2, download the Windows6.1-KB979917-x64.msu (Win7) file.
The prerequisites installer will take care of it for you in most cases, but in a controlled environment you do not want everyserver to download every package from the internet.
Either you have full access to internet when setting up your server nd don’t care about downloading them over and obver, then there is no real need to download the files separately or even know here to find them. But, if you are looking for a way to install from local files, then this is the way, use the script download.ps1 at the end of this post to down load all of the prereqs to a specified subfolder, name it PrerequisiteInstallerFiles and you can use the installer script as well.

If you don’t want to run the script, collect the prerequisites one by one:

http://download.microsoft.com/download/C/9/F/C9F6B386-824B-4F9E-BD5D-F95BB254EC61/Redist/amd64/Microsoft%20Sync%20Framework/Synchronization.msi
http://go.microsoft.com/fwlink/?LinkID=141237&clcid=0x409
Microsoft Sync Framework Runtime v1.0 (x64)

http://download.microsoft.com/download/c/c/4/cc4dcac6-ea60-4868-a8e0-62a8510aa747/MSChart.exe
http://go.microsoft.com/fwlink/?LinkID=141512
Microsoft Chart Controls for the Microsoft .NET Framework 3.5

http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe
http://go.microsoft.com/fwlink/?LinkId=131037
Microsoft .NET Framework 3.5 Service Pack 1

http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu
http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu
Windows PowerShell 2.0

http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu
http://go.microsoft.com/fwlink/?LinkID=166363
Windows Identity Framework (Win2008 R2)

http://download.microsoft.com/download/6/8/1/681F5144-4092-489B-87E4-63F05E95079C/Windows6.0-KB976394-x64.msu
http://go.microsoft.com/fwlink/?linkID=160770
WCF fix for Win2008 SP2

http://download.microsoft.com/download/E/C/7/EC785FAB-DA49-4417-ACC3-A76D26440FC2/Windows6.1-KB976462-v2-x64.msu
http://go.microsoft.com/fwlink/?LinkID=166231
WCF fix for Win2008 R2

http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.0-KB974405-x64.msu
http://go.microsoft.com/fwlink/?LinkID=160381
Windows Identity Framework (Win2008 SP2)

http://download.microsoft.com/download/3/5/5/35522a0d-9743-4b8c-a5b3-f10529178b8a/sqlncli.msi
http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409
SQL Server 2008 Native Client

http://download.microsoft.com/download/b/9/a/b9a78047-d269-4a25-88a1-9c4321d90677/SQLSERVER2008_ASADOMD10.msi
http://go.microsoft.com/fwlink/?LinkId=130651&clcid=0x409
Microsoft SQL Server 2008 Analysis Services ADOMD.NET

http://download.microsoft.com/download/1/7/1/171CCDD6-420D-4635-867E-6799E99AB93F/ADONETDataServices_v15_CTP2_RuntimeOnly.exe
http://go.microsoft.com/fwlink/?LinkId=158354
ADO.NET Data Services v1.5 CTP2 (Win2008 SP2)

http://download.microsoft.com/download/B/8/6/B8617908-B777-4A86-A629-FFD1094990BD/iis7psprov_x64.msi“,
http://go.microsoft.com/?linkid=9655704
IIS management cmdlets

http://download.microsoft.com/download/1/0/F/10F1C44B-6607-41ED-9E82-DF7003BFBC40/1033/x64/rsSharePoint.msi
http://go.microsoft.com/fwlink/?LinkID=166379
SQL 2008 R2 Reporting Services SharePoint 2010 Add-in

http://download.microsoft.com/download/8/D/F/8DFE3CE7-6424-4801-90C3-85879DE2B3DE/Platform/x64/SpeechPlatformRuntime.msi
http://go.microsoft.com/fwlink/?LinkID=166378
Microsoft Server Speech Platform Runtime

http://download.microsoft.com/download/E/0/3/E033A120-73D0-4629-8AED-A1D728CB6E34/SR/MSSpeech_SR_en-US_TELE.msi
http://go.microsoft.com/fwlink/?LinkID=166371
Microsoft Server Speech Recognition Language – TELE(en-US)

Or you can create and run the script download.ps1 mentioned at the bottom of this post. This will put all of the requirement add-on’s into one folder to be used during intall.
For the server roles to be added and configured no extra software is needed.

Applying them:

Ok, to install and apply all of the prerequisites you can choose one out of several options.

Online.
Online will be the simplest way to install the prerequisites, perhaps in a lab or test environemnt, on a single server, but in a real scenario, perhaps not.

Online 1.
Install manually…I guess this is an option but I can’t think of why you would want to…pick the roles you need manually and install them, install all of the add-ons one by one…
This is not a good or safe way to do it, but possible.

Online 2.
The absolutely simplest way, no major braining needed, execute the PrerequisitesInstaller.exe. Done!
It can be that simple…and it usually is. The prerequisites installer is one of the best little helpers you have ever seen, thank you Microsoft for this. It collects all the software and installs them all into the right place. This works…if you are only installing one server, and you have a fast internet connection, and your server is connected to Internet, and you enjoy not having full control…
Normally, if you are installing a single server environment and the server is fully connected to the Internet and all is swell, run the PrerequisitesInstaller and let it fix up the server for you. (For all other scenarios, I would have a look at the Offline section below.)
But, what if you were…offline…

Offline.
Offline is a completely different matter. The PrerequisitesInstaller.exe is still a great tool and you will want to use it, but you need to do some thinking first. How will the Installer get the files it needs to install if it can’t download them from the internet?

Offline 1.
Run the prerequisitesinstaller with an Arguments file in order to use the add-on files you have downloaded.
Create a textfile, name it PrerequisitesInstaller.Arguments.txt (Important! this has to be exactly right) and paste the second scripttext located at the end of this post.

Offline 2.
Create and run a script that will do it all for you, add the roles, use the local files….
This is a pretty good solution, it will be the same every time and you will only download the files once. The indiciduals installing SharePoint can only be told to run a script that does it all.
In order to do this, you can create a textfile, name it installPrerequisitesFromShare.ps1 and paste the code under InstallPrerequisitesFromFileshare.ps1 at the bottom of the post. This script assumes that you have all of the requirements in one folder located in a subfolder named PrerequisiteInstallerFiles. This method works very well and will install it all for you, you will only have to execute one powershellscript and it will install it all, roles, add-ons and all.

What if:

You uninstall SharePoint from the server, what then?

I will try to ad dmore value here later, but I can say one thing for certain now, uninstall SharePoint and the RSservice will be broken. The Resporting services add on for SharePoint, installs before SHarePoint, during SharePoint install(or before?) it adds a lot of folders and files under the 14 Hive. If you uninstall SHarePoint and delete the 14 hive to get the server clean, you will have to first uninstall the rsservice, then install it again, then reinstall SharePoint.

You uninstall a prereq, what then?

This will hopefully be covered later. Time did not permit it at this point in time.

* * * * SCRIPTS * * * *

Paste into a textfile, rename to: ‘download.ps1′.

Start copy ‘download.ps1′ here:

Import-Module
BitsTransfer
## Prompt
for the destination path
$DestPath =
Read-Host -Prompt "- Enter the destination path for downloaded files"
## Check
that the path entered is valid
If
(Test-Path "$DestPath" -Verbose)
{
    ##
If destination path is valid, create folder if it doesn't already exist
    $DestFolder
= "$DestPath\PrerequisiteInstallerFiles"
    New-Item
-ItemType Directory $DestFolder -ErrorAction SilentlyContinue
}
Else
{
    Write-Warning
" - Destination path appears to be invalid."
    ##
Pause
    Write-Host
" - Please check the path, and try running the script again."
    Write-Host
"- Press any key to exit..."
    $null
= $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    break
}
## We use
the hard-coded URL below, so that we can extract the filename (and use it to
get destination filename $DestFileName)
## Note:
These URLs are subject to change at Microsoft's discretion - check the
permalink next to each if you have trouble downloading.
$UrlList =
("http://download.microsoft.com/download/C/9/F/C9F6B386-824B-4F9E-BD5D-F95BB254EC61/Redist/amd64/Microsoft%20Sync%20Framework/Synchronization.msi",
# http://go.microsoft.com/fwlink/?LinkID=141237&clcid=0x409
- Microsoft Sync Framework Runtime v1.0 (x64) 
            "http://download.microsoft.com/download/c/c/4/cc4dcac6-ea60-4868-a8e0-62a8510aa747/MSChart.exe",
# "http://go.microsoft.com/fwlink/?LinkID=141512"
- Microsoft Chart Controls for the Microsoft .NET Framework 3.5
            "http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe",
# http://go.microsoft.com/fwlink/?LinkId=131037
- Microsoft .NET Framework 3.5 Service Pack 1
            "http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu",
# "http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu"
- Windows PowerShell 2.0    
            "http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu",
# "http://go.microsoft.com/fwlink/?LinkID=166363"
- Windows Identity Framework (Win2008 R2)
            "http://download.microsoft.com/download/6/8/1/681F5144-4092-489B-87E4-63F05E95079C/Windows6.0-KB976394-x64.msu",
# http://go.microsoft.com/fwlink/?linkID=160770
- WCF fix for Win2008 SP2
            "http://download.microsoft.com/download/E/C/7/EC785FAB-DA49-4417-ACC3-A76D26440FC2/Windows6.1-KB976462-v2-x64.msu",
# http://go.microsoft.com/fwlink/?LinkID=166231
- WCF fix for Win2008 R2
            "http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.0-KB974405-x64.msu",
# "http://go.microsoft.com/fwlink/?LinkID=160381"
- Windows Identity Framework (Win2008 SP2)
            "http://download.microsoft.com/download/3/5/5/35522a0d-9743-4b8c-a5b3-f10529178b8a/sqlncli.msi",
# "http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409"
- SQL Server 2008 Native Client
            "http://download.microsoft.com/download/b/9/a/b9a78047-d269-4a25-88a1-9c4321d90677/SQLSERVER2008_ASADOMD10.msi",
# "http://go.microsoft.com/fwlink/?LinkId=130651&clcid=0x409"
- Microsoft SQL Server 2008 Analysis Services ADOMD.NET
            "http://download.microsoft.com/download/1/7/1/171CCDD6-420D-4635-867E-6799E99AB93F/ADONETDataServices_v15_CTP2_RuntimeOnly.exe",
# "http://go.microsoft.com/fwlink/?LinkId=158354"
- ADO.NET Data Services v1.5 CTP2 (Win2008 SP2)
            "http://download.microsoft.com/download/B/8/6/B8617908-B777-4A86-A629-FFD1094990BD/iis7psprov_x64.msi",
# http://go.microsoft.com/?linkid=9655704
- IIS management cmdlets
            "http://download.microsoft.com/download/1/0/F/10F1C44B-6607-41ED-9E82-DF7003BFBC40/1033/x64/rsSharePoint.msi",
# http://go.microsoft.com/fwlink/?LinkID=166379
- SQL 2008 R2 Reporting Services SharePoint 2010 Add-in
            "http://download.microsoft.com/download/8/D/F/8DFE3CE7-6424-4801-90C3-85879DE2B3DE/Platform/x64/SpeechPlatformRuntime.msi",
# http://go.microsoft.com/fwlink/?LinkID=166378
- Microsoft Server Speech Platform Runtime
            "http://download.microsoft.com/download/E/0/3/E033A120-73D0-4629-8AED-A1D728CB6E34/SR/MSSpeech_SR_en-US_TELE.msi"
# http://go.microsoft.com/fwlink/?LinkID=166371
- Microsoft Server Speech Recognition Language - TELE(en-US)
            )
ForEach
($Url in $UrlList)
{
    ##
Get the file name based on the portion of the URL after the last slash
    $DestFileName
= $Url.Split('/')[-1]
    Try
    {
        ##
Check if destination file already exists
        If
(!(Test-Path "$DestFolder\$DestFileName"))
        {
            ##
Begin download
            Start-BitsTransfer
-Source $Url -Destination $DestFolder\$DestFileName -DisplayName
"Downloading `'$DestFileName`' to $DestFolder" -Priority High
-Description "From $Url..." -ErrorVariable err
            If
($err) {Throw ""}
        }
        Else
        {
            Write-Host
" - File $DestFileName already exists, skipping..."
        }
    }
    Catch
    {
        Write-Warning
" - An error occurred downloading `'$DestFileName`'"
        break
    }
}
## View the
downloaded files in Windows Explorer
Invoke-Item
$DestFolder
## Pause
Write-Host
"- Downloads completed, press any key to exit..."
$null =
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

:End copy ‘download.ps1‘ here.

Paste below into a textfile, name it ‘PrerequisitesInstaller.Arguments.txt‘ and put it in your SharePoint media folder, same folder as the PrerequisitesInstaller.exe. The string has to be formatted exactly like it is here, with a single newline and a space between each argument and nothing else.

Start copy ‘PrerequisitesInstaller.Arguments.txt‘ here:

/SQLNCli:Prerequisites\sqlncli.msi /ChartControl:Prerequisites\MSChart.exe /Sync:Prerequisites\Synchronization.msi /KB976462:Prerequisites\Windows6.1-KB976462-v2-x64.msu /IDFXR2:Prerequisites\Windows6.1-KB974405-x64.msu /FilterPack:Prerequisites\FilterPack\FilterPack.msi /ADOMD:Prerequisites\SQLSERVER2008_ASADOMD10.msi /ReportingServices:Prerequisites\rsSharePoint.msi /Speech:Prerequisites\SpeechPlatformRuntime.msi /SpeechLPK:Prerequisites\MSSpeech_SR_en-US_TELE.msi /NETFX35SP1:Prerequisites\dotnetfx35.exe

:End copy ‘PrerequisitesInstaller.Arguments.txthere.

Paste below into a textfile, name it ‘InstallPrerequisitesFromFileshare.ps1′

Start copy ‘InstallPrerequisitesFromFileshare.ps1′ here:

# get current folder $folder = Get-Location # install requirements Start-Process "$folder\PrerequisiteInstaller.exe" -Wait -ArgumentList "/unattended ` /SQLNCli:`"$folder\PrerequisiteInstallerFiles\sqlncli.msi`" ` /ChartControl:`"$folder\PrerequisiteInstallerFiles\MSChart.exe`" ` /NETFX35SP1:`"$folder\PrerequisiteInstallerFiles\dotnetfx35.exe`" ` /PowerShell:`"$folder\PrerequisiteInstallerFiles\Windows6.0-KB968930-x64.msu`" ` /KB976394:`"$folder\PrerequisiteInstallerFiles\Windows6.0-KB976394-x64.msu`" ` /KB976462:`"$folder\PrerequisiteInstallerFiles\Windows6.1-KB976462-v2-x64.msu`" `
/IDFX:`"$folder\PrerequisiteInstallerFiles\Windows6.0-KB974405-x64.msu`" ` /IDFXR2:`"$folder\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu`" ` /Sync:`"$folder\PrerequisiteInstallerFiles\Synchronization.msi`" ` /FilterPack:`"$folder\PrerequisiteInstallerFiles\FilterPack\FilterPack.msi`" ` /ADOMD:`"$folder\PrerequisiteInstallerFiles\SQLSERVER2008_ASADOMD10.msi`" ` /ReportingServices:`"$folder\PrerequisiteInstallerFiles\rsSharePoint.msi`" ` /Speech:`"$folder\PrerequisiteInstallerFiles\SpeechPlatformRuntime.msi`" ` /SpeechLPK:`"$folder\PrerequisiteInstallerFiles\MSSpeech_SR_en-US_TELE.msi`""

:End copy ‘InstallPrerequisitesFromFileshare.ps1′ here.

* * * * END SCRIPTS * * * *