Questions tagged [webactivator]

A NuGet package that allows other packages to execute some startup code in web apps.

WebActivator is a NuGet package that allows other packages to easily bring in Startup and Shutdown code into a web application. This gives a much cleaner solution than having to modify global.asax with the startup logic from many packages.

You can find more information and its source at the project's Github Page.

Installation

WebActivator can most easily be installed through its NuGet package.

Install-Package WebActivatorEx
42 questions
33
votes
5 answers

Install-Package : Unable to find package 'WebActivator'

I have Visual Studio 2012 Express for Web. My Steps -Create a New ASP .NET MVC 4 application -choose basic template -go to Package Manager Console -try to install WebActivator PM> Install-Package WebActivator and i get the following error How i…
isxaker
  • 8,446
  • 12
  • 60
  • 87
20
votes
2 answers

Ninject and MVC3: Dependency injection to action filters

I've found loads of inconclusive articles and questions on how to do property injection on an ActionFilter in ASP.NET MVC3 using Ninject. Could someone give me a clear example please? Here's my custom auth attribute. public class…
Rob Stevenson-Leggett
  • 35,279
  • 21
  • 87
  • 141
14
votes
2 answers

Ninject.MVC3, Nuget, WebActivator oh my

I want to setup Ninject to do a simple test, as well as demonstrate the ease-of-setup using Nuget. I want to resolve a sample service. public interface ITestService { string GetMessage(); } public class TestService : ITestService { public…
Rob
  • 143
  • 1
  • 5
10
votes
1 answer

asp.net MVC 4 with StructureMap

I am converting an ASP.NET MVC3 project to MVC4. I was trying to find the best approach to work with StructureMap and MVC4. I've found a couple of solution which might work, but haven't tried them yet. The first solution is very simple and…
LeftyX
  • 35,328
  • 21
  • 132
  • 193
6
votes
2 answers

Define an initialization order of WebActivator.PreApplicationStartMethod classes

I have several WebActivator.PreApplicationStartMethod decorated classes. One is for Ninject, another class for AwesomeMVC and a third one is for background task scheduler. The problem is that the scheduler class needs to take advantage of the…
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
6
votes
1 answer

Webactivator doesn't run on IIS 7

I have several web applications that make use of packages using WebActivator. On my local machine with IIS 7.5 Express, everything works fine whether I test in Release or Debug configurations. However, on my production machine with IIS 7.5,…
Leniency
  • 4,984
  • 28
  • 36
6
votes
2 answers

What's the proper way to configure Ninject for an MVC3 application?

I've read several articles regarding the setup of Ninject for MVC3 projects. Some say that your Global.asax.cs should inherit from NinjectHttpApplication, others register modules when constructing the StandardKernel via Application_Start(). I…
Razor
  • 17,271
  • 25
  • 91
  • 138
5
votes
2 answers

NinjectMVC3's WebActivator.PreApplicationStartMethod assembly attribute causing warnings in my view source editors

When using NinjectMVC3's WebActivator.PreApplicationStartMethod attribute in my web application, [assembly: WebActivator.PreApplicationStartMethod(typeof(MyProject.App_Start.NinjectMVC3), "Start")] I am seeing the following warning in each of my…
Stephen Swensen
  • 22,107
  • 9
  • 81
  • 136
5
votes
3 answers

Error in downloading WebActivator with NuGet

I just updated my NuGet Package Manager on my corporate machine. Ever since the update, I am unable to add any package. I tried to install WebActivator for instance and got the following error: PM> Install-Package WebActivator Install-Package : The…
Yasir
  • 1,595
  • 5
  • 23
  • 42
5
votes
1 answer

Error on type WebActivatorEx.ActivationManager threw an exception ....Parameter count mismatch

I am getting this error after I installed Microsoft.Owin.*. Target .Net Framework:4.5.2. Web Activator: 2.2.0 I have the same setup in another project and that seems to work fine. Please help me debug or fix this. Have I have done so…
RDs
  • 513
  • 6
  • 22
5
votes
1 answer

How to register an area using app_start or webactivator?

I would like avoid having to call AreaRegistration.RegisterAllAreas() in my global.asax, because I'm trying to move all startup logic into individual classes inside of the App_Start folder. However, I've been unsuccessful in getting this to work.…
ssmith
  • 8,092
  • 6
  • 52
  • 93
5
votes
1 answer

Replace WebActivator PreApplicationStartMethod with OwinStartupAttribute?

I'm using WebActivator.PreApplicationStartMethod in my current project but it seems like the OwinStartupAttribute could do the same job? Is this the proper use of the OwinStartupAttribute?
marcus
  • 9,616
  • 9
  • 58
  • 108
4
votes
3 answers

After deploying to AppHarbor I get The type or namespace name 'WebActivator' could not be found

I'm uploading my first application to AppHarbor and I'm getting the following error: "The type or namespace name 'WebActivator' could not be found (are you missing a using directive or an assembly reference?)" The solution is building correctly on…
lgrosales
  • 569
  • 5
  • 9
4
votes
2 answers

WebActivatorEx causing ArgumentException on Application Start

I keep getting the following ArgumentException when trying to visit a page after installing the WebActivatorEx nuget package. Server Error in '/PharmaDotnet/ux' Application. The type Pharma.Mvc.Startup doesn't have a static method named…
Professor of programming
  • 2,978
  • 3
  • 30
  • 48
4
votes
0 answers

The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception

I'm trying to run an ASP MVC 4 application on IIS. When I publish MVC 4 application from Basic template - without any dependencies apart from these made by the wizard - application works. But when I publish other application, that is using…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
1
2 3