We have several public facing SharePoint sites which use a lot of ASHX files.

We have a virtual directory where we keep a lot of site assets including the ashx files.

I love using ASHX files as they are easy to deploy (no deploying) and can be edited independent of any project.

I use them for programmatic CSS, JavaScript, XML (RSS) and even "web parts".

I use the CEWP and where it asks for an HTML file I drop in the path to the (web part) ashx file.

So far this is working great for us. I love the idea of keeping away from WSPs and using ashx files.

I use ASHX files for webparts so often I created a web part like the CEWP but it gives you the option of caching the ashx file to prevent one extra request to the server.

Is this development and heavy reliance on ASHX bad? Am I doing something terribly wrong?


There is nothing wrong with using ASHX files. It's a common approach to do dynamic, AJAX style web parts.

  • I am saying I use the for no AJAX webparts as well. They themselves are the webpart and retrieved server side. – iambriansreed Jun 6 '12 at 14:37
  • So you're calling the ASHX files server side? Well then you're having a performance/scalability issue... – Wictor Wilen MCA MCM MVP Jun 6 '12 at 14:41
  • I know this is old but why would this create scalability issues? – iambriansreed Oct 25 '13 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.