Base solution for your next web application
Open Closed

ASP.NET Zero Power Tools - update service-proxies.ts error #6280


User avatar
0
rbreton created

I am working on ASP.NET Core & Angular template. After generating the entity via Power Tools, run my *.Web.Host project and then run "./angular/nswag/refresh.bat" to update service-proxies.ts.

The following error is generated even though the server is running...

D:\temp\PhoneBookDemo\angular\nswag>refresh

D:\temp\PhoneBookDemo\angular\nswag>"..\node_modules.bin\nswag" run NSwag NPM CLI NSwag command line tool for .NET 4.6.1+ WinX64, toolchain v11.20.1.0 (NJsonSchema v9.11.0.0 (Newtonsoft.Json v9.0.0.0)) Visit http://NSwag.org for more information. NSwag bin directory: D:\temp\PhoneBookDemo\angular\node_modules\nswag\bin\binaries\Win

Executing file 'D:\temp\PhoneBookDemo\angular\nswag\service.config.nswag'... System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: No es posible conectar con el servidor remoto ---> System.Net.Sockets.SocketException: No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión 127.0.0.1:22742 en System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) en System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) en System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- Fin del seguimiento de la pila de la excepción interna --- en System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) en System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) --- Fin del seguimiento de la pila de la excepción interna --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en CallSite.Target(Closure , CallSite , Object ) en System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) en NJsonSchema.Infrastructure.DynamicApis.<HttpGetAsync>d__16.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.SwaggerDocument.<FromUrlAsync>d__59.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.OutputCommandBase.<ReadSwaggerDocumentAsync>d__5.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.SwaggerGeneration.FromSwaggerCommand.<RunAsync>d__9.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.SwaggerGeneration.FromSwaggerCommand.<RunAsync>d__8.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.NSwagDocumentBase.<GenerateSwaggerDocumentAsync>d__40.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.NSwagDocument.<ExecuteAsync>d__8.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.Document.ExecuteDocumentCommand.<ExecuteDocumentAsync>d__9.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NSwag.Commands.Document.ExecuteDocumentCommand.<RunAsync>d__8.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NConsole.CommandLineProcessor.<ProcessSingleAsync>d__12.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NConsole.CommandLineProcessor.<ProcessAsync>d__11.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en NConsole.CommandLineProcessor.Process(String[] args, Object input) en NSwag.Commands.NSwagCommandProcessor.Process(String[] args)child_process.js:656 throw err; ^ Error: Command failed: "D:\temp\PhoneBookDemo\angular\node_modules\nswag\bin/binaries/Win/nswag.exe" run at checkExecSyncError (child_process.js:616:11) at Object.execSync (child_process.js:653:13) at Object.<anonymous> (D:\temp\PhoneBookDemo\angular\node_modules\nswag\bin\nswag.js:43:22) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19)

Thanks in advanced!


1 Answer(s)
  • User Avatar
    0
    rbreton created

    Sorry, I found the problem. Change port 22742 through port 5000 as seen in the following image...