0

제대로 작동하지만 성공하지 못한 웹 구성 변환을 만들려고합니다.web.config 변환

나는 다음을 포함하는 내 웹 응용 프로그램에서 폴더가 있습니다

<?xml version="1.0"?> 
<configuration> 
    <system.web> 
    <authorization> 
     <allow roles="ADMINISTRATORS"/> 
     <allow roles="OPERATOR"/> 
     <deny users="?"/> 
    </authorization> 
    </system.web> 
</configuration> 

내가 변환 파일을 만들어 내가 버전을 변환 릴리스의 섹션을 이동했다. 불행히도 이것은 작동하지 않습니다. 구성이 디버그로 설정된 경우 웹 구성에 해당 섹션을 갖고 싶지 않습니다. 그렇지 않으면 필요합니다.

작동 방법에 대한 제안 사항이 있으십니까?

+2

당신이 게시 할 수 있습니다 :

해결책은 간단는 (설정한다 /en-us/library/dd465326.aspx –

+0

당신은 http://msdn.microsoft.com/en-us/library/dd465326.aspx 또는 http://msdn.microsoft.com/en-us/library를 보았습니까? /dd465318.aspx – Lloyd

답변

2

링크를 이용해 주셔서 감사합니다. 이전에 링크를 보았지만 모든 것을 읽지 않았습니다. 당신의 당신이 출시 한 안에 넣어 가지고 코드를 변환하고 친절 http://msdn.microsoft.com을 살펴

<?xml version="1.0" encoding="utf-8" ?> 
<!-- For more information on using transformations 
    see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. --> 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 

    <system.web> 
    <authorization> 
     <allow roles="ADMINISTRATORS" xdt:Transform="Insert"/> 
     <allow roles="OPERATOR" xdt:Transform="Insert"/> 
     <deny users="?" xdt:Transform="Insert"/> 
    </authorization> 
    </system.web> 

</configuration>