将配置文件属性存储在XML文件中的问题 [英] problem in storing Profile Properties in XML file

查看:110
本文介绍了将配置文件属性存储在XML文件中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在XML文件中存储配置文件属性,但我面临错误无法加载类型'System.Web.Profile.XmlProfileProvider'。并告诉我这个提供者的名字



在Web.Config



 <  提供商 >  
< / clear >
< add name = XmlProfileProvider ; type = System.Web.Profile.XmlProfileProvider

< span class =code-attribute> applicationName = / fileName = Profiles.xml 文件夹〜/ App_Data // >
< 提供商 >
< properties >

< add 名称 = 代码 allowanonymous = true >
< < span class =code-leadattribute> add name = 名称 allowanonymous = true >
< / properties >



C#代码

 HttpContext.Current。 Profile.SetPropertyValue( 代码  0001); 

解决方案

http://www.webpronews.com/aspnet-xml-membership-provider-2006-11 [ ^ ]



< a href =http://msdn.microsoft.com/en-us/magazine/cc163457.aspx> http://msdn.microsoft.com/en-us/magazine/cc163457.aspx [< a href =http://msdn.microsoft.com/en-us/magazine/cc163457.aspxtarget =_ blanktitle =新窗口> ^ ]



实现ASP.NET XML提供程序 - 第1部分(持久性) [ ^ ]



您可以查看链接..希望它可以帮助您找到解决方案..

I want to store profile properties in XML file but i am facing Error "Could not load type 'System.Web.Profile.XmlProfileProvider'." and tell me the provider name for this

In Web.Config

<providers>
</clear>
<add name="XmlProfileProvider"; type="System.Web.Profile.XmlProfileProvider"

                     applicationName="/" fileName="Profiles.xml" folder"~/App_Data/"/>
<providers>
<properties>
   
   <add name="Code" allowanonymous="true">
   <add name="Name" allowanonymous="true">
</properties>


C# code

HttpContext.Current.Profile.SetPropertyValue("Code","0001");

解决方案

http://www.webpronews.com/aspnet-xml-membership-provider-2006-11[^]

http://msdn.microsoft.com/en-us/magazine/cc163457.aspx[^]

Implementing ASP.NET XML providers - Part 1 (Persistance)[^]

you can check the links..hope it will help you to find the solution..


这篇关于将配置文件属性存储在XML文件中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