You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicpartialclassMainPage:ContentPage{publicMainPage(){InitializeComponent();this.Appearing+=MainPage_Appearing;}privatevoidMainPage_Appearing(objectsender,EventArgse){varhostBuilder=newHostBuilder().UseConsoleLifetime().ConfigureServices((hostContext,services)=>{services.AddFtpServer(opt =>opt.UseDotNetFileSystem().EnableAnonymousAuthentication()).AddHostedService<HostedFtpService>();});varhost=hostBuilder.Build();host.RunAsync();}/// <summary>/// Generic host for the FTP server./// </summary>privateclassHostedFtpService:IHostedService{privatereadonlyIFtpServerHost_ftpServerHost;/// <summary>/// Initializes a new instance of the <see cref="HostedFtpService"/> class./// </summary>/// <param name="ftpServerHost">The FTP server host that gets wrapped as a hosted service.</param>publicHostedFtpService(IFtpServerHostftpServerHost){_ftpServerHost=ftpServerHost;}/// <inheritdoc />publicTaskStartAsync(CancellationTokencancellationToken){return_ftpServerHost.StartAsync(cancellationToken);}/// <inheritdoc />publicTaskStopAsync(CancellationTokencancellationToken){return_ftpServerHost.StopAsync(cancellationToken);}}}}
If the above error occurs, it is required to be an absolute path. How can this problem be solved?
The text was updated successfully, but these errors were encountered:
If the above error occurs, it is required to be an absolute path. How can this problem be solved?
The text was updated successfully, but these errors were encountered: