403 - Forbidden: You do not have permission to view using the credentials that you supplied

那年仲夏 提交于 2019-12-24 23:32:41

问题


After resolving some issues with deployment of my LightSwitch app to Azure, I was able to get the Azure Management Portal to report that everything was up and running fine. However when I try to access the site, I receive:

Server Error

403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.

This happens regardless of whether I have HTTPS required or not and regardless of the browser used. When this point is reached, no login has been presented and so no credentials have been supplied.

I can't see anything out of the ordinary in Fiddler that would cause this issue.

What should I been looking for to diagnose this problem?


Okay, it turns out that clicking on the site.cloudapp.net link like I used to be able to do causes a 403 Forbidden code. I now need to go to site.cloudapp.net/DesktopClient for some reason and then my site will appear.

Is there a specific reason for this change in behavior? Was there any sort of announcement? Is there any way to change it back to just site.cloudapp.net?


回答1:


Paths in various files needed to be changed.

In Web.config:

<defaultDocument>
  <files>
    <clear/>
    <add value="default.htm"/>
  </files>
</defaultDocument>

Needs to be:

<defaultDocument>
  <files>
    <clear/>
    <add value="DesktopClient/default.htm"/>
  </files>
</defaultDocument>

In default.htm:

<script type="text/javascript" src="Silverlight.js"></script>

Needs to be:

<script type="text/javascript" src="/DesktopClient/Silverlight.js"></script>

And:

<param name="source" value="Web/ARIS2.DesktopClient.xap"/>

Needs to be:

<param name="source" value="/DesktopClient/Web/ARIS2.DesktopClient.xap"/>

The front most slashes in the last two are important because of this answer.



来源:https://stackoverflow.com/questions/21914598/403-forbidden-you-do-not-have-permission-to-view-using-the-credentials-that-y

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!