SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've written a powershell script to create a web application, add libraries and pages, etc. As I work through the script and fix bugs and issues, I delete the web application through central administration and restart IIS.

When I run the script again, it always throws me the following error and after restarting IIS again, the script runs fine.

`http://SharePointApp:280` is already routed to the Default zone of another application. Remove that mapping or use a different URL

I tried to restart IIS a couple of times before running the script but that doesn't help either. Its just a little annoying to see this problem when I clearly restart IIS to remove any references of the deleted web application before running the script and have to do it again for some weird problem.

Has anyone seen this behaviour? How do I fix it?

share|improve this question
up vote 4 down vote accepted

This seems to be an issue with the powersheel_ise.exe and once I close and reopen it, it seems to be fine. Here's a link I found.

share|improve this answer

You can try by restarting timer job service. This type scenario happens when timer job stuck or malfunctions.

share|improve this answer
I did that, but it didn't work. Reopening the powersheel_ise.exe worked for me. – Divi Mar 21 '13 at 3:20
This solution worked for me. Restart Timer Service on all servers in the farm. – Benny Skogberg Jan 28 at 7:19
  1. Rename the url http://SharePointApp:280 to http://SharePointAppX:280 in Central Admin > Alternate Access Mapping
  2. Then create the new webapp
  3. Then revert your url to http://SharePointApp:280
share|improve this answer
Thaks but I select the options to delete the content database and the IIS website when I delete the webapp from central administration – Divi Mar 13 '13 at 21:56
Updated my answer. – Max Melcher Mar 13 '13 at 22:11
Thanks Max, it seems like adding more steps to the process than reducing them – Divi Mar 14 '13 at 1:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.