<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'ConfigurationElementCollection'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=ConfigurationElementCollection&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'ConfigurationElementCollection'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>how to convert linq result to ConfigurationElementCollection</title><link>http://forums.asp.net/thread/3383588.aspx</link><pubDate>Wed, 02 Sep 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3383588</guid><dc:creator>donkaiser</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have a custom configuration section in my web.config.&lt;/p&gt;&lt;p&gt;I retrieve successfully the collection. But i want to manipulate the collection with linq.&lt;/p&gt;&lt;p&gt;how can i convert the result form linq back to a configurationelementcollection?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks,&lt;br /&gt;&lt;/p&gt;</description></item><item><title>File Access Permission Problem</title><link>http://forums.asp.net/thread/3104115.aspx</link><pubDate>Mon, 20 Apr 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3104115</guid><dc:creator>ervipingupta</dc:creator><description>&lt;p&gt;&amp;nbsp;Hello Friends&lt;img src="http://forums.asp.net/emoticons/emotion-9.gif" alt="Crying" /&gt;,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; i am making uploading interface and when i upload the file i got the error which is mention below .can anyone know about this problem .&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Access to the path &amp;#39;D:\tempzip\Book1.zip&amp;#39; is denied.
         body {font-family:&amp;quot;Verdana&amp;quot;;font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:&amp;quot;Verdana&amp;quot;;font-weight:normal;color:black;margin-top: -5px}
         b {font-family:&amp;quot;Verdana&amp;quot;;font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:&amp;quot;Verdana&amp;quot;;font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:&amp;quot;Verdana&amp;quot;;font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:&amp;quot;Lucida Console&amp;quot;;font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        &lt;span&gt;&lt;h2&gt;&lt;i&gt;Access to the path &amp;#39;D:\tempzip\Book1.zip&amp;#39; is denied.&lt;/i&gt; 
&lt;/h2&gt;&lt;/span&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;b&gt;Description: 
&lt;/b&gt;An unhandled exception occurred during the execution of the current web 
request. Please review the stack trace for more information about the error and 
where it originated in the code. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception Details: 
&lt;/b&gt;System.UnauthorizedAccessException: Access to the path 
&amp;#39;D:\tempzip\Book1.zip&amp;#39; is denied. &lt;br /&gt;&lt;br /&gt;ASP.NET is not authorized to access 
the requested resource. Consider granting access rights to the resource to the 
ASP.NET request identity. ASP.NET has a base process identity (typically 
{MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the 
application is not impersonating. If the application is impersonating via 
&amp;lt;identity impersonate=&amp;quot;true&amp;quot;/&amp;gt;, the identity will be the anonymous user 
(typically IUSR_MACHINENAME) or the authenticated request user. &lt;br /&gt;&lt;br /&gt;To grant 
ASP.NET access to a file, right-click the file in Explorer, choose &amp;quot;Properties&amp;quot; 
and select the Security tab. Click &amp;quot;Add&amp;quot; to add the appropriate user or group. 
Highlight the ASP.NET account, and check the boxes for the desired 
access.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;
&lt;table bgcolor="#ffffcc"&gt;

&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;Line 52:         {
Line 53:         Directory.CreateDirectory(kl);
&lt;font color="red"&gt;Line 54:         FileUpload1.PostedFile.SaveAs(kl);
&lt;/font&gt;Line 55:         tp = kl;                
Line 56:         } &lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>How to set default values for custom configuration collections</title><link>http://forums.asp.net/thread/2329442.aspx</link><pubDate>Wed, 30 Apr 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2329442</guid><dc:creator>ShadowCharmer</dc:creator><description>&lt;p&gt;I&amp;#39;ve been working on a custom configuration section for my .NET web application, and I&amp;#39;ve almost got it working but there&amp;#39;s one thing that I still haven&amp;#39;t cracked.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to model my web.config file so that it looks like this:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;configSections&lt;/span&gt;&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;section&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Hydrogen&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Hydrogen.Configuration.RootConfig, Hydrogen&amp;quot;&lt;/span&gt; /&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;configSections&lt;/span&gt;&amp;gt;

&amp;lt;&lt;span class="tag"&gt;Hydrogen&lt;/span&gt;&lt;span class="attr"&gt;	siteName=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Test Application...&amp;quot;&lt;/span&gt;
&lt;span class="attr"&gt;		showDebug=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;
&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;languages&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;en&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; culture=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;en-GB&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;cy&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; culture=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;cy-GB&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;en-us&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; culture=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;en-US&amp;quot;&lt;/span&gt; /&amp;gt;
	&amp;lt;/&lt;span class="tag"&gt;languages&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;Hydrogen&lt;/span&gt;&amp;gt;
&lt;/pre&gt;
&lt;p&gt;However, I&amp;#39;d like the &amp;lt;languages&amp;gt; section to be optional, and to programmatically provide a default list of languages should none be provided in the config file.&amp;nbsp; Setting defaults for simple types was straightforward, as I have done for both the &amp;#39;siteName&amp;#39; and &amp;#39;showDebug&amp;#39; properties below, but how do you go about providing defaults for a collection element?&lt;/p&gt;
&lt;p&gt;The code I have so far is below.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RootConfig.cs&lt;/strong&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;public class&lt;/span&gt; RootConfig : ConfigurationSection
{
	[ConfigurationProperty(&lt;span class="st"&gt;&amp;quot;siteName&amp;quot;&lt;/span&gt;, DefaultValue=&lt;span class="st"&gt;&amp;quot;unnamed site&amp;quot;&lt;/span&gt;, IsRequired=&lt;span class="kwd"&gt;true&lt;/span&gt;)]
	&lt;span class="kwd"&gt;public string&lt;/span&gt; SiteName
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt; { &lt;span class="kwd"&gt;return this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;siteName&amp;quot;&lt;/span&gt;] &lt;span class="kwd"&gt;as string&lt;/span&gt;; }
	}

	[ConfigurationProperty(&lt;span class="st"&gt;&amp;quot;showDebug&amp;quot;&lt;/span&gt;, DefaultValue=&lt;span class="kwd"&gt;false&lt;/span&gt;)]
	&lt;span class="kwd"&gt;public bool&lt;/span&gt; ShowDebug
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt;
		{
			&lt;span class="kwd"&gt;bool&lt;/span&gt; result;
			&lt;span class="kwd"&gt;if&lt;/span&gt; (! &lt;span class="kwd"&gt;bool&lt;/span&gt;.TryParse(&lt;span class="kwd"&gt;this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;showDebug&amp;quot;&lt;/span&gt;].ToString(), &lt;span class="kwd"&gt;out&lt;/span&gt; result))
				result = &lt;span class="kwd"&gt;false&lt;/span&gt;;

			&lt;span class="kwd"&gt;return&lt;/span&gt; result;			
		}
	}

	[ConfigurationProperty(&lt;span class="st"&gt;&amp;quot;languages&amp;quot;&lt;/span&gt;, IsRequired = &lt;span class="kwd"&gt;true&lt;/span&gt;)]
	&lt;span class="kwd"&gt;public&lt;/span&gt; LanguageCollection Languages
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt; { &lt;span class="kwd"&gt;return this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;languages&amp;quot;&lt;/span&gt;] &lt;span class="kwd"&gt;as&lt;/span&gt; LanguageCollection; }
	}
}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LanguageCollection.cs&lt;/strong&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;public class&lt;/span&gt; LanguageCollection : ConfigurationElementCollection
{
	&lt;span class="kwd"&gt;public&lt;/span&gt; LanguageElement &lt;span class="kwd"&gt;this&lt;/span&gt;[&lt;span class="kwd"&gt;int&lt;/span&gt; index]
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt; { &lt;span class="kwd"&gt;return base&lt;/span&gt;.BaseGet(index) &lt;span class="kwd"&gt;as&lt;/span&gt; LanguageElement; }
		&lt;span class="kwd"&gt;set&lt;/span&gt;
		{
			&lt;span class="kwd"&gt;if&lt;/span&gt; (&lt;span class="kwd"&gt;base&lt;/span&gt;.BaseGet(index) != &lt;span class="kwd"&gt;null&lt;/span&gt;)
				&lt;span class="kwd"&gt;base&lt;/span&gt;.BaseRemoveAt(index);

			&lt;span class="kwd"&gt;this&lt;/span&gt;.BaseAdd(index, &lt;span class="kwd"&gt;value&lt;/span&gt;);
		}
	}

	&lt;span class="kwd"&gt;protected override&lt;/span&gt; ConfigurationElement CreateNewElement()
	{
		&lt;span class="kwd"&gt;return new&lt;/span&gt; LanguageElement();
	}

	&lt;span class="kwd"&gt;protected override object&lt;/span&gt; GetElementKey(ConfigurationElement element)
	{
		&lt;span class="kwd"&gt;return&lt;/span&gt; ((LanguageElement)element).Id;
	}
}
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LanguageElement.cs&lt;/strong&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;public class&lt;/span&gt; LanguageElement : ConfigurationElement
{
	[ConfigurationProperty(&lt;span class="st"&gt;&amp;quot;id&amp;quot;&lt;/span&gt;, IsRequired = &lt;span class="kwd"&gt;true&lt;/span&gt;, IsKey = &lt;span class="kwd"&gt;true&lt;/span&gt;)]
	&lt;span class="kwd"&gt;public string&lt;/span&gt; Id
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt; { &lt;span class="kwd"&gt;return this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;id&amp;quot;&lt;/span&gt;] &lt;span class="kwd"&gt;as string&lt;/span&gt;; }
		&lt;span class="kwd"&gt;set&lt;/span&gt; { &lt;span class="kwd"&gt;this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;id&amp;quot;&lt;/span&gt;] = &lt;span class="kwd"&gt;value&lt;/span&gt;; }
	}

	[ConfigurationProperty(&lt;span class="st"&gt;&amp;quot;culture&amp;quot;&lt;/span&gt;, IsRequired = &lt;span class="kwd"&gt;true&lt;/span&gt;)]
	&lt;span class="kwd"&gt;public string&lt;/span&gt; Culture
	{
		&lt;span class="kwd"&gt;get&lt;/span&gt; { &lt;span class="kwd"&gt;return this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;culture&amp;quot;&lt;/span&gt;] &lt;span class="kwd"&gt;as string&lt;/span&gt;; }
		&lt;span class="kwd"&gt;set&lt;/span&gt; { &lt;span class="kwd"&gt;this&lt;/span&gt;[&lt;span class="st"&gt;&amp;quot;culture&amp;quot;&lt;/span&gt;] = &lt;span class="kwd"&gt;value&lt;/span&gt;; }
	}
}
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any suggestions, anyone?&lt;/p&gt;
&lt;p&gt;Many Thanks,&lt;br /&gt;ShadowCharmer&lt;/p&gt;</description></item><item><title>declare connection string in app.config in WPF</title><link>http://forums.asp.net/thread/1696691.aspx</link><pubDate>Sat, 05 May 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1696691</guid><dc:creator>kpxkpx</dc:creator><description>&lt;p&gt;Dear all,&lt;/p&gt;
&lt;p&gt;Here is my question. I am trying to build up a object data source that will to be bound to xaml object in WPF. After I&amp;nbsp;declare&amp;nbsp;a connectionString in app.config of object data source project, the connectionString can not be found and show the error below:&lt;/p&gt;
&lt;p&gt;"Object reference not set to an instance of an object."&lt;/p&gt;
&lt;p&gt;app.config file:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;connectionStrings&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="Connection" connectionString="Data Source=***;Initial Catalog=***;User ID=***;Password=***" providerName="System.Data.SqlClient"/&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/connectionStrings&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;cs code:&lt;/p&gt;
&lt;p&gt;string _connectionString =ConfigurationManager.ConnectionStrings["Connection"].ConnectionString;&lt;/p&gt;
&lt;p&gt;Can any one tell me what I did wrong? Many thanks.&lt;/p&gt;
&lt;p&gt;______________________________________________________________________________________&lt;/p&gt;
&lt;p&gt;After that, I though that it may be work if use connection string in code, but I got new error as below:&lt;/p&gt;
&lt;p&gt;"Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."&lt;/p&gt;
&lt;p&gt;CS:&lt;/p&gt;
&lt;p&gt;string _connectionString="Data Source=***;Initial Catalog=***;User ID=***;Password=***" ;&lt;/p&gt;
&lt;p&gt;SqlClientPermission permission = new SqlClientPermission(PermissionState.None);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; permission.Add(_connectionString, "", KeyRestrictionBehavior.AllowOnly);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; permission.PermitOnly();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string sqlCmd = "select * from OBJ_WORK_ITEMS where ITEM_ID=38";&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlConnection conn = new SqlConnection(_connectionString);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlDataAdapter da = new SqlDataAdapter(sqlCmd, conn);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet ds = new DataSet();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.Open();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; da.Fill(ds, "OBJ_WORK_ITEMS");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ee)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception("Something wrong in da.fill()" + ee);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can see I tried to modify SqlClientPermission to make it work, but no luck. Please help me!&lt;/p&gt;</description></item><item><title>Supporting configSource attribute on custom ConfigurationSectionGroup</title><link>http://forums.asp.net/thread/1683192.aspx</link><pubDate>Thu, 26 Apr 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1683192</guid><dc:creator>sandor</dc:creator><description>&lt;p&gt;I would like to support the &lt;em&gt;configSource&lt;/em&gt; attribute on my custom &lt;em&gt;ConfigurationSectionGroup&lt;/em&gt; in order to allow&amp;nbsp;for storage of the group contents in an external .config file.&lt;em&gt;&amp;nbsp;&lt;/em&gt;Unfortunately, I have no clue how to do this in a proper manner, other than writing custom code that loads and processes the external file. The latter is probably&amp;nbsp;not a good idea because the logic is allegedly&amp;nbsp;available in the .NET framework (as some of the built-in section groups, like &amp;lt;profiles&amp;gt;&amp;nbsp;support it), though I don't know how to make use of it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>web.config key in javascript</title><link>http://forums.asp.net/thread/1678722.aspx</link><pubDate>Mon, 23 Apr 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1678722</guid><dc:creator>mayuresh_s</dc:creator><description>&lt;p&gt;How can i access a web.config key in javascript. There is complex javascript function already written in a .js file and I need to add a value associated with the key - AUTHENTICATION_FLAG in a javascript function. I am coding this in C#.&amp;nbsp; --- &amp;gt; ConfigurationManager.AppSettings["AUTHENTICATION_FLAG"]&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thank you in advance&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Adding items in runtime to a collection in app.config</title><link>http://forums.asp.net/thread/1660334.aspx</link><pubDate>Wed, 11 Apr 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1660334</guid><dc:creator>DamiL1</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;font face=Arial size=2&gt;I've read a wonderfull article about collections in configuration files for .NET 2.0 in &lt;a title=http://www.123aspx.com/redir.aspx?res=35782 href="http://www.123aspx.com/redir.aspx?res=35782"&gt;http://www.123aspx.com/redir.aspx?res=35782&lt;/a&gt;, and I didn't see any way to add items at run-time to the collection...&lt;/font&gt;&lt;/p&gt;
&lt;div align=left&gt;&lt;span class=132104214-10042007&gt;&lt;font face=Arial size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align=left&gt;&lt;span class=132104214-10042007&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face=Arial size=2&gt;Is there any way I can do that?&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=left&gt;&lt;span class=132104214-10042007&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align=left&gt;&lt;span class=132104214-10042007&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align=left&gt;&lt;span class=132104214-10042007&gt;&lt;font face=Arial size=2&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;</description></item><item><title>ASP.NET 2.0 Hosting (Root and Sub Direct with Different Web.Config in Same Domain)</title><link>http://forums.asp.net/thread/1600600.aspx</link><pubDate>Thu, 01 Mar 2007 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1600600</guid><dc:creator>khiteam</dc:creator><description>&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;Hi,&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;I want to config Production Server Database and Staging Server Database Connection String in Same Application depends on Location path.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0in;"&gt;
&lt;li class=MsoNormal style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;font face=Verdana size=3&gt;Example. &lt;/font&gt;&lt;a href="http://www.webapp.com/"&gt;&lt;font face=Verdana size=3&gt;www.webapp.com&lt;/font&gt;&lt;/a&gt;&lt;font face=Verdana size=3&gt; (Root Directory)&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;font face=Verdana size=3&gt;When I browse this site the production DataBase Server Connection String should be called through Web.Config of root directory.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0in;"&gt;
&lt;li class=MsoNormal style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;font face=Verdana size=3&gt;Example. &lt;/font&gt;&lt;a href="http://www.webapp.com/LiveBeta%20(here%20'LiveBeta'%20Sub"&gt;&lt;font face=Verdana size=3&gt;www.webapp.com/LiveBeta &lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font face=Verdana&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(here ‘LiveBeta’ is a Sub Directory)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;When I browse this site the Staging (Testing) Database Server Connection String should be called through Web.Config of sub directory.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;Both the root and sub directory are same application.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;How can I maintain both the application in one server with different Web.Config files depending on the directories?&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;I tried it out but received the error as connection string conflict.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;How can toggle this issue in ASP.NET 2.0 with 2 Database in same server?&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;It's very urgent one.&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;font face=Verdana size=3&gt;Thank you,&lt;/font&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face=Verdana size=3&gt;Bhavani&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;</description></item><item><title>How to add AppSettings key / value pair's dynamically in web Config file</title><link>http://forums.asp.net/thread/1558588.aspx</link><pubDate>Thu, 01 Feb 2007 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1558588</guid><dc:creator>BalaKrishnan</dc:creator><description>&lt;p&gt;&lt;img src="http://forums.asp.net/emoticons/emotion-55.gif" alt="Idea" /&gt;&amp;nbsp;&amp;nbsp; Is it possible to add Dynamically AppSetting Key / value pair's in webconfig file? &lt;/p&gt;&lt;p&gt;if yes, &lt;/p&gt;&lt;p&gt;How? anybody can explain! through C# Coding&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;p&gt;Balakrishnan&amp;nbsp;&lt;/p&gt;</description></item><item><title>doubts in naming assemblies in ASP.NET 2.0</title><link>http://forums.asp.net/thread/1500224.aspx</link><pubDate>Mon, 18 Dec 2006 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1500224</guid><dc:creator>venkateshnal</dc:creator><description>&lt;div&gt;&lt;font face="Arial" size="2"&gt;Sir,&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i have doubt in forming assemblies in ASP.NET 
2.0,&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;there was a automatic generation of assembly name 
by default..like "App_Web_gtmvzqgo.dll" and "App_Code.dll"&amp;nbsp;with in the bin 
directory,&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;and "App_Code.dll" this was OK now&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;the doubt was actually how can i create my&amp;nbsp;own 
assembly names in ASP.NET 2.0&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;like i need project name should be the assembly 
name..&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;what can i do for this?&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;thanks&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;regards&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;venkat&lt;/font&gt;&lt;/div&gt;</description></item></channel></rss>