简体   繁体   English

如何在不同的Web应用程序之间共享文件

[英]How to share files between different web application

I have some images and PDFs which has to be shared between different web applications hosted on same IIS. 我有一些图像和PDF,这些图像和PDF必须在同一IIS上托管的不同Web应用程序之间共享。
I have tried by creating a separate virtual directory and used the path in both applications. 我已经尝试通过创建单独的虚拟目录并在两个应用程序中使用该路径。

Is there any other better way of doing this? 还有其他更好的方法吗?

If it's for a website, is there a reason you couldn't just directly reference them through http? 如果是用于网站,是否有原因您不能直接通过http直接引用它们? So on Domain 1: 以此类推:

<a href="domain1/doc1.pdf">Document 1 on domain 1</a>

And then on your second domain (domain 2): 然后在您的第二个域(域2)上:

<a href="domain1/doc1.pdf">Document 1 on domain 2</a>

Either way, are there so many of these resources that it's worth the trouble not to just upload separately to each app? 无论哪种方式,是否有这么多的资源,值得不仅仅单独上传到每个应用程序而烦恼吗? That way you wouldn't be creating dependencies. 这样,您就不会创建依赖项。

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

相关问题 如何在应用程序(控制台或服务)和Web服务之间共享数据? - How to share data between an application (console or service) and a web service? 如何在两个网站类型项目之间共享文件 - How to share files between two web site type projects 如何在不同项目之间共享 wsdl 和 xsd 文件? - How to share wsdl and xsd files between different projects? 如何在父控制台应用程序和ASP.NET Web应用程序之间共享app.config - How to share app.config between parent console application and ASP.NET web application 如何在同一台机器和同一应用程序池中的 ASP.NET Web 应用程序之间共享会话? - How to share sessions between ASP.NET Web Apps in same machine and same application pool? 如何在Visual C#Express和Web开发Express之间共享类文件? - How to share class files between visual c# express and web dev express? 如何在两个网页之间共享数据? - How to share data between two web pages? 如何将 dbcontext 共享到整个 razor web 应用程序? - How to share dbcontext to entire razor web application? 如何在多个服务器之间共享应用程序设置 - How to share application settings between multiple servers 在不同页面上的Visual Web部件之间共享数据 - Share Data Between Visual Web Parts on different pages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM