Freigeben über


HTTP or HTTPS in Office Online Server

I'm deploying a single Office Online Server for my SharePoint 2016 single server farm and using http, not https, because it's only a test farm. Here's one of the links I used: Deploy Office Web Apps Server https://technet.microsoft.com/en-us/library/jj219455.aspx.  After I was done, I was unable to preview Excel spreadsheets and I was getting this error in the preview window: Sorry, something went wrong An error has occurred on the server.

Looking in the ULS logs, I see this error and learn from researching that you can't be logged in as the System Account, and I WAS logged in as the farmadmin account, and accessing the preview and attempts to edit in Excel Online were met with the Sorry, something went wrong message.

This is the error you will see if you do the same:

06/27/2017 09:47:15.87* w3wp.exe (0x3044)                        0x3D18 SharePoint Foundation          WOPI                           awyfb Unexpected WopiFrame: GetWOPITargetInternalEx failed. [URL: https://2016ss2/sites/Top Level/_layouts/15/WopiFrame.aspx?sourcedoc={58895ce6-3c14-4ea8-884a-c62346c08dbb}&action=interactivepreview&wdSmallView=1, Exception: System.NotSupportedException: Can not create an identity context for system account user token.     at Microsoft.SharePoint.IdentityModel.SPIdentityContext.Create(SPUserToken token, Boolean isShareByLinkGuestUser)     at Microsoft.SharePoint.IdentityModel.SPIdentityContext.Create(SPUser user)     at Microsoft.SharePoint.IdentityModel.OAuth2.SPOAuth2SecurityTokenManager.IssueLoopbackTokenString(Uri endpointAddress, SPUser user, String applicationContext, DateTime& validTo)     at Microsoft.SharePoint.Utilities.SPWOPIHost.GetAccessToken(SPWeb web, Guid uniqueId, String proofKeyId, SPUrlZ... b4bfff9d-d300-20bd-0cad-856b0e426c56

Even after figuring out I can't use my System Account to access Office preview, I was unable to get the preview to work.
I rebuilt my OOS farm repeatedly by running the New-OfficeWebAppsFarm command on my OOS server. I copied the command from some site I can't remember now, but it was a Microsoft branded article. The command I ran on my OOS server was: New-OfficeWebAppsFarm -InternalURL "https://oos.brwhite1.lab" -EditingEnabled:$true -AllowHttp

On my SP2016 Server, I ran: New-SPWOPIBinding -ServerName oos.brwhite1.lab -AllowHTTP

I also ran: set-wopizone internal-http and confirmed it with get-spwopizone.

BUT, whenever I ran get-spwopibinding on my SharePoint Server, all of the applications listed always showed WopiZone as "internal-https" and I needed it to show internal-http.

Here's a snip from my get-spwopibinding command:
Application     : Excel
Extension       : XLS
ProgId          :
Action          : view
IsDefaultAction : True
ServerName      : oos.brwhite1.lab
WopiZone        : internal-https

It finally dawned on me that I was making assumptions. My original new-officewebappsfarm command was the problem. Because I copied and pasted the URL into Notepad, it copied the -InternalURL "https:// with it. I only had to change the -InternalURL to https:// and I was able to fix preview and edit in Excel Online access for normal users.

For testing, there's no need to get fancy and use HTTPS, certificates, etc, although it's good for practice to do that. In my case, the problem was a simple 's' in my internalURL. Whew.

Comments

  • Anonymous
    June 28, 2017
    Or the RSS HTTP: URL for the HTML FOR the Dos file.