Sitecore Team Development Service (TDS) will not synchronise on new Windows 10 machine with VS2017 - visual-studio-2017

I have setup a new development machine on Windows 10 with VS2017 and Sitecore 8.2 rev 170728 and am experiencing issues with TDS.
The TDS projects load, the Sitecore connector installs and I can see the _DEV folder and related files in the website folder but when I try and synchronise or perform the test from the TDS project properties I get a 503 error.
Exception The HTTP service located at http://sitecore/_DEV/TdsService.asmx is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later. (ServerTooBusyException):
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.Version()
at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.CheckClientVersion(TdsServiceSoapClient client, SitecoreProjectNode project, Boolean retry)
Inner Exception Details:
Exception The remote server returned an error: (503) Server Unavailable. (WebException):
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
Exception An error occured getting the TDS service version. Please review the Sitecore logs and/or windows events on the server to determine the problem. (ApplicationException):
at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(String sitecoreWebUrl, String sitecoreAccessGuid, SitecoreProjectNode project, Boolean checkVersion)
at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(SitecoreProjectNode project, Boolean checkVersion)
at HedgehogDevelopment.SitecoreProject.VSIP.ToolWindows.SyncWithSitecoreToolWindow.SyncItemsWithSitecore(SitecoreProjectNode project, SitecoreItemNode syncRoot, Boolean sycnChildren)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreProjectPackage.ShowSitecoreSyncWindow(SitecoreProjectNode project, SitecoreItemNode selectedItem, Boolean syncChildren)
Everything is set correctly and the website is definitely up and running.
When I access the TdsService.asmx page directly I get an error trying to verify the version number
System.Web.Services.Protocols.SoapException: Service is Locked ---> HedgehogDevelopment.Padlock.PadlockException: Service is Locked
at HedgehogDevelopment.Padlock.Locking.CheckLock()
at HedgehogDevelopment.SitecoreProject.Service.TdsService.Version()
--- End of inner exception stack trace ---
at HedgehogDevelopment.SitecoreProject.Service.TdsService.Version()
I have tried uninstalling and reinstalling the Sitecore connector, even tried different versions of TDS, different VS projects and even pointing TDS at a clean Sitecore installation.
I am not seeing any information in windows event logs, IIS logs or the Sitecore logs related to this error.
I have granted full control access to the website folder, the folder the code is in and the inetpub folder.

Related

.Net core app runs with EXE but does not run on IIS

