无法找到资源

时间:2022-10-28 00:25:26

I have migrated our company web apps from Windows Server 2003 to Windows Server 2008 R2. The are all .Net 2.0 classic web apps. They all seem to work fine, except when accessing any resource with a path starting with /Reports/...

我已经将我们公司的web应用程序从Windows Server 2003迁移到Windows Server 2008 R2。这些都是。net 2.0的经典web应用。它们似乎都运行得很好,除了在访问任何以/Reports/…为起点的资源时。

In one app the physical path on disk is c:\Websites\app_name\WebService\Reports... In this reports folder PDF files are dynamically generated and written to disk. They can be accessed via a URL such as this:

在一个应用程序中,磁盘上的物理路径是c:\网站\app_name\WebService\ report…在这个报告文件夹中,PDF文件被动态生成并写入磁盘。可以通过以下URL访问:

http://domain_name/Reports/xxxx.pdf

where /Reports is a virtual directory mapping to the physical path above. This worked fine on 2003 server & IIS6 but on IIS7.5 & 2008 R2 I keep getting the following error:

其中/Reports是指向上面物理路径的虚拟目录映射。这在2003年的服务器和IIS6上工作得很好,但是在IIS7.5和2008 R2上,我一直得到以下错误:

The resource cannot be found.

无法找到资源。

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

描述:HTTP 404。您正在查找的资源(或其中一个依赖项)可能已经被删除、名称更改或暂时不可用。请查看下面的URL并确保拼写正确。

Requested URL: /Reports/xxxx.pdf

请求的URL:/ / xxxx.pdf报告

I have another web app that generates the reports dynamically and streams them directly to the client browser for saving to the local disk, rather than being written to disk on the server. Similar to the above example, the page that generates the report is found under path as follows:

我还有另一个web应用程序,它动态地生成报告,并将它们直接流到客户机浏览器,以便保存到本地磁盘,而不是写入服务器上的磁盘。与上面的示例类似,生成报告的页面如下所示:

/Reports/Viewer.aspx

/报告/ Viewer.aspx

In this case there is no virtual directory being used. The URL referenced in the browser is:

在这种情况下,没有使用虚拟目录。浏览器中引用的URL为:

http://another_domain_name//Reports/Viewer.aspx

Once again I get the same error message as above... HTTP 404 - The resource cannot be found.

我再一次得到与上面相同的错误消息……HTTP 404 -无法找到资源。

I have tried all the permission settings under the sun to try and get it working but to no avail. I've use built in accounts, created new accounts with permissions from very minimal right up to full admin rights. I've also played with the new AppPool Identities with no success. It doesn't seem to matter what permissions I set specifically on the directories, or the accounts configured for the app pool or basic settings on each website itself.

我已经尝试了所有在太阳下的权限设置,试图让它工作,但没有用。我使用内置帐户,创建新帐户的权限从最小到完整的管理权限。我还使用了新的AppPool标识,但没有成功。我在目录上特别设置了什么权限,或者为应用程序池配置了什么帐户,或者每个网站本身的基本设置,似乎都无关紧要。

Once thing I have discovered though, is that whilst the browser is getting the HTTP 404 error, there is no record of this request appearing in the IIS log files for each website!! This is really confusing me, as I would definitely expect to see a failed 404 log entry on the requested resource.

我发现,当浏览器收到HTTP 404错误时,每个网站的IIS日志文件中都没有出现此请求的记录!这让我很困惑,因为我肯定会看到请求资源的404日志条目失败。

Something else to note, I'm running SQL Server 2008 Enterprise on this machine with Reporting services installed and enabled. It's a stretch, but could there be some contention over the /Reports path in my websites vs something else running on the machine? I'm using different bindings/host headers for each individual domain and website running on the server.

需要注意的是,我在这台机器上运行SQL Server 2008 Enterprise,并安装并启用了报告服务。这有点夸张,但是在我的网站和机器上运行的其他东西之间,是否会有关于/Reports路径的争论呢?我对服务器上运行的每个域和网站使用不同的绑定/主机头。

3 个解决方案

#1


2  

Check Reports folder conflict. And remember, Google is faster than SO.

检查报告文件夹冲突。记住,谷歌比原来快。

#2


1  

IIS gives 404 errors for more than just File Not Found these days - so it doesn't give away too much to attackers. Have a look at the event log (application), and also try accessing it from the server itself.

除了这些天没有找到的文件之外,IIS还会提供404错误——因此不会向攻击者泄露太多信息。查看事件日志(应用程序),并尝试从服务器本身访问它。

The other thing to check is that your IIS app pools are correctly configured - especially with the correct pipeline mode and .NET framework version.

另一件要检查的事情是,IIS应用程序池配置正确——特别是使用了正确的管道模式和. net框架版本。

#3


0  

At a command prompt, type:

在命令提示符下,输入:

netsh http show urlacl

netsh http显示urlacl

See if there are any bindings with /reports/ --maybe a left over from a SQL Server Reporting Services install?

看看是否有带有/reports/的绑定——也许是SQL Server报告服务安装的遗留绑定?

v/r BK

v / r汉堡王

#1


2  

Check Reports folder conflict. And remember, Google is faster than SO.

检查报告文件夹冲突。记住,谷歌比原来快。

#2


1  

IIS gives 404 errors for more than just File Not Found these days - so it doesn't give away too much to attackers. Have a look at the event log (application), and also try accessing it from the server itself.

除了这些天没有找到的文件之外,IIS还会提供404错误——因此不会向攻击者泄露太多信息。查看事件日志(应用程序),并尝试从服务器本身访问它。

The other thing to check is that your IIS app pools are correctly configured - especially with the correct pipeline mode and .NET framework version.

另一件要检查的事情是,IIS应用程序池配置正确——特别是使用了正确的管道模式和. net框架版本。

#3


0  

At a command prompt, type:

在命令提示符下,输入:

netsh http show urlacl

netsh http显示urlacl

See if there are any bindings with /reports/ --maybe a left over from a SQL Server Reporting Services install?

看看是否有带有/reports/的绑定——也许是SQL Server报告服务安装的遗留绑定?

v/r BK

v / r汉堡王