Запуск приложения Asp.Net Mvc под сайтом Php (WordPress) на IIS

Я добавил веб-приложение Asp.Net Mvc в качестве приложения на веб-сайт Php. (папка / asp)

когда я звоню на x.com/asp, должно быть запущено веб-приложение Asp.Net.
Но я получаю эту ошибку:

HTTP Error 403.18 - Forbidden
The specified request cannot be processed in the application pool that is configured for this      resource on the Web server.
Detailed Error Information
Module  IIS Web Core
Notification    BeginRequest
Handler php-5.6.2
Error Code  0x00000000
Requested URL   http://www.x.com:80/index.php
Physical Path   D:\WebSites\x.com\index.php
Logon Method    Not yet determined
Logon User  Not yet determined

Я добавил их в web.config:

<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="PHP_via_FastCGI" />
<remove name="php-5.6.2" />
<remove name="PHP53_via_FastCGI" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />

<add name="OzImageHandler" verb="GET" path="/gorsel/*" type="Oz.Services.ImageHandler, Oz.Services" />
<!--<add name="LoggerHandler" verb="*" path="*.logger" type="JSNLog.LoggerHandler, JSNLog" resourceType="Unspecified" />-->

<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<modules runAllManagedModulesForAllRequests="true">

<remove name="RoleManager" />
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
</modules>

Но все же php-приложение обрабатывает / asp-запросы?

Каково решение?

IIS 7.5 Windows Server 2008 R2

PHP приложение WordPress

0

Решение

Получить приложение ASP.NET MVC, работающее под WordPress, можно, отредактировав web.config и затем установив его только для чтения, чтобы WordPress впоследствии не применял никаких изменений.

<rule name="asp.netwebsite" patternSyntax="ECMAScript" stopProcessing="false">
<match url=".*/virtualdirectory.*" />
<action type="None" />
<conditions>
</conditions>
</rule>
<rule name="wordpress" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^store.*" negate="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^virtualdirectory.*" negate="true" />
</conditions>
<action type="Rewrite" url="Index.php" logRewrittenUrl="true" />
</rule>
</rules>

Я надеюсь, что это может помочь кому-то в будущем.
Также очень важно использовать команды Razor, такие как @Url.Content() чтобы убедиться, что ссылки обрабатываются правильно.

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector