Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 未找到奇怪和随机发生的程序集错误_Asp.net_Ajax_Web Services_Json - Fatal编程技术网

Asp.net 未找到奇怪和随机发生的程序集错误

Asp.net 未找到奇怪和随机发生的程序集错误,asp.net,ajax,web-services,json,Asp.net,Ajax,Web Services,Json,我做了一个简单的ajax服务(基于json)从数据库中获取一些数据。 问题如下: 在localhost上:在visualstudio中编程/编辑aspx页面并在浏览器中查看结果时,它可以正常工作,例如编辑aspx页面5-6次,然后就开始失败。在我转到我的web服务接口类之前,请做一些事情(比如在某处放一个换行符)并重新编译它。问题得到解决,循环继续 当我在fire bug中跟踪失败的请求时,我发现500个内部服务器错误: [FileNotFoundException:无法加载文件或程序集“App

我做了一个简单的ajax服务(基于json)从数据库中获取一些数据。 问题如下:

在localhost上:在visualstudio中编程/编辑aspx页面并在浏览器中查看结果时,它可以正常工作,例如编辑aspx页面5-6次,然后就开始失败。在我转到我的web服务接口类之前,请做一些事情(比如在某处放一个换行符)并重新编译它。问题得到解决,循环继续

当我在fire bug中跟踪失败的请求时,我发现500个内部服务器错误: [FileNotFoundException:无法加载文件或程序集“App_Web_lbgnha4m,Version=0.0.0,Culture=neutral,PublicKeyToken=null”或其依赖项之一。系统找不到指定的文件。] *下面是完整的堆栈跟踪

我不确定,但看起来这个文件“App_Web_lbgnha4m”是临时生成的,因为每次我都通过重新编译代码来修复这个错误。过了一段时间,它又出现了一个新名字“App_Web_blahblahblah”

我最担心的是,当我将解决方案部署到登台服务器时。这项服务运行良好(比如说一天),然后又出现了同样的错误,非常惊讶在部署后没有触及文件就出现了问题)。显然,我无法每天部署解决方案来解决此问题

任何建议请帮助

完整堆栈跟踪:

[FileNotFoundException]: Could not load file or assembly 'App_Web_lbgnha4m, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
[ServiceActivationException]: The service '/Website/RESTfulService.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not load file or assembly 'App_Web_lbgnha4m, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified..
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext)
   at System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

尝试切换到ASP.NET Web应用程序项目