As you are using MVC 3 -> go to global.asax -> go to method RegisterRoutes() and put following code:
routes.IgnoreRoute("staticcontents/{*file}.pdf");
routes.IgnoreRoute("staticcontents/{*file}.dat");
routes.IgnoreRoute("staticcontents/{*file}.gif");
Here it is ignoring files for .pdf, .dat, .gif files. You can change if you have other file format extension.