2010-07-12 38 views
0

當我運行的Silverlight單元測試,我得到第一次機會HttpException,在下面的堆棧跟蹤:擴展名爲xapping的文件是什麼意思?

System.Web.dll!System.Web.StaticFileHandler.GetFileInfo(string virtualPathWithPathInfo, string physicalPath, System.Web.HttpResponse response) Line 87 C# 
System.Web.dll!System.Web.StaticFileHandler.ProcessRequestInternal(System.Web.HttpContext context, string overrideVirtualPath) Line 507 + 0x18 bytes C# 
System.Web.dll!System.Web.DefaultHttpHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback callback, object state) Line 108 C# 
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Line 3389 + 0x14 bytes C# 
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Line 2239 C# 
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) Line 3699 + 0x35 bytes C# 
System.Web.dll!System.Web.HttpApplication.ResumeSteps(System.Exception error) Line 2323 C# 
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) Line 1358 C# 
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) Line 1606 + 0x15 bytes C# 
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNow(System.Web.HttpWorkerRequest wr) Line 2299 C# 
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) Line 2281 C# 
System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) Line 2265 C# 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x17c bytes 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn) + 0x6c bytes  
[Appdomain Transition] 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x83 bytes 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Line 1507 + 0xb bytes C# 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) Line 441 + 0xd bytes C# 
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1486 + 0x23 bytes C# 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 974 C# 
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1341 + 0x6 bytes C# 
[Native to Managed Transition] 

錯誤的本質是,文件「/ClientBin/Shunra.Common.Test.SL.xapping 「缺少,其中Shunra.Common.Test.SL是我的Silverlight單元測試應用程序。物理路徑是「C:\ dev \ windows \ Common \ Shunra.Common.Test.SL.Web \ ClientBin \ Shunra.Common.Test.SL.xapping」

這些xapping文件是什麼?

謝謝。

回答

1

這只是工具箱裏面的整個測試框架非常粗糙。 在SilverlightTestService的初始化調用,以「驗證」了一些Web服務的服務器端的存在:

public void Verify(Action success, Action failure) 
{ 
    new WebTestService(this.ServiceUri).CallMethod("ping", delegate (ServiceResult result) { 
     if ((result != null) && result.Successful) 
     { 
      success(); 
     } 
     else 
     { 
      failure(); 
     } 
    }); 
} 

你可以看到那個「平」結合this.ServiceUri是完整的XAP路徑,給了那個。廢話。 目前,SL Toolkit單元測試框架充滿了這樣的鬆散結局。

相關問題