ASP.net MVC on IIS 7 returning blank page

后端 未结 3 2066
难免孤独
难免孤独 2021-01-05 00:31

I\'m having some trouble deploying an ASP.net MVC 2 RC 2 application to my production box. I have it working well in both dev and test. The key difference seems to be that

3条回答
  •  没有蜡笔的小新
    2021-01-05 01:02

    Just thought I'd add another reason why IIS / MVC might return a blank page... suppose you've got an app pool identity, which is authorised against the SQL database. Now suppose you've got two different identities, one for production, and one for pre-production. Now, further suppose that one of your esteemed colleagues decides to restore the database from production, over the one that exists in pre-production. Now you've got a copy of the prod database in pre-prod, which is authorised for the production user, but not for the pre-production user. In that situation, I was getting blank pages in pre-production now, because the authorisation for the pre-production user (which previously existed in the pre-production database) has now been wiped out by the restore of the database. Because that user ID is the app pool identity, now your MVC app no longer has rights to the database. This caused MVC to render blank pages, and caused me two days of chasing my tail because I thought someone had changed some IIS setting on the web server, but it was actually a database permissions issue. Maybe this will give a clue to someone with a similar problem in the future.

提交回复
热议问题