代码之家  ›  专栏  ›  技术社区  ›  mark

扩展名为xapping的文件是什么意思?

  •  0
  • mark  · 技术社区  · 14 年前

    当我运行Silverlight单元测试时,我在以下堆栈跟踪中获得第一次机会httpexception:

    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\shunar.common.test.sl.web\clientbin\shunar.common.test.sl.xapping”

    这些Xaping文件是什么?

    谢谢。

    1 回复  |  直到 14 年前
        1
  •  1
  •   Stanislav Dvoychenko    14 年前

    目前,工具包中的整个测试框架都是非常原始的。 在初始化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();
            }
        });
    }
    

    您可以看到,这个“ping”与这个.serviceuri结合在一起是完整的xap路径,这给了.xap ping带来了一些胡说。 目前,SL工具包单元测试框架中充满了这样的松散端。