ITsolutionWizard
asked on
asp.net bundle
http://madskristensen.net/post/performance-tuning-tricks-for-aspnet-and-iis-7-e28093-part-2
I followed exact same way above but my website still have alert below.
The only different is the folder name. Do you have any ideas how to fix it?
Sequence contains no elements
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationExc eption: Sequence contains no elements
Source Error:
Line 113: string absolutePath = HostingEnvironment.MapPath (relativeP ath);
Line 114: FileInfo[] files = FindFiles(absolutePath);
Line 115: DateTime lastModified = files.Max(f => f.LastWriteTime);
Line 116:
Line 117: int index = relativePath.LastIndexOf(' /') + 1;
I followed exact same way above but my website still have alert below.
The only different is the folder name. Do you have any ideas how to fix it?
Sequence contains no elements
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationExc
Source Error:
Line 113: string absolutePath = HostingEnvironment.MapPath
Line 114: FileInfo[] files = FindFiles(absolutePath);
Line 115: DateTime lastModified = files.Max(f => f.LastWriteTime);
Line 116:
Line 117: int index = relativePath.LastIndexOf('
ASKER
Framework 4.0
ASKER
Any ideas?
If it's 4.0, I would try the MS bundling package.
Nuget under:
https://aspnetoptimization.codeplex.com/
You have to modify some global.asax items and add a few things, but documentation and online samples should get you there. Very quick and easy to use and does most of the heavy lifting.
If you make a new project it should already be included, which may help in the setup steps just for reference.
If you don't want to use that, as mentioned, would need more details on file structure, and what / when / how often your getting exceptions.
Nuget under:
https://aspnetoptimization.codeplex.com/
You have to modify some global.asax items and add a few things, but documentation and online samples should get you there. Very quick and easy to use and does most of the heavy lifting.
If you make a new project it should already be included, which may help in the setup steps just for reference.
If you don't want to use that, as mentioned, would need more details on file structure, and what / when / how often your getting exceptions.
ASKER
Sound good but how to use it !?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I downloaded it and how to work with my existing solution ?
ASKER
FindFiles works to me
Have you looked at the nuget optimization package? It's generally included in most project templates in VS, and will do 99% of the underlying work for you (including watching for file modifications and rewriting the bundle).
Very efficient, and no point re-inventing the wheel.
If for some reason you can't use it, would need more info on your file structure and code to see what the problem could be. But looks like it's not finding the files, which "possibly" could be due to a lock when overwriting.