I have a .Net Core 6 app which runs fine locally, it also runs fine when I manually start the exe in the publish folder.
However when I run on IIS, it gives the following error.
The server is an AWS EC2 server, I have all ports open as a test as incoming on the firewall, I have also tried to disable the firewall completely and also allowing the app through the firewall. As far as I'm aware there is no AV on the EC2 instance.
I have added the .net core 6 runtime and I have also installed the .NET Core hosting bundle found here:
https://dotnet.microsoft.com/en-us/download/dotnet/6.0
When I have checked the event viewer logs I get this error message:
Application: WebApi.exe
CoreCLR Version: 6.0.222.6406
.NET Version: 6.0.2
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException: Failed to bind to address http://localhost:4000.
System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.)
System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException (SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
I have read there is a setting on old versions of .NetCore to specify the use of IIS, but I can't see one for .Net Core 6.
I am pulling my hair out trying to figure out what is wrong.
Here is what is shown when I run the exe on it's own, which is correct.
I have finally found the reason.
It was due to my program.cs file having this line at the bottom:
app.Run("http://localhost:4000");
I changed this to the following and changed the port to 5000 on IIS and it all started working
app.Run();

Microsoft Dynamics NAV instance running after windows restart but not responding

I've got issue with Microsoft Dynamics NAV instance.
We're restarting Windows server each night (I know that we probably shouldn't do it, but this is a separated topic and not the point of this question).
After windows server starts, SQL and Dynamics Nav instances are starting. Sometimes (1-2 times per month) Dynamics NAV instance is marked as 'Running', but actually doesn't respond (Web services are not working, RTC client cannot connect to this instance etc.). We have to restart Dynamics Nav instance manually once again in order to get it working correctly.
Did anyone have similar problems? We were looking into Windows Logs, but couldn't find anything interesting..
We also wonder if we shouldn't manage start of the services (SQL server, Dynamics Nav instances etc.) manually somehow instead of depending on the automatic start of everything after windows restart.
Update:
There is actually one error in the Windows Event Log which occures ONLY in days when Dynamics Nav instance is not started corretly:
Server instance: XXXX
Tenant ID:
User:
Type: System.AggregateException
Message: A Task's exception(s) were not observed either by Waiting on
the Task or accessing its Exception property. As a result, the
unobserved exception was rethrown by the finalizer thread.
HResult: -2146233088
Type: System.BadImageFormatException
Message: An attempt was made to load a program with an incorrect
format. (Exception from HRESULT: 0x8007000B)
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.NavLicense.NativeMethods.UnpackLicense(Byte[]
license, Int32 licenseSize, StringBuilder header, Int32 headerSize)
at Microsoft.Dynamics.Nav.Runtime.NavLicense.Create(Byte[] license, LicenseExpiredHandler licenseExpiredHandler)
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseSecurityAndLicense.get_License()
at Microsoft.Dynamics.Nav.Runtime.WindowsLanguageDataProvider.IsAvailableLanguage(Int32
languageId)
at Microsoft.Dynamics.Nav.Runtime.NavEnvironment.FindSupportedLanguage(Int32
languageId, Int32 defaultLanguageId)
at Microsoft.Dynamics.Nav.Runtime.NavSession.Open(Boolean useUserPersonalization, Byte[] licenseToUse, Boolean
allowAppsDisabledMode)
at Microsoft.Dynamics.Nav.Runtime.NavTaskSchedulerHelpers.RunAsSystemSession(NavTenant
tenant, Action`1 action)
at Microsoft.Dynamics.Nav.Runtime.NavTaskScheduler.TaskRunInfo.InternalRun()
at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass1_0.<RunTask>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147024885
I'd suggest Delayed Start to help alleviate missing dependencies such as certificates OCSP validation without internet, etc. There should be Windows Logs saying the The service has completed configuration and is ready.
Service Auto-restart actions might help catch unexpected errors, but as it's Running I'm not sure it'll exactly apply to your situation.
The service tier should not be restarted nightly, as you've pointed out :). It might be easier to solve that issue, but I can't suggest anything without more information.
Also, which version of Dynamics NAV/Business Central?

Sitecore Client freezes when deleting an item

I have this project on Sitecore 8.1 and it works quite ok. Recently I had to migrate it to an other server. I restored the databases on a new server, I've copied the website folder, and started on the new server.
All is good, except one thing: when I delete an item the client freezes.
I have a log line like this
23144 10:52:39 INFO AUDIT (sitecore\admin): Recycle item:
master:/sitecore/content/Home/myfolder/myitem
After I shutdown the website an error appears in the log:
22592 11:07:07 ERROR Error while deleting items Exception:
System.Threading.ThreadAbortException Message: Thread was being
aborted. Source: mscorlib at System.Threading.Monitor.Enter(Object
obj) at Sitecore.Configuration.Factory.CreateObject(String
configPath, String[] parameters, Boolean assert) at
Sitecore.Search.SearchManager.get_SearchConfiguration() at
Sitecore.Data.Managers.IndexingManager.UpdateIndexAsync(Database
database) at Sitecore.MainUtil.RaiseEvent[T](EventHandler1
subscribers, Object sender, T eventArgs) at
Sitecore.Data.Engines.HistoryEngine.RegisterItemDeleted(Item item, ID
oldParentId) at System.EventHandler1.Invoke(Object sender,
TEventArgs e) at
Sitecore.Data.Engines.EngineCommand2.RaiseEvent[TArgs](EventHandler1
handlers, Func2 argsCreator) at
Sitecore.Data.Archiving.SqlArchive.DoArchiveItems(IEnumerable`1 items,
ID archivalId) at
Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func1 action,
Action recover) at
Sitecore.Data.Archiving.SqlArchive.ArchiveItem(Item item) at
Sitecore.Data.Items.Item.Recycle() at
Sitecore.Shell.Framework.Pipelines.DeleteItems.Delete(List1 items)
at
Sitecore.Shell.Framework.Pipelines.DeleteItems.Execute(ClientPipelineArgs
args)
I'm not sure if this is related to the client freeze or is just because I shut down the app before deletion ended.
Do any of you have any idea why the client freezes?
Check the permissions of the indexes folder (security for your application's user). Probably the user will not be able to write to the folder.
You can compare the security settings with those on your log folder as that seems to work fine.
Might be a good idea to rebuild indexes to make sure you have all updates.

Sitecore 8 5 update #5 exception on step4 (MongoDB exception)

I am trying to update Sitecore 8 update 4 to update 5, but via UpdateInstallationWizard.aspx I see an error in w3wp (iis) and wizard never done.
How to fix it ? I don't see any error.
Update
In the Sitecore log I see an exception related to MongoDB
ERROR Exception when executing agent processing/taskAgent Exception:
Sitecore.Analytics.DataAccess.DatabaseNotAvailableException Message:
Database not available Source: Sitecore.Analytics.MongoDB at
Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.HandleDatabaseException(ExceptionBehavior
exceptionBehavior, Exception ex) at
Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.Execute(Action
action, ExceptionBehavior exceptionBehavior) at
Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.FindAndModify(IMongoQuery
query, IMongoSortBy sortBy, IMongoUpdate update, Boolean returnNew,
Boolean upsert) at
Sitecore.Analytics.Processing.MongoDbTaskStorageProvider.PickFirstExclusiveTask()
at Sitecore.Analytics.Processing.TaskQueue.TryGetNext(Guid
taskIdBoundary, ProcessingTask& workItem) at
Sitecore.Analytics.Processing.TasksAgent.Execute() at
Sitecore.Analytics.Core.BackgroundService.Run()
Nested Exception
Exception: MongoDB.Driver.MongoConnectionException Message: Unable to
connect to server localhost:27017: No connection could be made because
the target machine actively refused it 127.0.0.1:27017. Source:
MongoDB.Driver at
MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan
timeout, ReadPreference readPreference) at
MongoDB.Driver.Internal.DirectMongoServerProxy.ChooseServerInstance(ReadPreference
readPreference) at
MongoDB.Driver.MongoServer.AcquireConnection(ReadPreference
readPreference) at
MongoDB.Driver.MongoCollection.RunCommandAs[TCommandResult](IMongoCommand
command, IBsonSerializer resultSerializer, IBsonSerializationOptions
resultSerializationOptions) at
MongoDB.Driver.MongoCollection.RunCommandAs[TCommandResult](IMongoCommand
command) at
MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query,
IMongoSortBy sortBy, IMongoUpdate update, IMongoFields fields, Boolean
returnNew, Boolean upsert) at
MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query,
IMongoSortBy sortBy, IMongoUpdate update, Boolean returnNew, Boolean
upsert) at
Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.<>c__DisplayClass2c.b__2b()
at
Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.Execute(Action
action, ExceptionBehavior exceptionBehavior)
Nested Exception
Exception: System.Net.Sockets.SocketException Message: No connection
could be made because the target machine actively refused it
127.0.0.1:27017 Source: System at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) at
System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at
System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP) at
MongoDB.Driver.Internal.MongoConnection.Open() at
MongoDB.Driver.Internal.MongoConnection.SendMessage(BsonBuffer buffer,
Int32 requestId) at
MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage
message) at
MongoDB.Driver.Operations.CommandOperation`1.Execute(MongoConnection
connection) at
MongoDB.Driver.MongoServerInstance.Ping(MongoConnection connection)
at MongoDB.Driver.MongoServerInstance.Connect() at
MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan
timeout, ReadPreference readPreference)
I don't use any MongoDb, but I use SOLR in a project.
From the error it looks like you need to have a valid MongoDB service running. See this SO Question:
Mongodb: Failed to connect to 127.0.0.1:27017, reason: errno:10061
and
problem with mongoDB
If you are not running the xDB have you made sure it is disabled according to this guide? https://kb.sitecore.net/articles/296641
As per the upgrade guide you should be disabling analytics while upgrading.
Please disable Analytics first and then try to apply the update.

TDS timed out getting sitecore items

I've inherited a Sitecore project and am attempting to use TDS [Get Sitecore Items] with a new TDS project however I'm running into the following error. It's worth nothing that I get a warning before the error saying
Old Connector
---------------------------
Hedgehog Development TDS
---------------------------
Warning: The version of the sitecore connector is from an older version of TDS.
Click OK to install the latest version of the connector.
However I've even manually removed the Sitecore connector so I'm not sure why it's detecting an older version either.
Get Sitecore Items Error
---------------------------
Hedgehog Development TDS
---------------------------
Error The request channel timed out while waiting for a reply after 00:01:59.9912110. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.(TimeoutException) getting sitecore items.
Server stack trace:
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.CheckAccessGuid(CheckAccessGuidRequest request)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.CheckAccessGuid(CheckAccessGuidRequest request)
at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.CheckAccessGuid(String accessGuid)
at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(SitecoreProjectNode project, Boolean checkVersion)
at HedgehogDevelopment.SitecoreProject.VSIP.Dialogs.GetSitecoreItems.LoadSitecoreItemsIntoTree(TreeNodeCollection nodes, String sitecoreBrowsePath, SitecoreItemNode node, Boolean isRoot, Boolean getAllChildren)
at HedgehogDevelopment.SitecoreProject.VSIP.Dialogs.GetSitecoreItems.GetSitecoreItems_Load(Object sender, EventArgs e)
It's also with nothing that while I think the error message says 1:59 minutes the error is instant and changes by a few MS on retry.
The TDS addin communicates with Sitecore via WCF. You can fiddle with the binding configuration the followering places:
Visual Studio 2010
"HedgehogDevelopment.SitecoreProject.VSIP.dll.config" and "HedgehogDevelopment.SitecoreProject.VSIP2010.dll.config" both located under "C:\Program Files (x86)\Hedgehog Development\Team Development for Sitecore (VS2010)"
Visual Studio 2012
"HedgehogDevelopment.SitecoreProject.VSIP.dll.config" and "HedgehogDevelopment.SitecoreProject.VSIP2012.dll.config" both located under "C:\Program Files (x86)\Hedgehog Development\Team Development for Sitecore (VS2012)"
I keep all of my four config files in sync where I change all timeout related values to 30 minutes and all size related values to "2147483647" (Max).
Remember to restart Visual Studio after saving the above files.
Can you browse to the Sitecore user interface? I've seen this error before when TDS can't communicate with Sitecore.
In our case, the issue was that the application pool for the site was using the 2.0 Framework instead of the 4.0 Framework.
The "Old Connector" message seems to always happen, no matter how many times I've updated my connector. I am fairly certain this is just a bug in the IDE plugin where the first time it synchronizes after Visual Studio opens it needs to make itself know that the plugin is up to date. I have no concrete data on this, but after the initial sync it stops warning me about the connector.
Regarding the timeout, you may want to verify that the TDS project configurations map up to your environment (project URL, paths, database connection strings).
If your application setup is correct, then this exception is because your SQL server service is not started.
I had the same problem. For me it was a connection issue to the database. check your TDS connection settings :).