Running console application from IIS; cannot load System.Web.Extensions
I am using System.Diagnostics to start a new console application to run a batch job**. I am using MVC3 running on IIS 7.5, Windows Server 2008 R2.
However, the application crashes with the following exception:
Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is denied.
I suppose this is because the process is spawned by ASP.NET or IIS and it does not have enough rights to access it.
What can be done to to allow the console app to load the required DLLs?
The application works开发者_如何学Python 100% fine if ran from command line.
** The reason why I am not using a window service is summed up in this question. Basically, I am using Linq2Excel which requires the application to be complied as 32-bit. However, I am going to run the service on 64-bit Windows Server 2008 which requires all services to be complied as 64-bit.
精彩评论