WebActivator icon indicating copy to clipboard operation
WebActivator copied to clipboard

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

Open appasosawant opened this issue 10 years ago • 6 comments

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 avatar Jan 13 '15 13:01 appasosawant

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

appasosawant avatar Jan 13 '15 13:01 appasosawant

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.

davidebbo avatar Jan 13 '15 15:01 davidebbo

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?

appasosawant avatar Jan 13 '15 19:01 appasosawant

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.

davidebbo avatar Jan 13 '15 19:01 davidebbo

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

appasosawant avatar Jan 14 '15 07:01 appasosawant

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.

davidebbo avatar Jan 14 '15 15:01 davidebbo