<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.clyxstudios.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">clyx development blog</title><subtitle type="html" /><id>http://www.clyxstudios.com/blogs/development/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.clyxstudios.com/blogs/development/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.clyxstudios.com/blogs/development/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.1">Community Server</generator><updated>2006-05-28T07:07:00Z</updated><entry><title>Managed DataImport Class Library for OneNote</title><link rel="alternate" type="text/html" href="http://www.clyxstudios.com/blogs/development/archive/2006/08/21/Managed-DataImport-Class-Library-for-OneNote.aspx" /><id>http://www.clyxstudios.com/blogs/development/archive/2006/08/21/Managed-DataImport-Class-Library-for-OneNote.aspx</id><published>2006-08-21T22:43:00Z</published><updated>2006-08-21T22:43:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://lange.officeisp.net/DataImport/" target="_blank"&gt;This library&lt;/a&gt; is an easy and fun way to integrate OneNote with .NET apps.&amp;nbsp; We&amp;#39;ve used it for our freeware &lt;a href="http://www.clyxstudios.com/blogs/software/archive/2006/03/21/OmeaPlugins.aspx" target="_blank"&gt;Send to OneNote Omea plugin&lt;/a&gt; and&amp;nbsp;will be using it with a&amp;nbsp;future product.&lt;/p&gt;&lt;p&gt;The library works well and nicely abstracts the complexity of the OneNote API and XML schema.&amp;nbsp; For instance, here&amp;#39;s how you create a OneNote page with the library:&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="F2210F5F-69EB-4d4c-AFF7-B8A050E9CC72:87dc6abb-f362-44c5-a4de-df949c5044a1" style="display:inline;float:none;margin:0px;width:653px;padding:0px;"&gt;&lt;pre&gt;&lt;div&gt;&lt;span style="color:#000000;"&gt;Page page &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Page(sectionPath, bodySubject);
OutlineObject outline &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; OutlineObject();
outline.AddContent(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; HtmlContent(body));
            
&lt;/span&gt;&lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;span style="color:#008000;"&gt; adjust for OneNote 2007 margins&lt;/span&gt;&lt;span style="color:#008000;"&gt;
&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (Application.GetVersion().FileMajorPart &lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;11&lt;/span&gt;&lt;span style="color:#000000;"&gt;)
  outline.Position &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Position(outline.Position.X, outline.Position.Y &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;36&lt;/span&gt;&lt;span style="color:#000000;"&gt;);
            
