473,881 Members | 1,500 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to change one element of machine.config into web.config?

Dan
H,

i want to use for one specific application the default membership provider
as defined by default in machine.config, except one element: i want to use
requiresUniqueE mail="false" instead of the default configuration in
machine.config (which is set on "true").

So i did this in the web.config of the application:
<membership defaultProvider ="MyMembershipP rovider">
<providers>
requiresUniqueE mail="true"
/>
</providers>
</membership>

but this generates the error: "The configuration section cannot contain a
CDATA or text element."

if i put
<add name=" ..."
i also have to put: "Type"
and also the connectionstrin g

and then i have to add the section
<connectionStri ngs>
Do i have to copy the entire membership section of the machine.config into
web.config + section <connectionStri ngs>
and change the element "requiresUnique Email", or it can shorter?

Thanks
Dan
Apr 18 '07 #1
4 6489
You have to remove the provider you want to change and then re-add it, as
in:

<membership defaultProvider ="SqlPageConten tMembershipProv ider"
userIsOnlineTim eWindow="15">
<providers>
<remove name="MyMembers hipProvider"/>
<add name="MyMembers hipProvider"
type="DsiGlobal .AspNetControls .SqlMembershipP rovider"
connectionStrin gName="WebConte ntConnectionStr ing"
applicationName ="appName"
enablePasswordR etrieval="false "
enablePasswordR eset="true"
requiresQuestio nAndAnswer="tru e"
requiresUniqueE mail="false"
passwordFormat= "Encrypted"/>
</providers>
</membership>

You can also use <clear /to remove all the Membership Providers, and then
add it back in. Remember that essentially, the providers element represents
a NameValueCollec tion, so you treat it like one.
--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Dan" <da******@nomao l.nlwrote in message
news:eu******** ******@TK2MSFTN GP02.phx.gbl...
H,

i want to use for one specific application the default membership provider
as defined by default in machine.config, except one element: i want to use
requiresUniqueE mail="false" instead of the default configuration in
machine.config (which is set on "true").

So i did this in the web.config of the application:
<membership defaultProvider ="MyMembershipP rovider">
<providers>
requiresUniqueE mail="true"
/>
</providers>
</membership>

but this generates the error: "The configuration section cannot contain a
CDATA or text element."

if i put
<add name=" ..."
i also have to put: "Type"
and also the connectionstrin g

and then i have to add the section
<connectionStri ngs>
Do i have to copy the entire membership section of the machine.config into
web.config + section <connectionStri ngs>
and change the element "requiresUnique Email", or it can shorter?

Thanks
Dan


Apr 18 '07 #2
Dan
Thanks for replying,

so if i understand good, if i want to change only one property of the
default provider (like requirersUnique Email), i have to remove the provider,
then to add it back and redifine all other properties + also define a new
connectionstrin g with <connectionstri ngs></connectionstrin gselement
(because there is no one in web.config).
Is this correct?
If yes, a lot of work for just changing a "true" in "false", don't you think
so?

"Kevin Spencer" <un**********@n othinks.comschr eef in bericht
news:eC******** ******@TK2MSFTN GP04.phx.gbl...
You have to remove the provider you want to change and then re-add it, as
in:

<membership defaultProvider ="SqlPageConten tMembershipProv ider"
userIsOnlineTim eWindow="15">
<providers>
<remove name="MyMembers hipProvider"/>
<add name="MyMembers hipProvider"
type="DsiGlobal .AspNetControls .SqlMembershipP rovider"
connectionStrin gName="WebConte ntConnectionStr ing"
applicationName ="appName"
enablePasswordR etrieval="false "
enablePasswordR eset="true"
requiresQuestio nAndAnswer="tru e"
requiresUniqueE mail="false"
passwordFormat= "Encrypted"/>
</providers>
</membership>

You can also use <clear /to remove all the Membership Providers, and
then add it back in. Remember that essentially, the providers element
represents a NameValueCollec tion, so you treat it like one.
--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Dan" <da******@nomao l.nlwrote in message
news:eu******** ******@TK2MSFTN GP02.phx.gbl...
>H,

i want to use for one specific application the default membership
provider as defined by default in machine.config, except one element: i
want to use requiresUniqueE mail="false" instead of the default
configuratio n in machine.config (which is set on "true").

So i did this in the web.config of the application:
<membership defaultProvider ="MyMembershipP rovider">
<providers>
requiresUniqueE mail="true"
/>
</providers>
</membership>

