Error : The resource you are looking for has been

2020-02-12 02:47发布

Offlate almost every website/api service/mobile service I deploy, When I hit any route apart from default one, I get the following error 'The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.'

For testing I created a simple ASP.Net WebAPI app and ASP.Net MVC Website and deployed to Azure. It gets deployed and default pages come up. For any link after that, I get that error.

Below is the mobile service.. created and uploaded without modification and configured facebook authentication on portal.azure.com https://wayweb.azurewebsites.net/.auth/login/facebook/callback

Copy of code is at https://1drv.ms/u/s!AkQ9G9AdaYOPgaZ-vXUdlSW9RuQzOQ

Any idea, what am I doing wrong?

标签: azure
4条回答
Luminary・发光体
3楼-- · 2020-02-12 03:01

Add web.config file to your azure directory. Add the code below into it.

<configuration>
<system.webServer>
    <rewrite>
      <rules>
        <rule name="Main Rule" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="/" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>
查看更多
孤傲高冷的网名
4楼-- · 2020-02-12 03:05

If you can't open a json file or any other file even though it exists, try to add:

<system.webServer>
<staticContent>
  <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
  <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
  <mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>

查看更多
啃猪蹄的小仙女
5楼-- · 2020-02-12 03:06

This is the same message error related to a problem with versioning issues of System.Net.Http.dll, System.Net.Http.Formating.dll and System.Net.Http.WebRequest.dll. I fixed that posting those assemblies in the bin folder of my Azure Web API, even though they were supposed been used from global cache. You can see details in ASP Web API not working in Azure

查看更多
登录 后发表回答