[英]I deployed my project in iis 8,Folder upper case is returns 404 error
My Project in C:\\inetpub\\wwwroot\\Portals\\client\\
directory. 我的项目在
C:\\inetpub\\wwwroot\\Portals\\client\\
目录中。
I used <a href="Default.aspx"/>
it is working fine,that means url is 我使用
<a href="Default.aspx"/>
正常工作,这意味着url为
www.domain.com/portals/client/default.aspx
i have link button that is redirecting through code behind i,e 我有链接按钮正在通过我后面的代码重定向
Response.Redirect("~/Default.aspx",false);
But it is redirecting like www.domain.com/Portals/client/default.aspx
then it is redirecting to 但它像
www.domain.com/Portals/client/default.aspx
一样重定向,然后重定向到
404 - File or directory not found.
404-找不到文件或目录。 in fact if i make P upper case or any of the character upper case in portAls, it is redirecting to
404 - File or directory not found.
实际上,如果我在portAls中将P大写或将任何字符大写,则它将重定向到
404 - File or directory not found.
what is problem? 有什么问题
To find the issue you need to make clear what is the difference between final url when using <a href="Default.aspx"/>
and Response.Redirect()
. 为了找到问题,您需要弄清楚使用
<a href="Default.aspx"/>
和Response.Redirect()
时最终URL之间有什么区别。 By default, urls under IIS are not case sensitive so this should not be the reason of your problem. 默认情况下,IIS下的url不区分大小写,因此这不应成为问题的原因。
To workaround, do following 要解决此问题,请执行以下操作
1) use <a href="Default.aspx"/>
and see where it goes, compare target url with www.domain.com/Portals/client/default.aspx 1)使用
<a href="Default.aspx"/>
并查看其<a href="Default.aspx"/>
,将目标URL与www.domain.com/Portals/client/default.aspx进行比较
2) make sure that www.domain.com is setup for your box 2)确保为您的盒子设置了www.domain.com
3) find where exactly your app root is. 3)查找您的应用根目录到底在哪里。 The "~" in Response.Redirect stays to the application root.
Response.Redirect中的“〜”停留在应用程序根目录下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.