but this generates the error: "The configuration section cannot contain a
CDATA or text element."

if i put
<add name=" ..."
i also have to put: "Type"
and also the connectionstrin g

and then i have to add the section
<connectionStr ings>
Do i have to copy the entire membership section of the machine.config
into web.config + section <connectionStri ngs>
and change the element "requiresUnique Email", or it can shorter?

Thanks
Dan



Apr 18 '07 #3
so if i understand good, if i want to change only one property of the
default provider (like requirersUnique Email), i have to remove the
provider, then to add it back and redifine all other properties + also
define a new connectionstrin g with <connectionstri ngs></connectionstrin gs>
element (because there is no one in web.config).
Is this correct?
As I said, the configuration section exposes an underlying Collection.
However, there is no interface for changing any of the properties of the
members via the configuration file. But there is a configuration interface
for removing and adding members, so that is what you do. Yes. That's
correct.
If yes, a lot of work for just changing a "true" in "false", don't you
think so?
You've spent more time talking about it than it takes to do it, so, no I
don't think it's a lot of work.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Dan" <da******@nomao l.nlwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Thanks for replying,

so if i understand good, if i want to change only one property of the
default provider (like requirersUnique Email), i have to remove the
provider, then to add it back and redifine all other properties + also
define a new connectionstrin g with <connectionstri ngs></connectionstrin gs>
element (because there is no one in web.config).
Is this correct?
If yes, a lot of work for just changing a "true" in "false", don't you
think so?

"Kevin Spencer" <un**********@n othinks.comschr eef in bericht
news:eC******** ******@TK2MSFTN GP04.phx.gbl...
>You have to remove the provider you want to change and then re-add it, as
in:

<membership defaultProvider ="SqlPageConten tMembershipProv ider"
userIsOnlineTi meWindow="15">
<providers>
<remove name="MyMembers hipProvider"/>
<add name="MyMembers hipProvider"
type="DsiGlobal .AspNetControls .SqlMembershipP rovider"
connectionStrin gName="WebConte ntConnectionStr ing"
applicationName ="appName"
enablePasswordR etrieval="false "
enablePasswordR eset="true"
requiresQuestio nAndAnswer="tru e"
requiresUniqueE mail="false"
passwordFormat= "Encrypted"/>
</providers>
</membership>

You can also use <clear /to remove all the Membership Providers, and
then add it back in. Remember that essentially, the providers element
represents a NameValueCollec tion, so you treat it like one.
--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Dan" <da******@nomao l.nlwrote in message
news:eu******* *******@TK2MSFT NGP02.phx.gbl.. .
>>H,

i want to use for one specific application the default membership
provider as defined by default in machine.config, except one element: i
want to use requiresUniqueE mail="false" instead of the default
configurati on in machine.config (which is set on "true").

So i did this in the web.config of the application:
<membership defaultProvider ="MyMembershipP rovider">
<providers>
requiresUniqueE mail="true"
/>
</providers>
</membership>

but this generates the error: "The configuration section cannot contain
a CDATA or text element."

if i put
<add name=" ..."
i also have to put: "Type"
and also the connectionstrin g

and then i have to add the section
<connectionSt rings>
Do i have to copy the entire membership section of the machine.config
into web.config + section <connectionStri ngs>
and change the element "requiresUnique Email", or it can shorter?

Thanks
Dan




Apr 18 '07 #4
Dan
Ok, thanks for your advice ... and time

"Kevin Spencer" <un**********@n othinks.comschr eef in bericht
news:eU******** ******@TK2MSFTN GP04.phx.gbl...
>so if i understand good, if i want to change only one property of the
default provider (like requirersUnique Email), i have to remove the
provider, then to add it back and redifine all other properties + also
define a new connectionstrin g with
<connectionstr ings></connectionstrin gselement (because there is no one
in web.config).
Is this correct?

As I said, the configuration section exposes an underlying Collection.
However, there is no interface for changing any of the properties of the
members via the configuration file. But there is a configuration interface
for removing and adding members, so that is what you do. Yes. That's
correct.
>If yes, a lot of work for just changing a "true" in "false", don't you
think so?

You've spent more time talking about it than it takes to do it, so, no I
don't think it's a lot of work.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Dan" <da******@nomao l.nlwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Thanks for replying,

so if i understand good, if i want to change only one property of the
default provider (like requirersUnique Email), i have to remove the
provider, then to add it back and redifine all other properties + also
define a new connectionstrin g with
<connectionstr ings></connectionstrin gselement (because there is no one
in web.config).
Is this correct?
If yes, a lot of work for just changing a "true" in "false", don't you
think so?

