SharePoint 2013 Office web apps preview not working - sharepoint

I am having issues with the preview of our sharepoint office documents, it is not working, i have checked the OWA Server and the owa services are running . I also checked the binding using Get-SPWOPIBinding and it returned the bindings to the owa server. I have also set the zone to external-https using
Set-SPWOPIZone –zone “external-https”
because i saw that the zone was binded to external-https in my sharepoint servers. but still the issue is still there.not sure why and I don't understand the ULS logs either. these are the ULS logs for the correlation id of one of the documents i was trying to preview.
Unexpected Exception in
SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage
'DistributedLogonTokenCache' - Exception 'System.ArgumentException:
Max connections value should be in the range 1 to 100. Parameter
name: value at
Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration.set_MaxConnectionsToServer(Int32
value) at
Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
Token Cache: Failed to initialize SPDistributedSecurityTokenCache
Exception: 'System.ArgumentException: Max connections value should be
in the range 1 to 100. Parameter name: value at
Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration.set_MaxConnectionsToServer(Int32
value) at
Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()
at
Microsoft.SharePoint.DistributedCaching.SPDistributedCache..ctor(String
name, TimeSpan timeToLive, SPDistributedCacheContainerType
containerType, Boolean encryptData) at
Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache..ctor(String
name, TimeSpan timeToLive, SPDistributedCacheContainerType
containerType, Boolean encrptyData, TimeSpan
minimumTokenExpirationWindow) at
Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCacheInitializer.Init(Object
state)'.
i'm stuck and i need assistance

Also check in Event Viewer and see if you can get an error code(s). Looks like AppFabric (Distributed Cache) is having an issue, but it may be a symptom of something else, sometimes only one of several issues. There is a fine tuning script available here, but make sure you know what you're doing. Try setting the Max Connections to 1, test it, and then bump it up to 10 and see if you have any issues. Might want to do this during a maintenance window as a restart may be required.

Related

Umbraco: An unexpected network error on Azure Web Apps

We have an Umbraco website (version 7.5.11) hosted on Azure Web Apps.
We are experiencing the following exception intermittently (3 times within the past 3 weeks). Once the exception occurs it brings the website down until we republish the home node in Umbraco. At all other times the website is working as expected, including retrieving image files from the server.
Exception type: IOException
Exception message: An unexpected network error occurred. at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) at Umbraco.Core.Cache.DeepCloneRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetCacheValues(Int32 id, Func2 func) at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id) at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetById(UmbracoContext umbracoContext, Boolean preview, Int32 nodeId) at Umbraco.Web.PublishedCache.ContextualPublishedCache1.GetById(Boolean preview, Int32 contentId) at Umbraco.Web.PublishedContentQuery.DocumentById(Int32 id, ContextualPublishedCache cache, Object ifNotFound) at Umbraco.Web.PublishedContentQuery.Media(Int32 id) at Umbraco.Web.UmbracoHelper.Media(String id)
The media file exists, and republishing the home node brought the site back online.
At the time of the exception, no code changes were deployed and no pages were updated / published within Umbraco.
Has anyone experienced something similar, or any ideas what the root cause is?
According to the source code of PublishedMediaCache.cs, the exception is often caused by following issue.
Examine index is corrupted.
Here is a thread on umbraco forum which related to your issue.
Examine corruption issues
And here is the solution for this issue from #Shannon Deminick.
If you are using Azure web apps and are NOT auto-scaling, you should use these settings:
useTempStorage="Sync"
use this feature to store local index files: http://issues.umbraco.org/issue/U4-7614
Remove the {machinename} token from your index path
RebuildOnAppStart="true" - since this should only happen one time
If you are using Azure web apps and are load balancing w/ auto-scaling your front-end workers then:
useTempStorage="Sync"
use this feature to store local index files: http://issues.umbraco.org/issue/U4-7614
You must have the {machinename} token from your index path
RebuildOnAppStart="true" - so that when new sites come online, their indexes are built
... yes in some cases this might not be ideal, please see: https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/74731-examine-corruption-issues#comment-244293

Sharepoint 2010 site stop automatically after restarting then work properly getting below error in event log

