Deploying changes to global.asax
I've inherited a web app in need of some maintenance and all of the changes I've made happen to be in the global.asax file. A bit of googling tells me that this is dynamically compi开发者_高级运维led (there is no global.asax.cs codebehind present) so I figured I could deploy the changes by just dropping the new file into the app's root directory. Turns out there is no global.asax file to be found in there, but there is an App_global.asax.compiled in the /bin folder. I can't find this .compiled file anywhere on my dev machine so assume its only created by IIS (and not the asp.net development server).
As an experiment I stopped the app pool, renamed the .compiled file, copied the global.asax to the app root folder and restarted the app pool. After a couple of minutes the .compiled was not regenerated from my new global.asax so I reverted the changes.
How do I get my changes into the live app? The app is pretty big with quite a few dlls so I'd like to avoid doing a full deployment if possible.
Thanks
The presence of the App_global.asax.compiled file tells me that your ASP.NET project is configured to compile everything and not leave the as*x files as editable. i'm not even sure if the .asax file can be left as editable like .aspx files can. But yours is definitely compiled in.
For that reason, I believe you're going to have to recompile and redeploy the whole thing.
Check the bin folder on the server, if it contains App_Code.dll or something similar then it's probably published in debug mode and you should publish the project in precompiled mode and only upload App_code.dll for the changes in global.asax to take effect
You cant directly deploy only Global.Asax
. If you want then you can do it by editing DLL. If you are on MVC project then you can see mvcapplication.cs
in DLL. There we can apply changes. Its worked for me. I have used .net Reflector with Reflexil 2.1.
DESCRIPTION
精彩评论