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?

3 Answers 3


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.


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

  • I did that, but it didn't work. Reopening the powersheel_ise.exe worked for me.
    – Divi
    Commented Mar 21, 2013 at 3:20
  • 1
    This solution worked for me. Restart Timer Service on all servers in the farm.
    – Benny Skogberg
    Commented Jan 28, 2016 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
  • Thaks but I select the options to delete the content database and the IIS website when I delete the webapp from central administration
    – Divi
    Commented Mar 13, 2013 at 21:56
  • Updated my answer. Commented Mar 13, 2013 at 22:11
  • Thanks Max, it seems like adding more steps to the process than reducing them
    – Divi
    Commented Mar 14, 2013 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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