0

私は正しく動作するようにWeb設定の変換をしようとしていますが、成功しません。web.config変換

私は次を含む私のWebアプリでフォルダを持っている:

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

I変換ファイルを作成し、私はリリース変換バージョンでセクションを移動しました。残念ながら、これは動作していません。 設定が[デバッグ]に設定されている場合、私はそのセクションを自分のWeb設定に入れたくありません。

どのように動作させるかに関する提案はありますか?

+2

あなたはリリース1の内側に入れているあなたの変換コードを投稿して親切http://msdn.microsoft.comを見てみることができますか? /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

リンクのおかげで、私はそれらを前に見ましたが、すべてを読むことを止めることはありません。

ソリューションは、(で設定することは簡単です:

<?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> 
関連する問題