When I publish an ASP.NET WebAPI
solution to a remote IIS Server
, I get the error message:
Message: System.ArgumentException: A route named 'DefaultRoute' is already in the route collection. Route names must be unique.
I saw this thread with the same problem, but nothing on it has worked. I have tried:
- Deleting all bin/obj folders in all projects.
- Cleaning/Rebuilding
- Deleting files off the the remote server before publishing
- Renaming the project
Is there anyway I can find out if there is a stale file. I did rename some files and I heard that this can cause a problem?
Not sure if this matters, but I am using the ASP.NET WebApi along with RestSharp to make my rest calls.
This is what my Global.asax startup
has: Is it redundant?
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
RouteConfig.RegisterRoutes(RouteTable.Routes);