global.asax works on local computer but not after

2020-02-01 04:12发布

How can I get my global.asax file to publish to our ftp site?

I have added a global.asax file to my project (using asp.net with c# from vs2010) which works great on my local machine. Then when I publish to our ftp site. Then copy from the ftp folder into the site folder overwriting old files. It doesn't work. I am using Windows Server 2008 R2 Enterprise.

7条回答
混吃等死
2楼-- · 2020-02-01 04:59

We tried a lot of things.

  1. Global.asax is not publishing and event are not firing in Global.asax
  2. Why are the Global.asax events not firing in my ASP .NET website?
  3. Global.asax not firing for Release build
  4. Mystery of Global.asax in ASP.NET MVC application

We also tried putting the below files in root and bin directories.

  1. App_global.asax.dll and App_global.asax.compiled files
  2. PrecompiledApp.config

None of it worked!

We had to put raw Global.asax instead of pre-compiled dll, in order to fire the global events, for our asp .net 2.0 website.

Hope this helps someone! Cheers! Happy coding! :D

查看更多
登录 后发表回答