开发者

ASP.NET Images are Getting 302 Redirect

开发者 https://www.devze.com 2023-03-20 00:34 出处:网络
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

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

ASP.NET Images are Getting 302 Redirect

0

精彩评论

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

关注公众号