每次加载ASP.NET MVC应用程序时重新启动web dev服务器

时间:2009-12-09 00:41:03

标签: asp.net jquery asp.net-mvc

当我启动ASP.NET MVC应用程序并且必须重新启动Web开发服务器然后它消失时,我不断得到这个问题(下面的堆栈跟踪)。当我在我的jquery中进行修改然后尝试重新启动应用程序时,它似乎正在发生。

protected void Application_Start()
        {
            InitialiseIocContainer();
            RegisterViewEngine(ViewEngines.Engines);
            RegisterRoutes(RouteTable.Routes);
            SetupLogging();
        }

似乎在global.asax中的Application_start上得到了警告。我在谷歌做了很多搜索,但没有运气。它驱动我的笨蛋!!!!

任何人都可以帮忙吗

Server Error in '/' Application.
--------------------------------------------------------------------------------

Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

Source Error: 


Line 30:             RegisterRoutes(RouteTable.Routes);
Line 31:             SetupLogging();
Line 32:         }
Line 33: 
Line 34:         private void SetupLogging()


Source File: C:\UserData\SourceControl\LLNP4\Trunk\Web\Global.asax.cs    Line: 32 

Stack Trace: 


[FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)]
   LLNP4.MvcApplication.Application_Start() in C:\UserData\SourceControl\LLNP4\Trunk\Web\Global.asax.cs:32

1 个答案:

答案 0 :(得分:0)

我想说它与SetupLogging()方法有关。运行该站点的用户帐户是否具有对存储日志的文件路径的读/写访问权限?