This project is read-only.

Application_Start in Orchard Modules

Topics: Writing modules
Sep 20, 2011 at 8:01 PM

I have what may be a dumb question...

I created an Orchard module using EF 4.1 (code first method) and put a breakpoint on the start of my application_start method inside the Global.asax.cs file.  I did this so I could determine if my EF database ever gets re-created upon a database change.

The program trace never gets inside the Application_Start method.  Is this an Orchard thing?  Does Orchard recognize the Global.asax.cs file ??

Thanks in advance for any responses.


Sep 20, 2011 at 8:11 PM

where is your global.asax file?

Sep 20, 2011 at 8:12 PM

In the root of my module.

Sep 20, 2011 at 8:16 PM

Your module is not the application. The only global.asax that ASP.NET MVC uses is the one in the root of the app.

Sep 20, 2011 at 8:23 PM

Would that be the same for the Web.Config file as well ??  Do I need to edit the Web.Config file in the Orchard.Web folder for any modules that I create or can my custom modules hace web.config files specific to the modules??

Thanks again...

Sep 20, 2011 at 8:25 PM

No, local web.configs are handled by ASP.NET.