@@ -150,6 +150,7 @@ public void AddCustomHostNames(string resourceGroupName, string location, string
150
150
catch ( Exception e )
151
151
{
152
152
WriteWarning ( "Could not set custom hostname '{0}'. Details: {1}" , hostName , e . ToString ( ) ) ;
153
+ return ;
153
154
}
154
155
}
155
156
@@ -170,50 +171,6 @@ public void AddCustomHostNames(string resourceGroupName, string location, string
170
171
}
171
172
}
172
173
173
- public void AddCustomHostNamesForSlots ( string resourceGroupName , string location , string webAppName , string slotName , string [ ] hostNames )
174
- {
175
- var webAppSlot = GetWebApp ( resourceGroupName , webAppName , slotName ) ;
176
- var currentHostNames = webAppSlot . HostNames ;
177
-
178
- // Add new hostnames
179
- foreach ( var hostName in hostNames )
180
- {
181
- try
182
- {
183
- if ( ! currentHostNames . Contains ( hostName , StringComparer . OrdinalIgnoreCase ) )
184
- {
185
- WrappedWebsitesClient . WebApps ( ) . CreateOrUpdateHostNameBindingSlot ( resourceGroupName , webAppName ,
186
- hostName , new HostNameBinding
187
- {
188
- SiteName = webAppName ,
189
- } , slotName ) ;
190
- }
191
- }
192
- catch ( Exception e )
193
- {
194
- WriteWarning ( "Could not set custom hostname '{0}' for Slot. Details: {1}" , hostName , e . ToString ( ) ) ;
195
- return ;
196
- }
197
- }
198
-
199
- // Delete removed hostnames
200
- foreach ( var hostName in currentHostNames )
201
- {
202
- try
203
- {
204
- if ( ! hostNames . Contains ( hostName , StringComparer . OrdinalIgnoreCase ) )
205
- {
206
- WrappedWebsitesClient . WebApps ( ) . DeleteHostNameBindingSlot ( resourceGroupName , webAppName , slotName , hostName ) ;
207
- }
208
- }
209
- catch ( Exception e )
210
- {
211
- WriteWarning ( "Could not remove custom hostname '{0}' for Slot. Details: {1}" , hostName , e . ToString ( ) ) ;
212
- }
213
- }
214
- }
215
-
216
-
217
174
public void StartWebApp ( string resourceGroupName , string webSiteName , string slotName )
218
175
{
219
176
string qualifiedSiteName ;
0 commit comments