私は、認証だけでなく、ロールとプロファイル管理を提供する必要がある C# Web サービスに取り組んでいます。各プロファイルに List 型のプロパティが必要です。web.config のプロファイル セクションは次のようになります。
<profile defaultProvider="MyProfileProvider" enabled="true">
<providers>
<remove name="MyProfileProvider"/>
<add connectionStringName="MySqlServer"
applicationName="MyApp"
name="MyProfileProvider"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add name="Websites" type="System.Collections.Generic.List<String>" serializeAs="Binary"/>
</properties>
</profile>
ただし、Web サービスを開始してそのプロパティにアクセスしようとすると、次のエラーが返されます。
System.Configuration.ConfigurationErrorsException: このプロパティの型を読み込もうとすると、次のエラーが発生しました: 型 'System.Collections.Generic.List<String>' を読み込めませんでした。(C:\Projects\MyProject\web.config 行 58) ---> System.Web.HttpException: タイプ 'System.Collections.Generic.List<String>' を読み込めませんでした。
この目的でジェネリック コレクションを使用する方法はありますか?