'unable to determine application identity of the caller'에 해당되는 글 1건

  1. 2012.01.09 [wp7] Isolatedstorage와 블랜드 충돌 해결법 (unable to determine application identity of the caller)
Windows Phone 72012. 1. 9. 19:04

디자이너가 갑자기 내가 만든 공용 UserControl에서 에러가 나서 그 UserControl 이 포함된 곳에는  블랜드에서 수정을 할수가 없었다.

블랜드에서 오류 내용을 보니

unable to determine application identity of the caller

이런 에러가 뜨고(여기서 머가 문제인지 알수가 없었다.)

그래서 비쥬얼 스튜디오에서 확인하니

Cannot create an instance of "LoginPopupControl".

이런 에러가 떳다.

빌드에는 문제가 없었고 구현에도 이상이 없었다.

문제는 TextBox에 IsolatedStorage의 값을 넣을려고 할때가 문제 였다.

예를 들면

TextBox.Text = IsolatedStorageSettings.ApplicationSettings[LoginIdKey] as string;

이렇게 하면 Xaml쪽에서 에러가 날것이다. 하지만 빌드는 잘된다.(xaml 뷰어에서 빌드하면 오류남)

이것을 해결할려면 어떻게 할것인가?

간단하다.

블랜드에서는 text값을 넣지 않으면 되는것이다.

if (System.ComponentModel.DesignerProperties.IsInDesignTool == false)
            {
                if (sm.LoginID != null)
                {
                    MemberNumberTB.Text = sm.LoginID;
                }
            }

결론은 TextBox에 Isolated값을 직접 넣지 말고 넣을려면 위의 코드처럼 분기를 타게 해줘야 한다.

참조 : http://stackoverflow.com/questions/7294461/unable-to-determine-application-identity-of-the-caller

Posted by 동동(이재동)