开发者

ASP.NET MVC app can't find Views since I moved my app to a new directory

开发者 https://www.devze.com 2023-01-17 06:21 出处:网络
I copied my app and put it somewhere else. Then I changed IIS开发者_开发问答 to look at the new place and ran it. Debugging it - it runs through my Controllers in the new location fine. But when it ni

I copied my app and put it somewhere else. Then I changed IIS开发者_开发问答 to look at the new place and ran it. Debugging it - it runs through my Controllers in the new location fine. But when it nips off to get the view it goes to the old location of my app?!?


Have you changed anything in your Routes? The Routing engine is what grabs your views when the controller requests them. Perhaps your issue is in your global.asax file? I'm afraid that's all I can offer, without more information.


I used .NET Reflector to work out how the route engine works. Turns out it kind of caches the route. It wouldn't listen to me until I restarted IIS, renamed the old directory so it didn't exist anymore and stopped my devenv.exe process. Then finally it was sorted

0

精彩评论

暂无评论...
验证码 换一张
取 消