We have an application using ASP.NET Core 1.0 RC1 and hosted on IIS. It works fine. Now we have static content, that is available on a file share and should be accessible from the application.
Before ASP.NET 5, we added a virtual directory in IIS and could access the shared content easily. With our hosted ASP.NET 5 application, this unfortunately doesn't seem to work. We just get a 404
back when trying to access the static content.
Our application is using app.UseIISPlatformHandler()
and app.UseStaticFiles()
, but this doesn't work. We discovered that we could use app.UseFileServer()
with custom FileServerOptions
to get the desired behavior, but we are curious if it's also possible with the normal "old" way of adding a virtual directory in IIS.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…