Failure trying to synch web application ab6c1c01-8989-4f5d-8832-a7334a04024d, ContentDB db31bbeb-8a30-42dd-adb0-1ca4cc7029d2 Exception message was System.IO.FileNotFoundException: The site with the id 0679bb31-50fb-48a3-bdd6-ffdeb72645b8 could not be found.
at Microsoft.SharePoint.SPSite..ctor(Guid id, SPFarm farm, SPUrlZone zone, SPUserToken userToken)
at Microsoft.SharePoint.SPSite..ctor(Guid id)
at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.AddRemoveSites(String strFirstChangeToken, SPChangeToken lastChangeToken)
at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.SynchContentDB()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
at Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(UInt32 tagID, ULSCatBase categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock)
at Microsoft.Office.Server.UserProfiles.WSSProfileSyncJob.Execute()
Kindly help
The error has a few things. First the root cause of the web application stopping and erroring is the My Site Cleanup Job. However the My Site Cleanup failure looks like a symptom of orphaned sites within the SharePoint Content DB. You can see the ID's of them next to the FileNotFoundException.
As a temporary fix you can either Disable or Reschedule the MySite Cleanup Job in Central Administration. However the permanent fix to resolve the orphaned ID's is to schedule an outage window and detach, then re-attach the content database of the affected web application(s). The other methods for fixing this issue or ones I can't recommend without trying the supported approach first.
Good luck!

Error with Azure service SSL in Development Fabric

