简体   繁体   English

我在IIS 8中部署了我的项目,文件夹大写是返回404错误

[英]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.

相关问题 部署的WCF Silverlight应用程序返回404错误 - Deployed WCF Silverlight application returns 404 Error Net Core 部署的应用程序在 IIS 上引发错误 404 - Net Core deployed app throws error 404 on IIS 我的 ASP.NET Core WebAPI 项目中的 API 路由不起作用,返回 404 错误 - The API routing in my ASP.NET Core WebAPI project does not work, returns a 404 error 在Azure上部署的Web无法访问.less文件(错误代码404)。 本地IIS部署可以正常工作 - Deployed web on Azure cannot access a .less file (error code 404). Local IIS deployment works without error WebAPI部署到IIS,显示404 Not Found - WebAPI deployed to IIS, gives 404 Not Found 仅在XP / IIS 5.1下部署的网站上使用PageMethod 404。 我应该注意哪些安全设置? - PageMethod 404 only on deployed website under XP/IIS 5.1. What security settings should I be aware of? 部署在 IIS 上的 ASP.NET Core 为长时间运行的请求返回 502 错误 - ASP.NET Core deployed on IIS returns 502 Error for long running requests 我需要将图像文件上传并读取到不属于我的项目文件夹 Asp.NET MVC 5 的文件夹中。我的网站托管在 IIS 服务器中。 任何想法? - I need to upload and read image files to folder that is not part of my project folder Asp.NET MVC 5. My site is hosting in IIS server. Any idea? Swagger UI 在 IIS 上部署时显示 404 错误 - Swagger UI show 404 error when I deploy it on IIS 启动应用程序时发生错误,一旦我在 IIS 上运行我的 ASP.NET 核心项目 - An error occurred while starting the application, once I run my ASP.NET Core project on IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM