Configuration Wizard fails with a url may only map to one zone at a time

When you run configuration wizard if it has failing with following error;

Exception: System.ArgumentException: The IncomingUrl is already present in the collection in a different zone.  A url may only map to one zone at a time.  Use a different url for requests from this zone.
at Microsoft.SharePoint.Administration.SPAlternateUrlCollection.Add(SPAlternateUrl alternateUrl, Boolean fUpdate, Boolean throwIfExists)
at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Provision()
at Microsoft.SharePoint.Administration.SPWebServiceInstance.Provision()
at Microsoft.SharePoint.PostSetupConfiguration.CentralAdministrationSiteTask.ProvisionAdminVs()
at Microsoft.SharePoint.PostSetupConfiguration.CentralAdministrationSiteTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

1) Check for all alternate Access mappings for any doublicate value present in AAM.

2)Check IIS Bindings for web applications and extended sites have any doublicate url issues.

3) If the problem happening on Central Administration site. Go to AAM settings and temporary clear other zone urls and run configuration wizard again.




Get URL without QueryString in ASP.NET

Is there an easy way to get the url part without the query string of a given Url?

Yeap .

string  sample = Request.Url.GetLeftPart(UriPartial.Path);

Or long way:

string stringUri = “”;
Uri uri = new Uri(stringUri);
string query = uri.Query;
string url = stringUri.Substring(0, stringUri.Length – query.Length);

happy tips.bye.