<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Discussions by CareBear</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Niners/CareBear/Discussions/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Discussions by CareBear</title>
		<link>http://channel9.msdn.com/Niners/CareBear/Discussions</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Niners/CareBear/Discussions</link>
	<language>en</language>
	<pubDate>Thu, 20 Jun 2013 00:54:52 GMT</pubDate>
	<lastBuildDate>Thu, 20 Jun 2013 00:54:52 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>0</c9:totalResults>
	<c9:pageCount>0</c9:pageCount>
	<c9:pageSize>0</c9:pageSize>
	<item>
		<title>Coffeehouse - How to enter the Code&#39;n my way to PDC Contest</title>
		<description><![CDATA[<p><strong>SSK Source Update</strong><br>
<br>
Use of deprecated classes in&nbsp;SSK.Server.SendMail class. It's using <strike>System.Web.Mail</strike> namespace classes for sending e-mail, while .NET Framework 2.0 has a new namespace for sending e-mails, namely
<strong>System.Net.Mail</strong>.<br>
<br>
Below is an updated version of the &quot;sendmail.cs&quot; file inside the App_Code folder of the sharewareservice part of SSK.<br>
<br>
This update makes it possible to send e-mail from your localhost without IIS&nbsp;SMTP Service installed.<br>
<br>
<p>using System;<br>
using System.Net.Mail;<br>
using System.Configuration;<br>
using System.Data.SqlClient;<br>
using Microsoft.ApplicationBlocks.Data;</p>
<p>namespace SSK.Server<br>
{<br>
/// &lt;summary&gt;<br>
/// Summary description for SendMail.<br>
/// &lt;/summary&gt;<br>
public class SendMail<br>
{<br>
<br>
private MailMessage _message;<br>
<br>
//constructor<br>
public SendMail() { }<br>
<br>
/// &lt;summary&gt;<br>
/// Send an email to the user with their license information<br>
/// &lt;/summary&gt;<br>
/// &lt;param name=&quot;invoice&quot;&gt;The invoice for the transaction&lt;/param&gt;<br>
/// &lt;param name=&quot;authLicense&quot;&gt;The product key generated by the system.&lt;/param&gt;<br>
public void SendMailApprovedLicense(string invoice, string authLicense)<br>
{<br>
SqlDataReader reader = SqlHelper.ExecuteReader(ConfigurationSettings.AppSettings[&quot;SQLConnectionString&quot;], &quot;SendMailApprovedLicense&quot;, invoice);<br>
<br>
if (reader.HasRows)<br>
{<br>
reader.Read();<br>
string body;<br>
string to = (string)reader[&quot;Email&quot;];<br>
string subject = &quot;Your product has been activated.&quot;;<br>
body = &quot;&lt;table width=\&quot;500\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;<br>
body &#43;= &quot;Dear &quot; &#43; (string)reader[&quot;Firstname&quot;] &#43; &quot;,&lt;br&gt;&lt;br&gt;&lt;br&gt;&quot;;<br>
body &#43;= &quot;Thank you for activating your product. Please make a note of the following information &quot;;<br>
body &#43;= &quot;for future reference:&lt;br&gt;&lt;br&gt;&quot;;<br>
body &#43;= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;<br>
body &#43;= &quot;&lt;tr&gt;&lt;td width=\&quot;500\&quot;&gt;&quot;;<br>
body &#43;= &quot;Product Key: &quot; &#43; invoice &#43; &quot; &quot;;<br>
body &#43;= &quot;&lt;br&gt;&lt;br&gt;&quot;; <br>
body &#43;= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;<br>
body &#43;= &quot;&lt;tr&gt;&lt;td&gt;&quot;;<br>
body &#43;= &quot;Thank you,&lt;Br&gt;&quot;;<br>
body &#43;= ConfigurationSettings.AppSettings[&quot;FromName&quot;] &#43; &quot;&lt;br&gt;&lt;br&gt;&quot;;<br>
body &#43;= ConfigurationSettings.AppSettings[&quot;FromEmail&quot;];<br>
body &#43;= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;<br>
body &#43;= &quot;&lt;/table&gt;&quot;;<br>
<br>
try<br>
{<br>
Send(subject, body, to);<br>
}<br>
catch<br>
{<br>
//fail gracefully if the mail doesn't send<br>
}<br>
}<br>
}<br>
<br>
public void Send(string subject, string body, string to)<br>
{<br>
_message = new MailMessage();<br>
_message.IsBodyHtml = true;<br>
_message.From = new MailAddress(ConfigurationSettings.AppSettings[&quot;FromEmail&quot;]);<br>
_message.Subject = subject;<br>
_message.Body = body;<br>
_message.To.Add(to);<br>
<br>
SmtpClient smtp = new SmtpClient(ConfigurationSettings.AppSettings[&quot;SMTP&quot;]);<br>
smtp.Send(_message);<br>
}<br>
}<br>
}</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/818237f84fd245e89b709dec0050c7fb#818237f84fd245e89b709dec0050c7fb</link>
		<pubDate>Tue, 09 Aug 2005 22:36:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/818237f84fd245e89b709dec0050c7fb#818237f84fd245e89b709dec0050c7fb</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>70</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - How to enter the Code&#39;n my way to PDC Contest</title>
		<description><![CDATA[<p>Exception using Shareware Starter Kit with Click-Once deployment:<br>
<br>
I keep getting this error message the first time my application is ran using Click-Once deployment.<br>
<br>
Subsequent launches of the same application does not fail:<br>
<br>
</p>
System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style,
 NumberFormatInfo info) at System.Version..ctor(String version) at System.Configuration.LocalFileSettingsProvider.CreateVersion(String name) at System.Configuration.LocalFileSettingsProvider.GetPreviousConfigFileName(Boolean isRoaming) at System.Configuration.LocalFileSettingsProvider.Upgrade(SettingsContext
 context, SettingsPropertyCollection properties, Boolean isRoaming) at System.Configuration.LocalFileSettingsProvider.Upgrade(SettingsContext context, SettingsPropertyCollection properties) at System.Configuration.ApplicationSettingsBase.Upgrade() at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String
 propertyName) at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName) at Client.Properties.Settings.get_LoggingEnabled() at SSK.SSKClient.UIHelper.Logger.Log(String s) at SSK.SSKClient.ClientStorage.DataStore..ctor(Form form) at MyApp.Program.Main()<br>
<br>
<br>
Hope I can fix this before the submission deadline or else the application will always fail the first run <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-6.gif' alt='Sad' />]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/26dff74dc62547dfa7239dec0050c748#26dff74dc62547dfa7239dec0050c748</link>
		<pubDate>Sat, 06 Aug 2005 16:26:33 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/26dff74dc62547dfa7239dec0050c748#26dff74dc62547dfa7239dec0050c748</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>70</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - How to enter the Code&#39;n my way to PDC Contest</title>
		<description><![CDATA[<p>Customization of the Shareware Kit:<br>
<br>
To what level can we customize the Shareware Kit itself. Mostly interrested in the graphical changes.<br>
<br>
It looks a bit weird that the splashscreen says &quot;Shareware Starter Kit&quot; and then my application loads which have a very different UI.<br>
<br>
Are all changes allowed except changes to the Web Service/Licensing mechanism?<br>
<br>
<br>
Regards,<br>
Sondre<br>
</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/01bf54ead74d4437ba949dec0050c38e#01bf54ead74d4437ba949dec0050c38e</link>
		<pubDate>Tue, 14 Jun 2005 21:08:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/01bf54ead74d4437ba949dec0050c38e#01bf54ead74d4437ba949dec0050c38e</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>70</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - How to enter the Code&#39;n my way to PDC Contest</title>
		<description><![CDATA[<p>What kind of source code licenses are approved in the submissions? There is a description in the rules but it's a bit vague for me to understand completely.<br>
<br>
Is the <a href="http://opensource.org/licenses/cpl.php">CPL</a> (Common Public License) a good alternative? It is the same as WiX (Windows Installer XML Toolkit) and I've been using it for previous projects.<br>
<br>
Regards,<br>
Sondre</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/45ec750f9e1f4034aaa89dec0050c364#45ec750f9e1f4034aaa89dec0050c364</link>
		<pubDate>Tue, 14 Jun 2005 20:35:47 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/73109-How-to-enter-the-Coden-my-way-to-PDC-Contest/45ec750f9e1f4034aaa89dec0050c364#45ec750f9e1f4034aaa89dec0050c364</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>70</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Wallop?</title>
		<description><![CDATA[<p>I've put myself on the list, how long will it takes before, if I ever do, get invited? <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br>
<br>
I blogged once about wallops asking for anyone to invite me .. let's hope I have better luck here!<br>
<br>
(Sondre Bjellås pixelworld@hotmail.com)</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/31085-Wallop/0e72026564064707a92b9dea0137e63e#0e72026564064707a92b9dea0137e63e</link>
		<pubDate>Thu, 16 Dec 2004 18:31:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/31085-Wallop/0e72026564064707a92b9dea0137e63e#0e72026564064707a92b9dea0137e63e</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>42</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Exception using CreateProcessWithLogonW from ASP.NET</title>
		<description><![CDATA[<p>I should have mentioned that in the same project I'm also using Word interop where I'm using the Impersonate() method. This works fine cause I'm creating instances of WordApplication and just doing operations directly on the object. This makes it run as
 the impersonated user.<br>
<br>
This does however, not apply when you execute an external process using Process.Start().<br>
<br>
I use the win32 api function LogonUser() in advapi32.dll to get the user Token, which I then use in the Impersonate(hToken) method.<br>
<br>
So .. still not working <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-8.gif' alt='Expressionless' /><br>
<br>
<br>
Thanks anyway,<br>
Sondre</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/905bfa263b944e4e839e9dea011055ad#905bfa263b944e4e839e9dea011055ad</link>
		<pubDate>Tue, 18 May 2004 07:29:44 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/905bfa263b944e4e839e9dea011055ad#905bfa263b944e4e839e9dea011055ad</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>9</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Exception using CreateProcessWithLogonW from ASP.NET</title>
		<description><![CDATA[<p>Thanks for the response, but I doubt it helps me. I'm running this code from within a Web Service which is being called by another website elsewhere, so there is no authentication on IIS level.<br>
<br>
Cheers,<br>
Sondre</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/e9ad3643ca0b4ac28b039dea01105558#e9ad3643ca0b4ac28b039dea01105558</link>
		<pubDate>Sat, 15 May 2004 09:43:44 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/e9ad3643ca0b4ac28b039dea01105558#e9ad3643ca0b4ac28b039dea01105558</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>9</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Exception using CreateProcessWithLogonW from ASP.NET</title>
		<description><![CDATA[<p>I've just recently posted the same question on the ASP.NET forums, been read by many people but no answers so I thought I'd give Channel9 a go:<br>
<br>
Hope any of this is understandable!<br>
<br>
I&nbsp;have a .exe I need to execute from a web project. The application needs license registration which is somehow related to the users profile.&nbsp;I'm not sure if the license details is stored in Windows registry or not, but it is at least related to the profile
 somehow. <br>
<br>
I have wrapped the win32 function CreateProcessWithLogonW in C# and I've tried to call it using LOGON_WITH_PROFILE. Running this function from a Windows Forms application works fine, but running from ASP.NET displays a dialog:
<br>
<br>
--------------------------- <br>
test.exe - Application Error <br>
--------------------------- <br>
The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
<br>
--------------------------- <br>
OK <br>
--------------------------- <br>
<br>
I have recently moved this solution from an Windows 2000 Server to a Windows 2003 Server, and I was previously using System.Diagnostics.Process.Start() which ran the .exe using ASPNET account. What I did on this configuration, was to manually set password for
 ASPNET account, change the Local Machine Policy to allow ASPNET to logon, then filled out the license details for the application. This worked fine, but on IIS6.0 the web application runs using NETWORK SERVICE by default.
<br>
<br>
To get around this, I tried to change the application pool to run as the dedicated user I created. This seemed to work, but it turns out the application runs in &quot;DEMO&quot; mode, aka. it doesn't load the PROFILE of the user when the web application runs in a pool
 with a specific user. <br>
<br>
<br>
So what I need, is to&nbsp;run an .exe using a certain Windows profile from a web application.
<br>
<br>
<br>
<br>
I'm open for suggestions and appriciate any help, <br>
Sondre</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/6653#6653</link>
		<pubDate>Thu, 13 May 2004 21:47:05 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/6653-Exception-using-CreateProcessWithLogonW-from-ASPNET/6653#6653</guid>
		<dc:creator>CareBear</dc:creator>
		<slash:comments>9</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CareBear/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>