3
MyApp라는 Silverlight 응용 프로그램이 있습니다. 시작하는 동안 MyApp는 다음 코드를 사용하여 MyApp.Main.xap 모듈을로드합니다.요청시 xap 파일로드
WebClient wc = new WebClient();
wc.OpenReadCompleted += new OpenReadCompletedEventHandler(onMainModuleLoaded);
Uri uri = new Uri("MyApp.Main.xap", UriKind.Relative);
wc.OpenReadAsync(uri);
작동합니다. MyApp.Main 내에서 나는 또 다른 XAP 파일 MyApp.Billing.xap을로드하고 싶은, 그래서 나는
WebClient wc = new WebClient();
wc.OpenReadCompleted += new OpenReadCompletedEventHandler(onBillingModuleLoaded);
Uri uri = new Uri("MyApp.Billing.xap", UriKind.Relative);
wc.OpenReadAsync(uri);
위와 동일한처럼 쓴하지만 찾을 수 없습니다 파일 없다는 오류가 발생합니다. MyApp.Billing.xap 파일은 ClientBin 폴더 안에 있으며 브라우저의 절대 경로를 통해 직접 다운로드 할 수 있습니다. MyApp.Main 내부에서가 아니라 MyApp 내에서 MyApp.Billing.xap을 다운로드하려고하면 (MyAPp.Main.xap 대신) 잘 작동합니다. 무엇이 문제일까요?