且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

难道ASP.NET MVC创建区域的默认路由

更新时间:2023-02-16 18:14:35

我不喜欢回答我的问题,而是试图解决这个问题的前一天,我想我会发布的情况下,任何人有答案同样的问题。

I don’t like to answer my own question but after a day of trying to solve this problem I thought I would post the answer in case anyone else has the same issue.

在最后,我摆脱了从我的应用我的所有领域,并刚做了基本的Global.asax的路由。当我运行的应用程序,我可以在路由调试器路由集合仍被填充从现在不存在的区域路线看。尝试很多事情,比如从我的ASP.NET临时文件删除一切,与IIS AppPools乱搞,并清理浏览器的数据后,我终于通过这个答案来了。

In the end I got rid of all my areas from my application and just had the basic Global.asax routing. When I ran the app I could see in the route debugger that the routing collection was still being populated with the routes from now non existing areas. After trying many things including deleting everything from my ASP.NET temp files, messing around with IIS AppPools and cleaning out browser data I finally came across the answer.

我删除一切从网站bin文件夹,并重建和低不料,路都不见了。我恢复了我区与所描述的配置和一切工作,因为它应该。

I deleted everything from the websites bin folder, did a rebuild and low and behold, the routes were gone. I reinstated my areas with the config described and everything is working as it should.

我不知道为什么我的MVC应用程序被抓着和填充老路线,但只要我的箱子已被清除,新的DLL创造一切工作,因为它应该。如果有人在那里知道为什么这可能是那么我会非常有兴趣。

I have no idea why my MVC app was holding onto and populating the old routes but as soon as my bin was cleared and new dll’s created everything worked as it should. If anybody out there knows why this may be then I would be very interested.