I'm running into a problem with getting SSL to work in the Development Fabric. I'm running a clean install of Windows 8 Pro with Visual Studio 2012 Ultimate and the October 2012 Azure SDK for .NET. IIS8 is not installed, only IIS Express, which claims to support HTTPS so I'm hoping that's not the issue.
Running VS 12 as administrator, I've created a blank VS solution, added a new (.NET 4.5) cloud service with a new ASP.NET MVC 4 Internet web application project, and hit F5. Everything works fine. Then, when I add an SSL certificate to the web role and replace the HTTP endpoint (port 80) with an HTTPS endpoint (port 443, with the certificate), hitting F5 produces the following error message:
Windows Azure Tools for Microsoft Visual Studio
There was an error attaching the debugger to the role instance 'deployment18(32).WindowsAzureCloudService.Mvc4WebRole_IN_0' with Process Id: 4892'. Unable to attach. Access is denied.
Note, the last part ("Access is denied") comes in a few variations, a particularly pleasant one being "Catastrophic failure". :)
The only message in the VS Output window ('General' output) is:
Windows Azure Tools: Warning: Remapping private port 443 to 444 in role 'Mvc4WebRole' to avoid conflict during emulation.
The Compute Emulator UI is not much help; just before the instance disappears, this is the only console output that I get consistently (sometimes other messages appear, but sporadically every few runs; I'm not sure how to capture these):
[fabric] Role Instance: deployment18(33).WindowsAzureCloudService.Mvc4WebRole.0
[fabric] Role state Unknown
[fabric] Role state Suspended
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Stopped
The certificate was obtained from a CA and properly imported into the Local Machine/Personal/Certificates store as a .pfx with private key, extended properties, and marked as exportable, for what it's worth.
When I attempt to publish the service to Azure, I get one build (validation) warning about the database connection string (which I assume is irrelevant):
The connection string 'DefaultConnection' is using a local database '(LocalDb)\v11.0' in project 'Mvc4WebRole'. This connection string will not work when you run this application in Windows Azure. To access a different database, you should update the connection string in the web.config file.
Probably more important, the deployment actually fails with the following history in the Windows Azure Activity Log window:
9:00:25 AM - Warning: There are package validation warnings.
9:00:25 AM - Preparing deployment for WindowsAzureCloudService - 1/3/2013 8:59:55 AM with Subscription ID '<...>' using Service Management URL 'https://management.core.windows.net/'...
9:00:25 AM - Connecting...
9:00:26 AM - Object reference not set to an instance of an object.
9:00:26 AM - Deployment failed with a fatal error
Can someone help me troubleshoot this issue? I've rebooted a few times. ;)
Thanks in advance!
EDIT (Jan. 3, 4:44 PM): I have a few ideas that might help me make progress, but some are pretty drastic so any advice would be appreciated:
Is there a way to capture all the output from the Compute Emulator (Dev Fabric) to a log file so I can review it? (System.Diagnostic.Trace calls from my service won't help, since I don't even get as far as the RoleEntryPoint when using HTTPS!) I figured this out; see next edit.
That null pointer exception during the Azure deployment has me worried. Is it worthwhile to try reinstalling the Azure SDK, and if so, how should I go about doing a clean install of it?
Has anyone seen a problem of this sort disappear when switching to using full IIS for the emulator? (That seems unlikely since IIS vs. IIS Express should have no relevance to the Azure deployment.)
EDIT (Jan. 4, 10:15 AM): Bad news: I tried the suggestion to grant Read access to the certificates, but it didn't help in my case. Good news: I managed to capture one of those sporadic messages in the Compute Emulator UI before it shut down; it was a bit of info from some diagnostics. Not helpful in and of itself, but it revealed where the Development Fabric was storing its temporary files:
[Diagnostics] Information: C:\Users\Lars\AppData\Local\dftmp\Resources\0005155d-4592-40f4-812e-18793b26576c\directory\DiagnosticStore\Monitor
The GUID portion gets recreated for every deployment, and it is deleted when the deployment goes away (as it always does in my case). But in the parent directory ('dftmp'), there are a few helpful directories that I then monitored during a new deployment: DevFCLogs, DFAgentLogs, and IISConfiguratorLogs. I guess that answers the first question I had yesterday! :)
DFAgentLogs\DFAgent.log: (41KB) No useful information. A bunch of "Failure to read pipe" messages and failures to get the role/deployment instance ID, which I assume are just noise.
DevFCLogs\DevFabric--2013.01.04--<...>.log: (510 KB) No useful information. I skimmed the file and also searched for 'error', 'failure', 'not found', 'certificate', and 'Mvc4WebRole_IN_0'; none of those showed any hints of what was going on.
IISConfiguratorLogs\IISConfigurator.log: (6 KB) Now we're making progress!! :) Can someone tell me what this means? (In the meantime, I'm off ILSpy-hunting... fun fun...)
IISConfigurator Information: 0 : [00006356:00000005, 2013/01/04 16:07:08.915] Using IIS Express appdomain
(...)
IISConfigurator Information: 0 : [00006356:00000005, 2013/01/04 16:07:08.936] Adding binding 127.255.0.0:444: to site deployment18(40).WindowsAzureCloudService.Mvc4WebRole_IN_0_Web
IISConfigurator Information: 0 : [00006356:00000005, 2013/01/04 16:07:10.484] Caught exception
IISConfigurator Information: 0 : [00006356:00000005, 2013/01/04 16:07:10.487] Exception:System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
Server stack trace:
at Microsoft.Web.Administration.Interop.IAppHostProperty.get_Value()
at Microsoft.Web.Administration.ConfigurationElement.GetPropertyValue(IAppHostProperty property)
at Microsoft.Web.Administration.Binding.get_CertificateHash()
at Microsoft.Web.Administration.BindingCollection.Add(Binding binding)
at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasManager.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List1 bindings, List1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
EDIT (Jan. 4, 11 AM): ILSpy wasn't much help; the exception is being thrown at an interop point (we knew that already) while trying to get the hash of a certificate in order to set up the binding (we knew that too). Does anyone know what COM object would need to be registered in order to get a certificate hash for a binding in Microsoft.Web.Administration? Or how I could intercept the interop call to find out? Bonus points if you can tell me why this is happening in the first place. :)
I've had similar problem on two computers. On both cases installing IIS solved the problem.
It seems to be enough to just install the IIS (via add/remove Windows components). You don't need to start using it. The installation changes something and after that my IIS Express started working again with HTTPS from Visual Studio.
There is a discussion on similar issue on MSDN Social:
http://social.msdn.microsoft.com/Forums/nl-NL/windowsazuredevelopment/thread/ad362016-16f6-459a-8022-9307aa5f910e
And the issue has been also raised on Microsoft connect:
https://connect.microsoft.com/VisualStudio/feedback/details/758533
In my case the error in the log files was:
IISConfigurator Information: 0 : [00007644:00000007, 2013.01.17
00:39:18.523] Exception:System.Runtime.InteropServices.COMException
(0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3
(CO_E_CLASSSTRING))
I found the log files from C:\Users\\AppData\Local\dftmp\IISConfiguratorLogs directory.
When running locally with a private key cert for SSL, you'll need to give the user the emulator app is running under access to the private key. Open mmc.exe and add the Certificates >> Local Computer Snap-In to view your certificate. Right Click on the certificate, then All Tasks >> Manage Private Keys - then add IUSR and Network Service with at least read access.
For deployment to azure, you'll need to upload the certificate to the Cloud Service and make sure the certificate is valid for the domain.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. From this SO post

Getting unexpected error when adding columns to a list or a Doc Library in SharePoint 2010