page.AddObject(outline);
page.Commit();
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the above code, &lt;font color="#808080"&gt;sectionPath&lt;/font&gt; contains the full path to the OneNote .one file you wish to use, &lt;font color="#808080"&gt;bodySubject&lt;/font&gt; contains the title text for the OneNote page, and &lt;font color="#808080"&gt;body&lt;/font&gt; contains HTML-formatted text for the page body.&amp;nbsp; The margin adjustment is optional and depends on what content you&amp;#39;re sending.&lt;/p&gt;&lt;p&gt;Compare that code with the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms406042.aspx" target="_blank"&gt;API examples on MSDN&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Another bonus is that the latest version of the&amp;nbsp;library now also supports&amp;nbsp;OneNote 2007, which means you really don&amp;#39;t need to think much about what version of OneNote is in use - it just works.&lt;/p&gt;&lt;p&gt;The library is endorsed by Microsoft but was previously only available on a couple of &lt;a href="http://blogs.msdn.com/dolange/archive/2004/06/17/158976.aspx" target="_blank"&gt;blog&lt;/a&gt; &lt;a href="http://blogs.msdn.com/andrew_may/archive/2004/07/27/198813.aspx" target="_blank"&gt;posts&lt;/a&gt;.&amp;nbsp; But now it has a &lt;a href="http://lange.officeisp.net/DataImport/" target="_blank"&gt;permanent home&lt;/a&gt; courtesy of Donovan Lange.&lt;/p&gt;&lt;p&gt;We&amp;#39;ll have a new release of our &lt;a href="http://www.clyxstudios.com/blogs/software/archive/2006/03/21/OmeaPlugins.aspx" target="_blank"&gt;Send to OneNote Omea plugin&lt;/a&gt;&amp;nbsp;soon&amp;nbsp;which will include the latest version of this library, which means it will also support OneNote 2007.&amp;nbsp; &lt;em&gt;&lt;font color="#808080"&gt;(If you&amp;#39;re really keen, &lt;a href="http://www.clyxstudios.com/user/CreateUser.aspx" target="_blank"&gt;join our community&lt;/a&gt; and you&amp;#39;ll get access to an early beta release in the downloads section).&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;img src="http://www.clyxstudios.com/aggbug.aspx?PostID=63" width="1" height="1"&gt;</content><author><name>Rohan</name><uri>http://www.clyxstudios.com/members/Rohan.aspx</uri></author><category term="C#" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/C_2300_/default.aspx" /><category term="OneNote" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/OneNote/default.aspx" /><category term="Code Library" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Code+Library/default.aspx" /><category term="API" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/API/default.aspx" /></entry><entry><title>You too can have fancy tooltips</title><link rel="alternate" type="text/html" href="http://www.clyxstudios.com/blogs/development/archive/2006/06/26/You-too-can-have-fancy-tooltips.aspx" /><id>http://www.clyxstudios.com/blogs/development/archive/2006/06/26/You-too-can-have-fancy-tooltips.aspx</id><published>2006-06-27T05:57:00Z</published><updated>2006-06-27T05:57:00Z</updated><content type="html">&lt;p&gt;I had a fairly busy web page that I thought could be streamlined through the use of popups or tooltips (no, not the standard &lt;font style="BACKGROUND-COLOR: #ffff00"&gt;yellow&lt;/font&gt; ones!). I was also keen on including images in the tooltips as well, to make them a little more interesting. So I thought about writing my own Javascript &amp;amp; DHTML library, but quickly abandoned that idea, deciding not to reinvent the wheel. Instead, some googling revealed a &lt;a href="http://www.walterzorn.com/tooltip/tooltip_e.htm" target=_blank&gt;wonderful little library&lt;/a&gt; called &lt;strong&gt;wz_tooltips.js&lt;/strong&gt; from &lt;a href="http://www.walterzorn.com/"&gt;Walter Zorn&lt;/a&gt; and it does just what I need. &lt;/p&gt;
&lt;p&gt;It looked pretty simple to add this libary into Community Server so I thought about the most logical place to put it, and drag-and-dropped it to the utility directory in the Web Visual Studio project. &lt;em style="COLOR: #808080"&gt;"A file with the name utility/wz_tooltips.js already exists."&lt;/em&gt;. Huh??.... Did I already do that?.... Before I signed myself up for some more &lt;a href="http://www.braintraining.com.au/"&gt;brain training&lt;/a&gt;, I double-checked the Community Server deployment files. Turns out the guys at Telligent had obviously done their research too and already used the wz_tooltips library for CS tooltips. &lt;/p&gt;
&lt;p&gt;So here's a really easy way to add your own tooltips to your pages in Community Server. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Include a call to JavaScript.RegisterToolTips in your Page_Load handler eg. 
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;script&lt;/span&gt; &lt;span style="COLOR: red"&gt;language&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="C#"&lt;/span&gt; &lt;span style="COLOR: red"&gt;runat&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="server"&amp;gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt; Page_Load(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: teal"&gt;EventArgs&lt;/span&gt; e) { &lt;br /&gt;&lt;span style="COLOR: teal"&gt;JavaScript&lt;/span&gt;.RegisterToolTips(&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;); &lt;br /&gt;} &lt;br /&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt; &lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;On each element that you want to display a tooltip from (such as a button, link, etc.), add an onmouseover call to the escape function as per the wz_tooltip documentation. Here's the HTML for the example tooltip shown above: &lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;li&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: red"&gt;onmouseover&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="this.T_WIDTH=400;return escape('&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img src=\'../images/communities.jpg\'&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&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; height=150 /&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;communities&amp;lt;/b&amp;gt; - establishing online communities with&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&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;services such as forums, newsgroups, blogs, &lt;/span&gt;&lt;span style="COLOR: blue"&gt;file sharing and photo galleries&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&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;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;')"&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;         communities&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;li&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;That's all there is to it!&amp;nbsp;&amp;nbsp; Here's a pic of how we've used it.&lt;/p&gt;
&lt;p&gt;&lt;a href="/photos/blogpyx/picture37.aspx" target=_blank&gt;&lt;img src="/photos/blogpyx/images/37/original.aspx" border=0 /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/photos/blogpyx/picture37.aspx" target=_blank&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also see it in action yourself at our &lt;a href="/pages/services.aspx" target=_blank&gt;Services page&lt;/a&gt;. Just hover your mouse over the &lt;strong&gt;services list&lt;/strong&gt; at the right. &lt;/p&gt;&lt;img src="http://www.clyxstudios.com/aggbug.aspx?PostID=38" width="1" height="1"&gt;</content><author><name>admin</name><uri>http://www.clyxstudios.com/members/admin.aspx</uri></author><category term="Community Server" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Community+Server/default.aspx" /><category term="ASP.NET 2.0" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/ASP.NET+2.0/default.aspx" /><category term="Javascript" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Javascript/default.aspx" /></entry><entry><title>Community Server and .NET 2.0 (Part 2)</title><link rel="alternate" type="text/html" href="http://www.clyxstudios.com/blogs/development/archive/2006/06/06/community-server-dotnet-20-part-two.aspx" /><link rel="enclosure" type="text/plain" length="2714" href="http://www.clyxstudios.com/blogs/development/attachment/18.ashx" /><id>http://www.clyxstudios.com/blogs/development/archive/2006/06/06/community-server-dotnet-20-part-two.aspx</id><published>2006-06-07T01:40:00Z</published><updated>2006-06-07T01:40:00Z</updated><content type="html">&lt;p&gt;In &lt;a href="/blogs/development/archive/2006/05/28/17.aspx"&gt;Part 1 of this series&lt;/a&gt; I talked about our experiences installing Community Server 2.0 on our production web host &lt;span style="COLOR: #7a7a7a"&gt;&lt;span style="FONT-SIZE: 0.9em; COLOR: #5f5f5f"&gt;&lt;span style="COLOR: #7a7a7a"&gt;(ASP.NET 2.0, SQL Server 2000, Medium Trust environment)&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In this part, I'll outline what we did to get emails working with our site. Before I start, keep in mind that Version 2.1 of Community Server is only weeks away, and it is highly likely that the new version will solve this issue once and for all. But in the interim, if you'd like to try a fairly straightforward workaround, read on...&lt;/p&gt;
&lt;h3&gt;Overview&lt;/h3&gt;
&lt;h4&gt;The Problem&lt;/h4&gt;
&lt;p&gt;The site wasn't sending emails for new users, mass mailing, etc. The Email Job was failing with with an Iterator Failed message, there were security exceptions and "operation could destabilize the runtime" exceptions. An example message from the exceptions report:&lt;/p&gt;
&lt;p style="FONT: 9pt Arial Narrow"&gt;&lt;strong&gt;Message&lt;/strong&gt; Iterator Failed. Type CommunityServer.Components.EmailJob. Method SendQueuedEmailJob. Reason System.Security.Permissions.SecurityPermission &lt;br /&gt;CommunityServer.Components.CSException: Iterator Failed. Type CommunityServer.Components.EmailJob. Method SendQueuedEmailJob. Reason System.Security.Permissions.SecurityPermission &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4&gt;The Options&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div style="LIST-STYLE-TYPE: none"&gt;Check that it is not related to the SMTP settings. &lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;&lt;li&gt;
&lt;div style="LIST-STYLE-TYPE: none"&gt;Look for a solution on the CS forums and the web. &lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;&lt;li&gt;Rewrite the EmailQueueProvider and any dependencies to remove the problem. &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Replace the existing EmailQueueProvider with another compatible mechanism for sending emails. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;h4&gt;The Assumptions&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div style="LIST-STYLE-TYPE: none"&gt;a temporary fix is all that is required given the imminent release of CS 2.1; &lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;&lt;li&gt;email traffic from the website is light; &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;you are not hosting multiple communities on the same CS installation; &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;you are using, or can use, the CS 2.0 SDK. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;h3&gt;Solution&lt;/h3&gt;
&lt;p&gt;Option 1 looked the most likely so I put together a test ASP.NET page that sent an email back to me using hard-coded SMTP settings. I uploaded this to our host and ran it and it worked fine. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Option 2 was next so I grabbed the messages from the exceptions report and searched. It seems &lt;a href="http://communityserver.org/forums/thread/523490.aspx" target=_blank&gt;several other people&lt;/a&gt; were in the same boat with no solution in sight, and googling didn't help much either. Option 3 looked complicated and risked regression problems, plus with the 2.1 release just around the corner it wasn't worth the risks and effort.&lt;/p&gt;
&lt;p&gt;So Option 4 was the answer. We took the code from our test ASP.NET page, adapted it to the CS Queue Provider model, and voila! the SendImmediatelyProvider was born. It does just what it says - as soon as an email is requested, it is sent. There is &lt;em&gt;no&lt;/em&gt; queue. One assumption is particularly important here - you must only have light email traffic on your site to use this approach.&lt;/p&gt;
&lt;p&gt;Here's what you need to do to use this class:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;build the code &lt;em&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;(see below, or download it from the attachment at the end of this post)&lt;/span&gt;&lt;/em&gt; - either within the SDK (Components project, Provider folder) or as a separate assembly (if separate, change the namespaces accordingly); &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;remove the Emails job from communityserver.config (look for the &lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #800000"&gt;Jobs&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; element). (I first tried setting enabled=false but found that CS continued to execute the job even after recycling ASP.NET); &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;change the EmailQueueProvider under the providers element again in communityserver.config. Change it to read as follows (make the appropriate adjustments if you have compiled a separate assembly) &lt;/li&gt;&lt;/ul&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #800000"&gt;add&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;name&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;EmailQueueProvider&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;CommunityServer.Components.SendImmediatelyProvider, CommunityServer.Components&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;" &lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;connectionStringName&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;SiteSqlServer&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;databaseOwnerStringName&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;SiteSqlServerOwner&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;And here's the SendImmediatelyProvider code:&lt;/p&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;code&gt;&lt;span style="COLOR: #2b91af"&gt;1&lt;/span&gt; &lt;span style="COLOR: blue"&gt;namespace&lt;/span&gt; CommunityServer.Components {&lt;/code&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;2&lt;/span&gt; &lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;3&lt;/span&gt; &lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Collections;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;4&lt;/span&gt; &lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Net;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;5&lt;/span&gt; &lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Net.Mail;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;6&lt;/span&gt; &lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Web.Mail;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;Note that Community Server 2.0 uses the .NET 1.1 System.Web.Mail namespace. This is deprecated in ASPNET 2.0 so our&lt;/em&gt; &lt;em&gt;class uses the new System.Net.Mail namespace. System.Web.Mail is still required for compatibility with CS method calls.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;7&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;8&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;SendImmediatelyProvider&lt;/span&gt; : &lt;span style="COLOR: teal"&gt;EmailQueueProvider&lt;/span&gt; {&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;9&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;10&lt;/span&gt; &lt;span style="COLOR: blue"&gt;#region&lt;/span&gt; Member variables&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;11&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;12&lt;/span&gt; &lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; databaseOwner = &lt;span style="COLOR: maroon"&gt;"dbo"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;13&lt;/span&gt; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; connectionString = &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;14&lt;/span&gt; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: teal"&gt;ProviderHelper&lt;/span&gt; sqlHelper = &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;15&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;16&lt;/span&gt; &lt;span style="COLOR: blue"&gt;#endregion&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;17&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;18&lt;/span&gt; &lt;span style="COLOR: blue"&gt;#region&lt;/span&gt; Constructor&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;19&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;20&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; SendImmediatelyProvider(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; databaseOwner, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; connectionString) {&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;The next three lines are not strictly necessary for our provider but are included here&lt;/em&gt; &lt;em&gt;for completeness of the provider&lt;/em&gt; &lt;em&gt;pattern.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;21&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.connectionString = connectionString;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;22&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.databaseOwner = databaseOwner;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;23&lt;/span&gt; sqlHelper = &lt;span style="COLOR: teal"&gt;ProviderHelper&lt;/span&gt;.Instance();&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;24&lt;/span&gt; }&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;25&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;26&lt;/span&gt; &lt;span style="COLOR: blue"&gt;#endregion&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;27&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;28&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DeleteQueuedEmail(&lt;span style="COLOR: teal"&gt;Guid&lt;/span&gt; emailID) {}&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;29&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;30&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: teal"&gt;ArrayList&lt;/span&gt; DequeueEmail(&lt;span style="COLOR: blue"&gt;int&lt;/span&gt; settingsID) {&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;31&lt;/span&gt; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;ArrayList&lt;/span&gt;();&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;32&lt;/span&gt; }&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;33&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;34&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; QueueEmail(System.Web.Mail.&lt;span style="COLOR: teal"&gt;MailMessage&lt;/span&gt; message) {&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;35&lt;/span&gt; &lt;span style="COLOR: teal"&gt;SiteSettings&lt;/span&gt; site = &lt;span style="COLOR: teal"&gt;SiteSettingsManager&lt;/span&gt;.GetSiteSettings(1000);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;1000 is the default community ID - if you are hosting multiple communities and they have different SMTP settings, you'll need to modify this code.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;36&lt;/span&gt; &lt;span style="COLOR: teal"&gt;SmtpClient&lt;/span&gt; smtpClient;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;Note the use of the new SmtpClient from the 2.0 .NET Framework.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;37&lt;/span&gt; &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (&lt;span style="COLOR: teal"&gt;String&lt;/span&gt;.IsNullOrEmpty(site.SmtpPortNumber))&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;38&lt;/span&gt; smtpClient = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;SmtpClient&lt;/span&gt;(site.SmtpServer);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;39&lt;/span&gt; &lt;span style="COLOR: blue"&gt;else&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;40&lt;/span&gt; smtpClient = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;SmtpClient&lt;/span&gt;(site.SmtpServer, &lt;span style="COLOR: teal"&gt;Convert&lt;/span&gt;.ToInt32(site.SmtpPortNumber));&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;41&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;42&lt;/span&gt; smtpClient.UseDefaultCredentials = &lt;span style="COLOR: blue"&gt;false&lt;/span&gt;;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;43&lt;/span&gt; &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (site.SmtpServerRequiredLogin) {&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;44&lt;/span&gt; &lt;span style="COLOR: teal"&gt;NetworkCredential&lt;/span&gt; credential = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;NetworkCredential&lt;/span&gt;(site.SmtpServerUserName, site.SmtpServerPassword);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;45&lt;/span&gt; smtpClient.Credentials = credential;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;46&lt;/span&gt; }&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;em&gt;This next chunk of code simply migrates the values from the deprecated System.Web.Mail.MailMessage object&lt;/em&gt; &lt;em&gt;to a new System.Net.Mail.MailMessage object in preparation for sending via SmtpClient.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;47&lt;/span&gt; System.Net.Mail.&lt;span style="COLOR: teal"&gt;MailMessage&lt;/span&gt; netMessage = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; System.Net.Mail.&lt;span style="COLOR: teal"&gt;MailMessage&lt;/span&gt;(message.From, message.To);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;48&lt;/span&gt; netMessage.Subject = message.Subject;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;49&lt;/span&gt; netMessage.Body = message.Body;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;50&lt;/span&gt; netMessage.IsBodyHtml = (message.BodyFormat == &lt;span style="COLOR: teal"&gt;MailFormat&lt;/span&gt;.Html);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;51&lt;/span&gt; netMessage.BodyEncoding = message.BodyEncoding;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;52&lt;/span&gt; netMessage.Priority = System.Net.Mail.&lt;span style="COLOR: teal"&gt;MailPriority&lt;/span&gt;.Normal;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;53&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;54&lt;/span&gt; smtpClient.Send(netMessage);&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;55&lt;/span&gt; }&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;56&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;57&lt;/span&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; QueueSendingFailure(&lt;span style="COLOR: teal"&gt;ArrayList&lt;/span&gt; list, &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; failureInterval, &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; maxNumberOfTries) {}&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;58&lt;/span&gt; }&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #2b91af"&gt;59&lt;/span&gt; }&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class=ztags&gt;&lt;span class=ztagspace&gt;Technorati&lt;/span&gt; : &lt;a class=ztag href="http://technorati.com/tag/ASP.NET%202.0" rel=tag&gt;ASP.NET 2.0&lt;/a&gt;, &lt;a class=ztag href="http://technorati.com/tag/Community%20Server" rel=tag&gt;Community Server&lt;/a&gt;, &lt;a class=ztag href="http://technorati.com/tag/Medium%20Trust" rel=tag&gt;Medium Trust&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;&lt;img src="http://www.clyxstudios.com/aggbug.aspx?PostID=18" width="1" height="1"&gt;</content><author><name>Rohan</name><uri>http://www.clyxstudios.com/members/Rohan.aspx</uri></author><category term="Community Server" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Community+Server/default.aspx" /><category term="C#" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/C_2300_/default.aspx" /><category term="Web Hosting" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Web+Hosting/default.aspx" /><category term="ASP.NET 2.0" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/ASP.NET+2.0/default.aspx" /></entry><entry><title>Community Server and .NET 2.0 (Part 1)</title><link rel="alternate" type="text/html" href="http://www.clyxstudios.com/blogs/development/archive/2006/05/28/17.aspx" /><id>http://www.clyxstudios.com/blogs/development/archive/2006/05/28/17.aspx</id><published>2006-05-29T00:07:00Z</published><updated>2006-05-29T00:07:00Z</updated><content type="html">&lt;p&gt;As this is the first post to our development blog on our new website, I thought I might comment on some of our experiences in getting the new site up and running.&lt;/p&gt;
&lt;p&gt;Our site is almost entirely based on &lt;a href="http://www.communityserver.org/"&gt;Community Server 2.0&lt;/a&gt;, a really cool product that we use both for this website and for the sites of some of our customers.&lt;/p&gt;
&lt;p&gt;We chose to use the &lt;a href="http://communityserver.org/files/folders/releases/entry516270.aspx"&gt;SDK release&lt;/a&gt; of CS 2.0 (rather than the web install package) so that we could make some relatively minor additions and modifications. We also wanted to use ASP.NET 2.0, as our hosting provider supports 1.1 or 2.0 but not both, and we plan to extend our site with new services that will require 2.0.&lt;/p&gt;
&lt;p&gt;Now before I go any further, I'd recommend if you are using a shared web host (ie. not a dedicated server) that you stick with ASP.NET 1.1 if at all possible, or at least wait a month or so for CS 2.1, or even CS 3.0 (but that release is many months away). If your hoster offers a CS installation option and you can live with not being able to directly modify the pages within the site, then go with that. But if you want to live on the edge, it's certainly possible to use the SDK and .NET 2.0 together...&lt;/p&gt;
&lt;p&gt;In fact, it didn't take long at all to get a development server up and running with CS 2.0 and .NET 2.0. As is often the case though, the main issues running CS under .NET 2.0 are really only apparent when you migrate from development to your production hosting site.&lt;/p&gt;
&lt;p&gt;Most hosters require that ASP.NET sites run under &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000020.asp"&gt;medium trust&lt;/a&gt;, or some sort of variant of it. It's possible (and a good idea) to simulate medium trust in your development environment (add &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;trust&lt;/span&gt; &lt;span style="COLOR: red"&gt;level&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;Medium&lt;/span&gt;" &lt;span style="COLOR: red"&gt;originUrl&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"" &lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;/span&gt; under system.web in your web.config), but be aware that it won't be an exact simulation of your production host as they may have made some policy adjustments via the host machine.config file. (You could of course ask your hoster for a copy of their machine.config....)&lt;/p&gt;
&lt;p&gt;We chose to use the ASP.NET 2.0 membership provider model (via CommunityServer. ASPNet20MemberRole), which has been suggested as one way of getting medium trust working. We also wanted to go this way to help integrate other aspects of our site.&lt;/p&gt;
&lt;p&gt;Let's just summarise our environment then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;commercial shared web host running ASP.NET 2.0 and SQL Server 2000 &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;ASP.NET configured as Medium Trust (with some minor increases in trust level provided by our hoster for database access and outbound http/s) &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Community Server 2.0 Web built in Visual Studio 2005 from the CS 2.0 SDK &lt;br /&gt;
&lt;/li&gt;&lt;li&gt;ASP.NET 2.0 membership provider model &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Use ASP.NET 2.0 to develop, ASP.NET 1.1 to run&lt;/h3&gt;
&lt;p&gt;Now here's an ugly trick that got us over a few hurdles. You can build the site in .NET 2.0 and Visual Studio 2005, use the ASP.NET membership provider, and use a .NET 2.0 web.config format, but have it all run under .NET 1.1. You do this by modifying your web.config to limit the supported runtimes:&lt;/p&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;startup&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;supportedRuntime&lt;/span&gt; &lt;span style="COLOR: red"&gt;version&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;v1.1.4322&lt;/span&gt;" &lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: maroon"&gt;startup&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Sorta defeats the purpose of building in .NET 2.0 if you can't use any .NET 2.0 features though, doesn't it.&lt;/p&gt;
&lt;h3&gt;Operation could destabilize the runtime.&lt;/h3&gt;
&lt;p&gt;What the? Sorry, could you repeat that? I am &lt;em&gt;so&lt;/em&gt; learning to hate that message. A &lt;a href="http://mistupid.com/jokes/haikuerror.htm"&gt;haiku message&lt;/a&gt; would be more useful. The message may be mysterious, but our experience indicates that it is somehow related to mixing .NET 1.1 and .NET 2.0 assemblies in the one \bin directory. (Shades of &lt;a href="http://en.wikipedia.org/wiki/DLL%20Hell"&gt;DLL Hell&lt;/a&gt; all over again...)&lt;/p&gt;
&lt;p&gt;We saw this in both the Exceptions Report and Event Log. It happened when using a desktop blogging tool to access the CS Metaweblog API. We also noticed that an assembly wasn't loading - the ubiquitous and very handy XML RPC support library from &lt;a href="http://www.cookcomputing.com/"&gt;Cook Computing&lt;/a&gt;. This seemed to be due to it being strongly named. By &lt;a href="http://www.xml-rpc.net/"&gt;grabbing the source&lt;/a&gt;, building it in .NET 2.0 and removing the key file reference (alternatively, adding your own key), we were able to get it going.&lt;/p&gt;
&lt;p&gt;So we got this far OK... let's check that log one more time....no more runtime destabilization.. YAY!&lt;/p&gt;
&lt;p&gt;But wait,....oh-ohhhh.... - it's the EmailQueueProvider...&lt;/p&gt;
&lt;p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Calibri; mso-outline-level: 1"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Message&lt;/span&gt; Iterator Failed. Type CommunityServer.Components.EmailJob. Method SendQueuedEmailJob. Reason System.Security.Permissions.SecurityPermission.&lt;/p&gt;
&lt;p&gt;Hmm... that could explain why we can't get our site to send any emails.&lt;/p&gt;
&lt;p&gt;Tune in next week to see if we solve that one!&lt;/p&gt;
&lt;p class=zoundry_bw_tags&gt;&lt;span class=ztags&gt;&lt;span class=ztagspace&gt;Technorati&lt;/span&gt; : &lt;a class=ztag href="http://technorati.com/tag/ASP.NET%202.0" rel=tag&gt;ASP.NET 2.0&lt;/a&gt;, &lt;a class=ztag href="http://technorati.com/tag/Community%20Server" rel=tag&gt;Community Server&lt;/a&gt;, &lt;a class=ztag href="http://technorati.com/tag/Medium%20Trust" rel=tag&gt;Medium Trust&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class=ztags&gt;&lt;span class=ztagspace&gt;Ice Rocket&lt;/span&gt; : &lt;a class=ztag href="http://blogs.icerocket.com/tag/ASP.NET+2.0" rel=tag&gt;ASP.NET 2.0&lt;/a&gt;, &lt;a class=ztag href="http://blogs.icerocket.com/tag/Community+Server" rel=tag&gt;Community Server&lt;/a&gt;, &lt;a class=ztag href="http://blogs.icerocket.com/tag/Medium+Trust" rel=tag&gt;Medium Trust&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;&lt;img src="http://www.clyxstudios.com/aggbug.aspx?PostID=17" width="1" height="1"&gt;</content><author><name>Rohan</name><uri>http://www.clyxstudios.com/members/Rohan.aspx</uri></author><category term="Community Server" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Community+Server/default.aspx" /><category term="Web Hosting" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/Web+Hosting/default.aspx" /><category term="ASP.NET 2.0" scheme="http://www.clyxstudios.com/blogs/development/archive/tags/ASP.NET+2.0/default.aspx" /></entry></feed>