2014-06-09 2 views
1

System.IdentityModel.Services.dll을 역 컴파일하려고하지만 디코 딩 도구 중 어느 것도 방법 세부 정보를 표시하지 않습니다.System.IdentityModel.Services.dll을 왜 디 컴파일 할 수 없습니까?

ILDASM에서 이러한 방법으로 IL을 얻을 수 없습니다. ILSpy에 대해서도 같은 이야기입니다. 예를 들어

: System.IdentityModel.Services.SessionAuthenticationModule

ILDASM은 :

.method family hidebysig newslot virtual 
     instance void OnAuthenticateRequest(object sender, 
              class [mscorlib]System.EventArgs eventArgs) cil managed 
{ 
    // Code size  0 (0x0) 
} // end of method SessionAuthenticationModule::OnAuthenticateRequest 


.method family hidebysig instance class [mscorlib]System.Collections.ObjectModel.ReadOnlyCollection`1<class [mscorlib]System.Security.Claims.ClaimsIdentity> 
     ValidateSessionToken(class [System.IdentityModel]System.IdentityModel.Tokens.SessionSecurityToken sessionSecurityToken) cil managed 
{ 
    // Code size  0 (0x0) 
} // end of method SessionAuthenticationModule::ValidateSessionToken 

나는 생각했다 적어도 IL 항상 사용할 수있었습니다. 그렇지 않은가요?

+2

실제 코드 어셈블리를 디 컴파일하지 않고 메타 데이터 만 포함하는 참조 어셈블리를 디 컴파일하는 것으로 추측합니다. 디스어셈블러가 0의 코드 크기를 보여줄 경우, 보여줄 메소드 바디가 없습니다. "실제"어셈블리는 다른 곳에 저장할 수 있습니다 (% WINDIR % \ Microsoft.NET, GAC 등). –

답변

0

R #을 Microsoft 참조 소스를 발견 할 수 있고, 리플렉터를 생성 할 수있다 :

protected ReadOnlyCollection<ClaimsIdentity> ValidateSessionToken(SessionSecurityToken sessionSecurityToken) 
{ 
    ReadOnlyCollection<ClaimsIdentity> onlys; 
    SessionSecurityTokenHandler handler = base.FederationConfiguration.IdentityConfiguration.SecurityTokenHandlers[typeof(SessionSecurityToken)] as SessionSecurityTokenHandler; 
    if (handler == null) 
    { 
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString("ID4011", new object[] { typeof(SessionSecurityToken) }))); 
    } 
    try 
    { 
     onlys = new ReadOnlyCollection<ClaimsIdentity>(handler.ValidateToken(sessionSecurityToken, this.CookieHandler.Path)); 
    } 
    catch (SecurityTokenExpiredException exception) 
    { 
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FederatedSessionExpiredException(DateTime.UtcNow, sessionSecurityToken.ValidTo, exception)); 
    } 
    catch (SecurityTokenNotYetValidException exception2) 
    { 
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FederationException(SR.GetString("ID1071", new object[] { DateTime.UtcNow, sessionSecurityToken.ValidFrom }), exception2)); 
    } 
    return onlys; 
} 

ILSpy 매우 유사한 코드를 생성 이다. 그래서 나는 틀린을 조립 또는 다른 뭔가 찾고있는 것 같아요.

관련 문제