问题描述
Running Google Cloud Function in VS2019 and getting the error
来源:https://codelabs.developers.google.com/codelabs/cloud-functions-csharp#2
[Google.Cloud.Functions.Hosting.EntryPoint] [info] 服务函数 SendAlertGoogleCloudFunction.Function
2021-01-06T11:46:22.082Z [Microsoft.AspNetCore.Server.Kestrel] [crit] 无法启动 Kestrel。
System.Net.Sockets.SocketException (10013):试图以访问权限禁止的方式访问套接字。
在 System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error,String callerName)
在 System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot,SocketAddress socketAddress)
在 System.Net.Sockets.Socket.Bind(EndPoint localEP)
在 Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
在 Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(端点端点,CancellationToken 取消令牌)
在 Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.c__DisplayClass21_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint,AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses,KestrelServerOptions serverOptions,ILogger logger,Func
2 createBinding)
在 Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication1 application,CancellationToken cancellationToken) Unhandled exception. 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.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint,CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0
1.2 createBinding) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication
1 应用程序、CancellationToken 取消令牌)
在 Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellingToken)
在 Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellingToken)
在 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost 主机,CancellationToken 令牌)
在 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost 主机,CancellationToken 令牌)
在 Google.Cloud.Functions.Hosting.EntryPoint.StartAsync(Assembly functionAssembly,String[] args)
在 AutoGeneratedProgram.(String[] args)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)