Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Global.asax Application_start fired on every action

I am working on a MVC project and the performance was fine.

On application_start the database gets indexed for the lucene.net search (and on every change on an object the index is extended). But application_start runs on every action I call on the page.

Why is it firing application_start not only once? I will post any code when I know where to look ;)

I'm not sure if the web.config may cause this behaviour...

Solution: Lucene.net wrote its index to the bin folder, after changing the path the application is not melting my face anymore :)

like image 587
griti Avatar asked Sep 02 '09 08:09

griti


1 Answers

It could be because when Lucene builds its index it modifies some of the files (web.config, global.asax, bin folder, etc...) that would cause AppDomain to unload.

like image 168
Darin Dimitrov Avatar answered Oct 05 '22 22:10

Darin Dimitrov