2

For some reason, we have to include a few existing ASPX pages to DXA without converting them to MVC framework.

When I do this, I see that DXA checks for the page in the Broker DB and throws a 404 error, neglecting to check for the page in the application. Any pointers on how to make DXA check for files in the application and not in the Broker DB?

We have already defined a few HttpModules apart from the DXAStaticContent HttpModule to let a few requests be handled outside DXA.

3
  • 1
    This is not really a DXA question, but more of a ASP.NET MVC question, have you checked out answers on StackOverflow like stackoverflow.com/questions/25385532/…? – Bart Koopman Aug 12 '16 at 16:02
  • The key is - as mentioned in Bart's linked post - making sure aspx pages are handled by a different controller. DXA's controllers will always assume the page is stored in the database, and you need to bypass them. – Nuno Linhares Aug 12 '16 at 16:06
  • The problem was I did not publish the test page from DXA while testing. I am now able to access the page and code behind too works as expected. Added to the confusion, all pages published from Tridion and served by DXA also has the same aspx extension and if this did not work OOB, it would have been tougher to find an alternative solution. :) – Bharath Aug 17 '16 at 15:11
1

Our site has all pages with extension - aspx. With no changes to the DXA framework if I include the aspx pages in the DXA Site project, by default ASP.NET Http routing module caters these pages directly from the published aspx pages and renders them using code behinds. I did not see the request being routed to DXA StaticContent Module too. Also interestingly, if the page is not included in the solution and is instead published from Tridion, it is being picked up from DXA.

Please refer this link for more information on how to mix ASPX and MVC - https://www.simple-talk.com/dotnet/asp-net/mixing-web-forms-and-asp-net-mvc/

1
  • great to hear! Have fun with the DXA :) – Nuno Linhares Sep 7 '16 at 20:38

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.