asp.netpdfiis-expressapp-data

"404.0 - Not Found" when opening PDF File in App_Data folder on local IIS Express


While Debugging I have some PDF-Files in App_Data folder of my WebSite (in production the files are located somewhere else) because I want to avoid that they are getting deployed. Inside the code I can access and manipulate the files. But if I want to open them in a new browser window e.g. via JavaScript, I'm getting an Error 404.0. The URL is correct and also the displayed physical filesystem path. So I think it may be an issue of the IIS Express?! I have already removed the app_data tag in applicationhost.config from the hiddenSegments section. Is there something else I could configure to get the problem solved?


Solution

  • The App_Data folder is used as a data storage for the web application. It can store files such as .mdf, .mdb, and XML. It manages all of your application's data centrally. It is accessible from anywhere in your web application.The real advantage of the App_Data folder is that, any file you place there won't be downloadable.