У меня есть приложение asp net 4. Когда я запускаю его на Visual Studio 2015, он работает отлично. Когда я публикую его в своем локальном IIS Express (v10), он снова работает со всеми стандартными конфигурациями. Тем не менее, когда я развертываю его на сервере, у которого есть IIS 6, он снова работает нормально, но я получаю следующую ошибку.IIS (403) Запрещено
Server Error in '/' Application.
The remote server returned an error: (403) Forbidden.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (403) Forbidden.]
System.Net.HttpWebRequest.GetResponse() +8418416
Truvo.Web.AdvertiserLounge.Controllers.BusinessClaimingController.MakeSearchCall(Boolean advancedSearch, Boolean cache, String view, Int32 log_top_n, String adrecip, Int32 pageSize, Int32 offset, Boolean excludeZone, String what, String where, String locale, Boolean rotate) +925
lambda_method(Closure , ControllerBase , Object[]) +679
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +270
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +120
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +15
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +33
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
Я следовал следующие вопросы:
403 - Forbidden: Access is denied. ASP.Net MVC
Я сделал добавить IIS_IUSRS, изменил автономный вход для пула приложений.
Я не знаю, что происходит и ищет помощь. Спасибо :)
Когда вы говорите «добавьте IIS_IUSRS», что вы имеете в виду? Обычно я создаю пул памяти в IIS, назначаю ему пользователя, а затем назначаю его права доступа к папке для приложения. хранится. Вы также можете посмотреть здесь, в частности, IIS6 с MVC http://stackoverflow.com/questions/3132368/can-i-deploy-net-4-0-web-application-on-iis6 – Phill