2

I have a ASP.NET website which has various utility scripts/pages for some software but no public website. I would like to use Microsoft's Orchard CMS to create the website for visitors to look at - but would this mean I would have to move the utility scripts?

Can you run ASP.NET pages etc alongside Orchard or do you have to extend Orchard to do those tasks for you? If you can run scripts alongside, is there anything you should do to prevent interference with Orchard?

I will accept an answer from someone who has experience with Orchard or good reasoning.

Thanks in advance!

Piotr Szmyd
  • 13,371
  • 6
  • 44
  • 61
James
  • 30,496
  • 19
  • 86
  • 113

1 Answers1

0

If you're speaking about existing ASP.NET WebForms application then I guess no, at least it won't be easy.

In this case your best bet would be to either

  • run those applications separately with appropriate rewrite rules, so for end-user it would look like a single application. With this approach you won't be able to access Orchard features (like user management) from your exisiting app, though.
  • rewrite your current pages to MVC and move those along with existing utility scripts to a separate Orchard module

If you're speaking about existing ASP.NET MVC application - the solution could be found here.

Community
  • 1
  • 1
Piotr Szmyd
  • 13,371
  • 6
  • 44
  • 61
  • That's great advice, thanks! So it should be all right to dump my utilities script in a (non root) directory somewhere and install Orchard at the root, making sure I never add a page with the same url as the utilities in Orchard? I can stick the utilities anywhere I like, if needed I can make them modules as you describe. – James Jul 13 '12 at 15:13
  • Depends on what these scripts are. If those are some JS scripts, than you can easily add them to your module. You may also put those in a separate app and just reference from Orchard as needed. – Piotr Szmyd Jul 13 '12 at 18:10
  • I say scripts, they are a couple of `.ashx` handlers, I like your second suggestion, I might do that, thanks. – James Jul 13 '12 at 19:37
  • Yeah, in your case it would be best to keep them apart and use when needed. Otherwise you'd need to alter core code/web.config to add those handlers and probably would run into lots of issues. – Piotr Szmyd Jul 13 '12 at 20:49
  • Just noticed your name in the source for this page...http://thehub.bathspa.ac.uk/ did you create the site with Orchard? – James Jul 13 '12 at 21:53
  • @James Nope, Nick Mayne created that one. He used my Advanced Menu module, though - that's why the name appears in the source:) – Piotr Szmyd Jul 13 '12 at 22:08
  • I'm still very impressed tho :) 70% of me wants to learn how to use/extend Orchard, 30% Drupal. With Orchard I love ASP.NET, modules and the way it works. On the other hand Drupal has lots of extensions and themes; it's also not at risk of Microsoft deciding it's not profitable. Say for example, I wanted to create a site for my local Church where elderly, computer illiterate people could submit articles, which would be better? – James Jul 13 '12 at 22:20
  • Orchard and Drupal have a lot in common in terms of architecture - afaik Drupal was an inspiration for Orchard team;) It's your choice, depending on which one you feel better with. If you love ASP.NET (MVC), I'd go for Orchard of course – Piotr Szmyd Jul 13 '12 at 23:00
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/13883/discussion-between-james-and-piotr-szmyd) – James Jul 14 '12 at 12:35