<?xml version="1.0" ?><rss version="2.0" xmlns:ec="http://www.eggheadcafe.com"><channel><title>eggheadcafe.com New Messageboard Posts</title><link>http://www.eggheadcafe.com</link><pubDate>Fri, 20 Nov 2009 17:30:00 GMT</pubDate><description>EggHeadCafe - The .NET developer's portal of choice</description><language>1</language><item><title><![CDATA[how to reserve a url with http.sys for system.net.httplistener]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129978/how-to-reserve-a-url-with.aspx]]></link><description><![CDATA[<P>Hello,</P>
<P>I am using system.net.HttpListener on a computer which doesn't have admin privileges.</P>
<P>I've looked and cannot find the specifics on how to reserve a url with http.sys for system.net.httplistener.</P>
<P>Can someone help me in this matter?</P>
<P>-Ravi</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129978/how-to-reserve-a-url-with.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 16:41:31 GMT</pubDate></item><item><title><![CDATA[Secure ClickOnce Applications]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/14/10129976/secure-clickonce-applicat.aspx]]></link><description><![CDATA[I have various applications that I publish with ClickOnce using .NET Framework 2.0. I have an encrypted app.settings file, although when I first install this application the original folder created in C:\Documents and Settings\user\Local Settings\Apps\2.0\etc... is not encrypted until execution for the first time, so there is a app.settings file that is not encrypted upon installation.<br><br><br>How can I encrypt my app.settings in this original installation location.<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/14/10129976/secure-clickonce-applicat.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 16:09:14 GMT</pubDate></item><item><title><![CDATA[SqlHelper.ExecuteDataset,  do I need to open and close the connection explicitly  ???]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/10/10129970/sqlhelperexecutedataset.aspx]]></link><description><![CDATA[<P>When I am using SqlHelper.ExecuteNonquery or SqlHelper.ExecuteDataset,&nbsp; do I need to&nbsp;open and close the connection explicitly&nbsp;&nbsp;???</P>
<P>Thank you</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/10/10129970/sqlhelperexecutedataset.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 14:22:36 GMT</pubDate></item><item><title><![CDATA[IMF- Intelligent messaging filter]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/89/10129969/imf-intelligent-messagin.aspx]]></link><description><![CDATA[<P>Hi All,</P>
<P>How&nbsp;should I&nbsp;identify e-mails blocked by Intelligent Messaging Filter in exchnge 2007. Please let me know.</P>
<P>Thanks</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/89/10129969/imf-intelligent-messagin.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 14:04:39 GMT</pubDate></item><item><title><![CDATA[Integration services doesn't run under Management Studio]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/13/10129968/integration-services-does.aspx]]></link><description><![CDATA[<P>Hi Lads,</P>
<P>I work with SQL2005 on WindowsServer 2003/R2 32bit and I'm also have admin privileges.</P>
<P>I can run Integration Services and design my package.</P>
<P>When I try to run Integration services under Management Studio, It doesn't work because I cannot select sql authentication but only windows authentication. When I try to launch with this limitation, always appears a msg that I cannot run it.</P>
<P>It's strange because in sql server manament I can't see the service.</P>
<P>What do I have to do ?</P>
<P>&nbsp;</P>
<P>Thanks for your Help</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/13/10129968/integration-services-does.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 13:58:19 GMT</pubDate></item><item><title><![CDATA[Client not able to authenticate to server, when CA goes down]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/44/10129967/client-not-able-to-authen.aspx]]></link><description><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Hi,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">We have an application which authenticates using the active directory credential and smartcard certificate. </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">But when the issuer Certificate Authority goes down, we are not able to access the particular application using the Smartcard Certificate issued by the same <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place w:st="on"><st1:City w:st="on">Sub</st1:City> <st1:State w:st="on">CA</st1:State></st1:place>, but we are successfully able to login to the application using the user’s smartcard certificate which are issued by other sub CA </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">What may be the reason?</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">Clients, application server and Sub CAs are in 1 domain</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">The authenticate users are in a group inside Active Directory.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">The Server certificate is issued from one of the Sub CA. </LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">we have one root ca and 2 sub ca.</LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Please help</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Thanks!</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Sam</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/44/10129967/client-not-able-to-authen.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 13:50:47 GMT</pubDate></item><item><title><![CDATA[Conditional Formatting]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/66/10129958/conditional-formatting.aspx]]></link><description><![CDATA[I'm using Excel 2007 and I want to shade values in column AB if they are less than values in column W in their corresponding rows. I can do this with Conditional Formatting of course, but I would have to do this with each individual cell. How can I get around this?<br>Please help!<br>Thanks...<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/66/10129958/conditional-formatting.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 12:29:13 GMT</pubDate></item><item><title><![CDATA[Stragen 401.3 Error]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/51/10129957/stragen-4013-error.aspx]]></link><description><![CDATA[I posted this in the silverlight section earlier but On reflection I think it really belongs here:<br><br>I
have a Silverlight application that needs to access a WCF web service
(hosted in IIS 6.0) located on a different domain, so I create the
ClientAccessPolicy.xml and stick it in the service's web site root.<br><br>What I then get is 401.3 errors when the silverlight application tries to access it.<br><br>Now
here comes the funny bit, having gone over all the NTFS and IIS
permissions I could think of , without success, I discovered that I
could access it if I changed the extension to .svc (but not if I
changed it to .html, .txt, .abc).<br>I could also access it if I moved
it to another web site on the same server, which has as far as I can
see has identical permisioning.<br><br>Is there another source of permisioning, based on file extensions, hidden away somewhere?&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/51/10129957/stragen-4013-error.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 12:15:34 GMT</pubDate></item><item><title><![CDATA[Button does not fire on first click but does on second click]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129953/button-does-not-fire-on-f.aspx]]></link><description><![CDATA[<P>My button control does not fire on 1st time click but works on 2nd click&nbsp; though its doing post back in both scenarios.&nbsp; To add little more insanity to it,&nbsp; this is happening only when I am&nbsp;calling one particular method in my click event , otherwise it works normally, but on double click its working fine. Any ideas&nbsp; whats going on and how this can be handled?</P><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>this is my code for it but I dont think anything is wrong with my code , its framework thats playing some tricks I guess :(</P><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>&lt;</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>asp</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>:</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>Button</FONT></FONT><FONT color=#000000 size=2> </FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>ID</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>="btnEdit"</FONT></FONT><FONT color=#000000 size=2> </FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>runat</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>="server"</FONT></FONT><FONT color=#000000 size=2> </FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>Text</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>="Edit"</FONT></FONT><FONT color=#000000 size=2> </FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>onclick</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>="btnEdit_Click"</FONT></FONT><FONT color=#000000 size=2> </FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>OnClientClick</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>="return confirm('Are you sure you want to edit this message?')"</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>/&gt;</P></FONT></FONT>
<P>protected</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> btnEdit_Click(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EventArgs</FONT></FONT><FONT size=2> e)</P>
<P>{</P>
<P></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>CompanyAlertLogic</FONT></FONT><FONT size=2>.UpdateCompanyAlerts(ddlCompanies.SelectedItem.Text, txtShowAlert.Text);</P>
<P>}</P></FONT>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129953/button-does-not-fire-on-f.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 10:47:55 GMT</pubDate></item><item><title><![CDATA[Adding a group to another Group.]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/32/10129945/adding-a-group-to-another.aspx]]></link><description><![CDATA[<p style="margin-left:0pt;margin-top:0pt;margin-right:0pt;margin-bottom:7.5pt;">Hi everyone,<br/>
<br/>
I'm attempting to add an existing group to another group in AD as shown below. However,
	 I keep an exception when I attempt to do so. <br/>
<br/>
I've been Googling
	 about but I can't seem to find (if any) references to adding groups to other
	 groups. Is this possible with .NET? Any pointers would be greatly appreciated.
	 Thanks.<br/>
<br/>
<br/>
			var groupPathA = &quot;LDAP://CN=&quot; + groupName + &quot;,OU=ou1,DC=*****,DC=******,DC=***&quot;;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var
	 groupA = new DirectoryEntry(groupPathA, username, password, AuthenticationTypes.Secure);<br/>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var
	 grouppathB = &quot;LDAP://CN=item,OU=ou2,OU=ou1,DC=*****,DC=*****,DC=***&quot;;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vargroupB
	 = new DirectoryEntry(groupPathB, username, password, AuthenticationTypes.Secure);<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group.RefreshCache();<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;using
	 (groupA)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 groupA.Invoke(&quot;Add&quot;, new[] { groupB.Path });<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch
	 (Exception ex)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Console.WriteLine(ex.ToString());<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>
&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/32/10129945/adding-a-group-to-another.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 09:15:56 GMT</pubDate></item><item><title><![CDATA[remote database restore problem]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129944/remote-database-restore-p.aspx]]></link><description><![CDATA[I'm using the following code to back-up and restore the database.<br><br>try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string restoreConnStr = ConfigurationManager.ConnectionStrings["DBCon"].ConnectionString.ToString();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string tableName = ListBox1.SelectedValue;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (SqlConnection conn = new SqlConnection(restoreConnStr))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (DataSet dSetBackup = new DataSet())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get the schema of the selected table from the database to restore<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (SqlDataAdapter dAd = new SqlDataAdapter("select * from " + tableName, conn))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Following line will get the schema of the selected table in the dSetBackup DataSet<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dAd.Fill(dSetBackup, tableName);<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get the data for selected table from backed up XML file<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (DataSet dSet = new DataSet())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dSet.ReadXml(Server.MapPath("~/backup/" + tableName + ".xml"));<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Loop through all rows of the selected table and add into dSetBackup DataSet<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (DataRow row in dSet.Tables[0].Rows)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dSetBackup.Tables[0].NewRow();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dSetBackup.Tables[0].Rows.Add(row.ItemArray);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create a command builder to update dSetBackup DataSet<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlCommandBuilder cmd = new SqlCommandBuilder(dAd);<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Following update command will push all added rows of dSetBackup DataSet into the database<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dAd.Update(dSetBackup, tableName); // We are done !!!<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lblMessage.Text = "Restore of table &lt;b&gt;" + tableName + "&lt;/b&gt; successful!";<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lblMessage.Text = ex.ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>backup is working fine but when i click on restore button its give me following error<br><br><br>System.IndexOutOfRangeException: Cannot find table 0. at System.Data.DataTableCollection.get_Item(Int32 index) at DatabaseAdmin.RestoreNow(Object sender, EventArgs e) in e:\Reena\harrison\DatabaseAdmin.aspx.cs:line 181 <br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129944/remote-database-restore-p.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 09:15:36 GMT</pubDate></item><item><title><![CDATA[Interacting with Windows Service]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129940/interacting-with-windows.aspx]]></link><description><![CDATA[I<FONT color=#000000> have a C# Windows Service that performs certant&nbsp;actions on periodic bases. The <FONT color=#0000ff size=2>System.Timers.</FONT><FONT size=2><FONT size=2><FONT color=#0000ff>Timer</FONT> on the separete thread is used perform the actions. Some times those actiones need to be performed on demand. I need a way for&nbsp;console app to&nbsp;instract Windows Service to perform those actions. Thank you in advance</FONT></FONT></FONT>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129940/interacting-with-windows.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 08:32:49 GMT</pubDate></item><item><title><![CDATA[How To bring the form at front, on double click of notifyIcon in system tray]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129938/how-to-bring-the-form-at.aspx]]></link><description><![CDATA[<br>Hi,<br>&nbsp;&nbsp; In .net windows application, I have NofifyIcon, I want that, when&nbsp; I will doubkleClick on this, it should bring the form to front.<br><br>My code snippets are<br><br>&nbsp; private void myAppIcon_MouseDoubleClick(object sender, MouseEventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ShowChatWindowOnNotify == true &amp;&amp; IsWindowMinimized == true)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Show();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.Instance.Show();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WindowState = FormWindowState.Maximized;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShowChatWindowOnNotify = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IsWindowMinimized = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.Activate();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.BringToFront();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.Focus();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Here it's opening the form, but not getting it to the front from the other open windows.<br>can anybody help me in this?<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129938/how-to-bring-the-form-at.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 07:37:21 GMT</pubDate></item><item><title><![CDATA[DrawThemeTextEx on painted Windows form]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129934/drawthemetextex-on-painte.aspx]]></link><description><![CDATA[<span class="Apple-style-span" style="color: rgb(80, 80, 80); font-family: 'Segoe UI', Tahoma, Verdana, Arial, Helvetica; font-size: 13px; "><pre class="FreeTextFull" style="font-family: 'Segoe UI', Tahoma, Verdana, Arial, Helvetica; white-space: pre-wrap; word-wrap: break-word; width: 775px; overflow-x: auto; overflow-y: auto; ">Hi,</pre><pre class="FreeTextFull" style="font-family: 'Segoe UI', Tahoma, Verdana, Arial, Helvetica; white-space: pre-wrap; word-wrap: break-word; width: 775px; overflow-x: auto; overflow-y: auto; "><div>I am using&nbsp;<span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 80, 80); font-family: Arial; font-size: 13px; white-space: pre; ">DrawThemeTextEx to draw text with glow behind on a form that uses the Aero Glass effects of Vista and Win7, and it works perfectly (as per the first picture below). </span></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><br></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; ">However, if I add some color to the glass using LinearGradientBrush, the text is surrounded by a transparent rectangle (as in the second picture).</span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><br></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; ">Is there a way around this?</span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><br></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; ">Works fine with standard blur:</span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><img src="http://lh3.ggpht.com/_0B12UOQNmgU/SwPqI4FcYaI/AAAAAAAAASM/HKFPyZ9uX3o/Aero%20Glass.jpg"></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><br></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; ">Obviously not right when adding color to the glass:</span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><img src="http://lh3.ggpht.com/_0B12UOQNmgU/SwPqI42cAGI/AAAAAAAAASQ/qI4Dk6rIYmc/Aero%20Glass%20Color.jpg"></span></font></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; "><br></span></font></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre;">I can supply the source code for anyone who can take a look.</span></font></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre;"><br></span></font></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 80, 80); font-family: Arial; font-size: 13px; white-space: pre; ">Cheers</span></div><div><font class="Apple-style-span" color="#505050" face="Arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre; ">Rowan</span></font></div></pre></span>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129934/drawthemetextex-on-painte.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 07:17:09 GMT</pubDate></item><item><title><![CDATA[want to create batch file]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/65/10129932/want-to-create-batch-file.aspx]]></link><description><![CDATA[hi to all,<br><br>i would like to create batch file that run when i insert usb pen drive, flash drive.<br>how to create it?<br><br>i dont want to open pen drive autorun file?<br><br>thanx in advance<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/65/10129932/want-to-create-batch-file.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 07:06:07 GMT</pubDate></item><item><title><![CDATA[Cannot access ClientAccessPolicy.xml]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/56/10129925/cannot-access-clientacces.aspx]]></link><description><![CDATA[I'm not sure whether this is more of an IIS question but here goes:<br><br>I have a Silverlight application that needs to access a WCF web service (hosted in IIS 6.0) located on a different domain, so I create the ClientAccessPolicy.xml and stick it in the service's web site root.<br><br>What I then get is 401.3 errors when the silverlight application tries to access it.<br><br>Now here comes the funny bit, having gone over all the NTFS and IIS permissions I could think of , without success, I discovered that I could access it if I changed the extension to .svc (but not if I changed it to .html, .txt, .abc).<br>I could also access it if I moved it to another web site on the same server, which has as far as I can see has identical permisioning.<br><br>Is there another source of permisioning, based on file extensions, hidden away somewhere?<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/56/10129925/cannot-access-clientacces.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 06:05:18 GMT</pubDate></item><item><title><![CDATA[How to Write Stored procedure With function]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/14/10129923/how-to-write-stored-proce.aspx]]></link><description><![CDATA[How to write a function for retrieving data from database.&nbsp; I want to write a stored procedure please help me?<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/14/10129923/how-to-write-stored-proce.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 05:48:55 GMT</pubDate></item><item><title><![CDATA[Automatically_clearing]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/17/10129921/automaticallyclearing.aspx]]></link><description><![CDATA[<P>Hi,</P>
<P>I have a textbox within update panel, Example:</P>
<P>"updatepanel1.ContentTemplate.txtName" - When page gets load, i will type something in this textbox, but after one or two seconds "contents of the textbox get clears automatically", This is happening only when page loads first time.</P>
<P>When it clears text box contenst automatically, if i type some text again it will never clear, Only very first time it is&nbsp;clearing..</P>
<P>many thanks</P>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/17/10129921/automaticallyclearing.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 05:25:00 GMT</pubDate></item><item><title><![CDATA[help me ....]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129920/help-me-.aspx]]></link><description><![CDATA[&nbsp;var cell0 = row.insertCell(0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var element0 = document.createElement("label");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; element0.innerHTML = newRow;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; element0.setAttribute("size", "3");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; element0.setAttribute("name", "lblRownumber" + newRow.toString());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; element0.setAttribute("id", "lblRownumber" + newRow.toString());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cell0.appendChild(element0)<br><br><br><br>not working in both browers only working in one browser<br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129920/help-me-.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 05:24:32 GMT</pubDate></item><item><title><![CDATA[convert doc to gif image]]></title><link><![CDATA[http://www.eggheadcafe.com/community/aspnet/2/10129918/convert-doc-to-gif-image.aspx]]></link><description><![CDATA[Hi,<br><br>I wanted to develop an application which can&nbsp; generate images (GIFs) of microsoft documents(like <br>doc, docx, xls).<br><br>Thanks,<br>Raymond <br>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/aspnet/2/10129918/convert-doc-to-gif-image.aspx" target="_self">read more</a>]]></description><pubDate>Fri, 20 Nov 2009 05:05:10 GMT</pubDate></item></channel></rss>