"Kevin Spencer" <un**********@n othinks.comschr eef in bericht
news:eC******* *******@TK2MSFT NGP04.phx.gbl.. .
>>You have to remove the provider you want to change and then re-add it,
as in:

<membership defaultProvider ="SqlPageConten tMembershipProv ider"
userIsOnlineT imeWindow="15">
<providers>
<remove name="MyMembers hipProvider"/>
<add name="MyMembers hipProvider"
type="DsiGlobal .AspNetControls .SqlMembershipP rovider"
connectionStrin gName="WebConte ntConnectionStr ing"
applicationName ="appName"
enablePasswordR etrieval="false "
enablePasswordR eset="true"
requiresQuestio nAndAnswer="tru e"
requiresUniqueE mail="false"
passwordFormat= "Encrypted"/>
</providers>
</membership>

You can also use <clear /to remove all the Membership Providers, and
then add it back in. Remember that essentially, the providers element
represents a NameValueCollec tion, so you treat it like one.
--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Dan" <da******@nomao l.nlwrote in message
news:eu****** ********@TK2MSF TNGP02.phx.gbl. ..
H,

i want to use for one specific application the default membership
provider as defined by default in machine.config, except one element: i
want to use requiresUniqueE mail="false" instead of the default
configuratio n in machine.config (which is set on "true").

So i did this in the web.config of the application:
<membershi p defaultProvider ="MyMembershipP rovider">
<providers>
requiresUniqueE mail="true"
/>
</providers>
</membership>

but this generates the error: "The configuration section cannot contain
a CDATA or text element."

if i put
<add name=" ..."
i also have to put: "Type"
and also the connectionstrin g

and then i have to add the section
<connectionS trings>
Do i have to copy the entire membership section of the machine.config
into web.config + section <connectionStri ngs>
and change the element "requiresUnique Email", or it can shorter?

Thanks
Dan




Apr 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1820
by: Marcin Polewski | last post by:
I am trying to redirect a dependant assembly using the following in my machine.config file <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Lib0" publicKeyToken="e3dc26dade2d75c8" /><codeBase version="1.1.1.1" href="file:///C:/Save/Code/C#/Test Folder/VersionRedirectTest/Lib0/bin/Release/Lib0.dll" /></dependentAssembly></assemblyBinding Lib0 is strong named and the assembly version is set...
5
2943
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a different name specific to my application. I know the name of this is set in machine.config. I was hoping it would be possible to change this in web.config. I got it to work, kind of. Good news is I can change the name in my web.config file. Bad news is that trace.axd still works meaning I can...
2
2399
by: Joel D Kraft | last post by:
I'm using controls in my ASP.NET application from a couple of vendors. Between the vendors and thier versioning, I've set up subfolders under my bin directory: bin bin\Infragistics\v5.2 bin\RadControls\v5.3 Under 2.0b2, I had the following setup in my web.config: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
3
8717
by: Robert | last post by:
I have a number of web projects converted from 1.1 to 2.0 in VS2005. I am methodically seeing the error below: The element 'compilation' has invalid child element 'compilers'. List of possible elements expected: 'assemblies, buildProviders, codeSubDirectories, expressionBuilders'. Here's what the web config looks like. The error doesn't cause any issues and according to the MSDN documentation this is valid. So why is VS2005
3
1210
by: PawelR | last post by:
Hello group, In my applicationa I use web.config parameter for sqlConnectionString etc. How change parameter in web.config via website - one of site in my application - as opiton/seting site. Thx. PawelR.
4
2220
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load time takes, sometimes, three or four of minutes in a medium-level machine (a PIII 1.5 Ghz), when the binary contents are changed, or if the time of last modification of the web.config file is changed. An application that runs in "stand-alone" mode...
11
3468
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand the usage of Machine config. I read in the article that you can also write your database connection string in Machine Config
3
4434
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
0
1059
by: Michael Bray | last post by:
I've found a change in SP1 that doesn't seem to make sense to me, but seems to be there nonetheless. The situation is this... I have an application that stores it's configuration in a file in the Application directory. If the application is called "MyApp.exe", the configuration file is "MyApp.config". Note that this is not the same as "MyApp.exe.config" which is where the .NET-based XML-format configuration normally goes. This...
0
9929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11102
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10818
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10403
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9555
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7112
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4597
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.