I am getting an unexpected error (see below) when I try to add a column to a list.
Error An unexpected error has occurred.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 6efebddc-675d-43fd-8754-43cea59908b7
Date and Time: 08/24/2011 12:06:16 PM
From the SharePoint log I have found the below details.
06:16.8 w3wp.exe (0x01A8) 0x1080 SharePoint Foundation Runtime tkau Unexpected System.ArgumentNullException: Value cannot be null. Parameter name: s at System.IO.StringReader..ctor(String s) at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.ProcessList() at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 6efebddc-675d-43fd-8754-43cea59908b7
I have two front-end Web servers, two databases and one application server.
Does it have anything to do with alternate access mappings (AAM) as it's accessible through the Internet using HTTPS?
To find out more information about the error you need to look in the SharePoint log for the errors/warnings associated with the Correlation ID. Try using a tool like ULSViewer found here http://archive.msdn.microsoft.com/ULSViewer/Release/ProjectReleases.aspx?ReleaseId=3308.
Start ULSViewer and have it start to monitor the SharePoint Log file.
Once ULSViewer is populating with log entries perform the activity that is causing the error.
Pause ULSViewer and then filter by the Correlation ID. This will give you a better idea of what is failing and possibly why.
It was an AAM issue. My host name was not mapped to HTTPS, and after mapping it to HTTPS the error is gone,
http://myhostname -> https://myhostname

SharePoint crawling - Windows authentication failing for STS4?

In a Sharepoint 2010 installation, we are trying to crawl the content of a small, single-node SharePoint installation. The crawling is partially successful. We are able to retrieve data delivered from the web services (_vti_bin/sitedata.asmx), but when the crawler tries to access the full page contents, it fails. The error message shown in the Crawl Log is:
The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly.
The error which is logged in the ULS is:
08/27/2010 01:52:02.92 mssdmn.exe (0x0A7C) 0x03E4 SharePoint Server Search HTTP Protocol Handler du54 High CHttpAccessorHelper::InitRequestInternal - unexpected status (500) on request for 'http://staging.dsr.dk/_layouts/error.aspx' Authentication 1. [httpacchelper.cxx:657] d:\office\source\search\native\gather\protocols\http\httpacchelper.cxx
08/27/2010 01:52:02.92 mssdmn.exe (0x0A7C) 0x03E4 SharePoint Server Search PHSts dv44 High CSTS3Accessor::Init: InitRequest failed for URL http://staging.dsr.dk/Pages/Forside.aspx Return error to caller, hr=80041206 [sts3acc.cxx:546] d:\office\source\search\native\gather\protocols\sts3\sts3acc.cxx
08/27/2010 01:52:02.92 mssdmn.exe (0x0A7C) 0x03E4 SharePoint Server Search PHSts dvb1 High CSTS3Accessor::Init fails, Url sts4://staging.dsr.dk/siteurl=/siteid={a78b7d4f-059f-4484-8564-449cd12a97cf}/weburl=/webid={1189e380-76fd-44b7-99a2-ebd4f7245c3d}, hr=80041206 [sts3handler.cxx:312] d:\office\source\search\native\gather\protocols\sts3\sts3handler.cxx
08/27/2010 01:52:02.92 mssdmn.exe (0x0A7C) 0x03E4 SharePoint Server Search PHSts dvb2 High CSTS3Handler::CreateAccessorExD: Return error to caller, hr=80041206 [sts3handler.cxx:330] d:\office\source\search\native\gather\protocols\sts3\sts3handler.cxx
We have configured the system according to _http://support.microsoft.com/kb/896861 (method 1).
We have used Fiddler2 to look at the HTTP traffic, which seems normal, i.e., we can see all the requests to _vti_bin/... But the request shown above, to the sts4 protocol, is not caught by Fiddler2. Hints on how to debug the STS4 traffic would be welcome.
Any suggestions on how to make the crawler successfully crawl the full page contents?
Thank you!
Thomas
It turned out the hint was lying a little higher up the ULS log:
Unexpected System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Convert.ToInt32(String value) at DSR.Portal.Core.Service.Identity.IdentityUtility.GetMember(String memberNumberOrCPR) at DSR.Portal.Core.Service.Identity.DSRMembershipProvider.GetUser(String username, Boolean userIsOnline) at DSR.Portal.Core.Service.Identity.DSRMembershipUser.get_Current()
We had implemented a custom MembershipProvider, which was expecting user id’s to be numbers. This failed for Windows Authenticated users, throwing the above stack trace. As a result, the crawler account was not able to retrieve pages, and this caused the problem for the “gatherer”.
So the morale of the story: ALWAYS make sure Windows Authentication works.
Regards
Thomas

Resources