Reputation: 191
Does IIS handle request that of static file eg:
http://localhost:9000/Content/ABC.pdf
If it doesnt then can we add some setting so that the .pdf request is also handled by IIS and it passes through URLRewite module.
Upvotes: 0
Views: 2063
Reputation: 17724
Asp.net only receives requests for aspx, asmx, ashx.
If a file name extension has not been mapped to ASP.NET, ASP.NET will not receive the request.
If you create a custom handler to service a particular file name extension, you must map the extension to ASP.NET in IIS and also register the handler in your application's Web.config file. For more information, see HTTP Handlers and HTTP Modules Overview.
If possible change your url to an ashx file. If not, you can map pdf to be recognized by asp.net.
Upvotes: 1
Reputation: 499132
Yes, IIS handles static content just fine (it does serve images up, right?).
By default it will bypass any dynamic processing and return the content directly.
If your setup does not automatically handle PDF files correctly, you may simply need to add the correct mime type to the configuration.
Upvotes: 0