Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc HTTP错误404.4-未找到-URL重写-IIS Express_Asp.net Mvc_Url Rewriting - Fatal编程技术网

Asp.net mvc HTTP错误404.4-未找到-URL重写-IIS Express

Asp.net mvc HTTP错误404.4-未找到-URL重写-IIS Express,asp.net-mvc,url-rewriting,Asp.net Mvc,Url Rewriting,我正在使用ASP.NETMVC+AngularJS构建一个应用程序。现在,为了通过AngularJS进行API调用,我使用URL重写,因为API托管在不同的服务器上 但它给了我404.4的错误。我检查了请求的跟踪,模式匹配良好。它试图重写到服务器url,但随后出现404.4错误 我还添加了我的web.config。我的重写规则如下: <rewrite> <allowedServerVariables> <add name="HTTP_Au

我正在使用ASP.NETMVC+AngularJS构建一个应用程序。现在,为了通过AngularJS进行API调用,我使用URL重写,因为API托管在不同的服务器上

但它给了我404.4的错误。我检查了请求的跟踪,模式匹配良好。它试图重写到服务器url,但随后出现404.4错误

我还添加了我的web.config。我的重写规则如下:

<rewrite>
      <allowedServerVariables>
        <add name="HTTP_Authorization"/>
      </allowedServerVariables>
      <rules>
        <rule name="Api Call" stopProcessing="true">
          <match url="quote/(.*)" />
          <action type="Rewrite" url="http://<server>/pc/service/edge/quote/{R:1}" appendQueryString="false" />
          <serverVariables>
            <set name="HTTP_Authorization" value="Basic <key>" />
          </serverVariables>
          <conditions logicalGrouping="MatchAny">
            <add input="{REQUEST_URI}" pattern="quote/(.*)" />
          </conditions>
        </rule>
      </rules>
</rewrite>

我做错了什么

请帮忙。先谢谢你