2011-07-25 39 views
1

我做了一个简单的ajax服务(基于json)从数据库中获取一些数据。 问题如下:奇怪和随机发生大会没有发现错误

On localhost:在visual studio中编程/编辑aspx页面并在浏览器中看到结果时,它可以正常编辑aspx页面5-6次,然后开始失败。直到我去我的Web服务接口类做一些事情(比如说放一个换行符)并重新编译它。问题得到解决,周期继续...

当我跟踪火灾bug中失败的请求时,发现500内部服务器错误: [FileNotFoundException:无法加载文件或程序集'App_Web_lbgnha4m,Version = 0.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) 

回答

0

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