开发者

IIS 7 w/ MVC 3 Permissions Issue

开发者 https://www.devze.com 2023-04-08 20:56 出处:网络
I currently am in the process of deploying a MVC 3 Web App to an IIS 7 server.When I work on the web app from visual studio and deploy through development server, the web app has no problem using a cu

I currently am in the process of deploying a MVC 3 Web App to an IIS 7 server. When I work on the web app from visual studio and deploy through development server, the web app has no problem using a custom .dll that interacts with a local server. However, when I deploy onto IIS 7, the same dll fails to pull data from the server through the dll. I am assuming this is permissions related. I have assigned the AppPool to use an account I created that is a member of the local 'Adminstrators' account. No Success. My account is a member of this group. One quirk I noticed was when I tried to modify security setting in the %WINDIR%\inetsvr folder, which holds the process that runs web server for II开发者_如何学GoS, I was unable to modify these setting even tho I am a member of the 'administrator' account. Confused about this, and have been running around in circles trying to figure this one out. Any help would be appreciated.


Your web app's associated user definitely don't need to have access permission to %WINDIR%\inetsvr.

Assuming that your website runs on C:\interpub\myWebsite and .Net 4.0, your web app's user needs to have at least reader access to following folders :

  • C:\interpub\myWebsite
  • %windir%\Microsoft.NET\FrameWork\v4.0.30319\Temporary ASP.NET Files

If you don't grant those access to those folder then it is so likely that your app won't run.

Also, visit your site with a browser inside your production server and see the detailed IIS error. That might help to narrow the problem down.

NOTE

Also, be sure that your app pool is in integrated mode because ASP.NET MVC won't work properly under classic mode if you have extensionless Urls. It is highly likely that you will get 404.

0

精彩评论

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

关注公众号