davidebbo / WebActivator

Apache License 2.0
242 stars 49 forks source link

Start in WebActivator.PostApplicationStartMethod is not working on IIS 6. Is ther any alternate method available #2 #26

Open appasosawant opened 9 years ago

appasosawant commented 9 years ago

I have working application on local machine. But when i deployed it on SERVER which is having IIS6.0. It is not working. Is there any configuration i need to add?

appasosawant commented 9 years ago

Im having one dll which is having this start method. And im calling this dll from one MVC application. Also i want to refer same dll in ASP.Net Application

davidebbo commented 9 years ago

I haven't used IIS6 in years, but I would have expected this to work fine, unless it's running a very old version of the .NET framework.

appasosawant commented 9 years ago

I have copied all dlls from local machine to server, but still no luck. Server is having .net 4.0 and IIS6.0. There is no any entry found in web.config of local for webactivator dll, only reference is added in application, do i need to add any reference in assembly section in compilation tag?

davidebbo commented 9 years ago

WebActivator builds on .NET's PreApplicationStartMethodAttribute (docs). It itself has an attribute of the same name, which can be confusing, but it's not the same one.

Anyway, to help isolate, test if the plain PreApplicationStartMethodAttribute works on your server, to keep WebActivator out of the equation.

appasosawant commented 9 years ago

I have used PreApplicationStartMethodAttribute of System.Web, restarted IIS on server, no luck.

davidebbo commented 9 years ago

That's odd. At least it isolates away from WebActivator itself. You may want to ask the non-WebActivator question in a general ASP.NET forum (or StackOverflow).

As a workaround, you can try calling ActivationManager.Run() from your global.asax's Application_Start.