简体   繁体   English

PDF 无法通过 IIS Z303CB0EF9EDB9082D61BBBE5825D927 框架应用程序中的 URL 访问。

[英]PDF is not accessible through URL in IIS .NET Framework 4.8 app

I spent few hours on this one without solving it.我在这个问题上花了几个小时没有解决它。 I have a PDF file that I need to be able to open through a link/url, like below:我有一个 PDF 文件,我需要能够通过链接/网址打开该文件,如下所示:

https://api.example.com/my-path/my-pdf-file.pdf https://api.example.com/my-path/my-pdf-file.pdf

The PDF file is hosted in a folder of my IIS application. PDF 文件托管在我的 IIS 应用程序的文件夹中。 Please advise...请指教...

在此处输入图像描述

Is the folder included in the project?该文件夹是否包含在项目中? You can't just add a folder outside of Visual Studio, but have to use VS to add that folder.您不能只在 Visual Studio 之外添加文件夹,而必须使用 VS 添加该文件夹。

You can right click on that existing folder (which of course is a sub folder of your project) and check this setting:您可以右键单击该现有文件夹(这当然是您项目的子文件夹)并检查此设置:

So, in my case, I right click on UpLoadFiles.因此,就我而言,我右键单击 UpLoadFiles。

If the folder ALREADY is included in the project, then you get a option to EXCLUDE the folder like this:如果文件夹已经包含在项目中,那么您可以选择排除该文件夹,如下所示:

在此处输入图像描述

However, if the folder is not included, then you see this:但是,如果该文件夹不包括在内,那么您会看到:

在此处输入图像描述

so, is that folder included in your project?那么,该文件夹是否包含在您的项目中? You want to check above.你想检查上面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET Framework 4.8 应用程序适用于 IIS Express 但不适用于 IIS 服务器 - .NET Framework 4.8 App works on IIS Express but not on IIS Server 如何了解 Framework64 文件夹中 Asp.net v4.0.30xxxxxxx 版本和 IIS 中更新的框架 4.8 框架 - How to know about updated framework 4.8 framework in Asp.net v4.0.30xxxxxxx version in Framework64 folder and IIS IIS 10 服务堆栈 .Net4.8 404 - IIS 10 ServiceStack .Net4.8 404 如何使用 Z303CB0EF9EDB9082AZ61BBBE582 将 REST API 添加到用 .NET Framework 4.8 编写的控制台应用程序中? - How to add REST API to console app written in .NET Framework 4.8 using .NET generic host? 将 .NET Framework 4.6.1 更新到 4.8 后出错 - Error after updating .NET Framework 4.6.1 to 4.8 框架 4.8 的运行库 .NET 6 API - Running library for framework 4.8 for a .NET 6 API 无法通过浏览器访问子域URL - subdomain URL not accessible through browser .NET 6 (Core) 可以与 .NET 4.8 框架在同一台服务器上共存吗? - Can .NET 6 (Core) coexist on the same server with .NET 4.8 Framework? .Net Core 3.0通过反射调用.Net Framework 4.8程序 - .Net Core 3.0 invoking .Net Framework 4.8 program via Reflection 调试 ASP.NET (.NET Framework 4.8) web 应用程序时,没有为新 csproj 格式的 (.NET Framework 4.8) 库加载符号 - No symbols loaded for a (.NET Framework 4.8) library in new csproj format when debugging a ASP.NET (.NET Framework 4.8) web application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM