I'm developing a new ASP.Net MVC 4.0 app locally. It runs successfully in Casini. Now I'd like to demo it to my client and expose it through IIS 7.5 running locally on my Win7 box. The problem is that all J开发者_开发百科PG images get a 302 redirect from IIS. I've tried accessing images from /Images/.jpg, /Content/.jpg, and root /*.jpg. What's interesting is that I can access other files types from any folder (like *.js files, *.css files, *.bmp files) just fine.
Any ideas?
It's likely due to Windows permissions on the root directory containing your web site.
When you set it up in IIS, you also need to grant access to the following users:
- IIS Anonymous user account:
IUSR
- IIS Application Pool account: (
IIS AppPool\DefaultAppPool
is the default, replace the latter part if you've specified your own App Pool)
They only need the default read permissions, unless your web site creates files
精彩评论