4
votes

I have Visual Studio 2019 and i followed the steps mentioned in this link https://www.tatvasoft.com.au/blog/how-to-implement-remote-event-receiver-in-sharepoint-online/ to create a remote event receiver inside our SharePoint online development site.

But when i try to publish the remote event receiver inside visual studio, i got this error:-

Severity Code Description Project File Line
Suppression State Error Web deployment task failed. (Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.) SharePointAddIn3Web

Here is a screen shot from VS:-

enter image description here

Here is the diagnostic log error:-

System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.WebTools.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__3()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__213.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---

System.Exception: Build failed. Check the Output window for more details.

===================

Can anyone advice why i am getting this error?

Thanks

EDIT

Since my above development server has zscaler installed, so I moved the project to another development server which does not have zscaler and when i try to publish i got this error now

"MS Deploy task failed DeploymentBaseOptions does not contain a definition for UserAgent".

2
Try this answer stackoverflow.com/a/58573665/184220 it relates to your editAquila Sands

2 Answers

1
votes

This issue happens when there is no connectivity (Low speed internet) or if you are running any tools parallelly which uses your network.

Can you stop if you are running any tool such as fiddler. Follow the solution here.

0
votes

This issue happened to me, it was because the ProjectName length. On "Output" window in VS i was able to see,

"Unable to copy file "System.Security.Cryptography.ProtectedData.dll" to "System.Security.Cryptography.ProtectedData.dll". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. " it is a common error that happens for windows. then i moved the folder to "D" drive to solve it.

you should look at the Output window in Visual studio. whats the last error it gives.