Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #13763- webapp:Increased timout to 300000 MS for Publish-AzWebApp cmdlet #13894

Merged
merged 18 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Websites/Websites/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Increased timeout for Publish-AzWebApp cmdlet
* Added support for App Service Managed certificates
- New Cmdlets
- New-AzWebAppCertificate
Expand Down
2 changes: 2 additions & 0 deletions src/Websites/Websites/Cmdlets/WebApps/PublishAzureWebApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public override void ExecuteCmdlet()
using (var s = File.OpenRead(ArchivePath))
{
HttpClient client = new HttpClient();
// Considering the deployment of large packages the default time(150 seconds) is not sufficient. So increased the timeout by 300 seconds.
client.Timeout = TimeSpan.FromMilliseconds(300000);
var byteArray = Encoding.ASCII.GetBytes(user.PublishingUserName + ":" + user.PublishingPassword);
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
HttpContent fileContent = new StreamContent(s);
Expand Down