<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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/"><channel><title>Interakting Blogs</title><link>http://blogs.interakting.co.uk/MainFeed.aspx</link><description>Innovate. Interact. Inspire.</description><generator>Subtext Version 1.9.5.177</generator><item><title>Should I change my Session state to StateServer ?</title><link>http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/should-i-change-my-session-state-to-stateserver.aspx</link><pubDate>Thu, 09 Oct 2008 05:35:11 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/should-i-change-my-session-state-to-stateserver.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/dominicz/comments/357.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/dominicz/comments/commentRss/357.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/should-i-change-my-session-state-to-stateserver.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/dominicz/services/trackbacks/357.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/dominicz/rss.aspx">Should I change my Session state to StateServer ?</source><description>&lt;p&gt;After various conversations on both internal and external projects, I’ve noticed that some of our web projects were being developed using a Session state called &lt;em&gt;InProc&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;InProc&lt;/em&gt; means In-Process, so IIS is hosting all of the &lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;Session[“Dom”] = “Idiot!”; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;variables. Now, if the web application eats up too much memory, IIS 6 and above can be configured to recycle the Application pool – a contained unit of web sites, in order to free up memory. This is good for IIS but baaaad news for your website, as everything in the Session is lost – that could be shopping basket, current order status, user details! InProc is a bit of a quick and nasty method of developing as it just does its job, assuming that you are not going to host this to a larger audience (over about 5 users).&lt;/p&gt;
&lt;p&gt;As I found out with any large project, nothing goes to plan, so, the best thing to do is to use &lt;em&gt;StateServer&lt;/em&gt; and not &lt;em&gt;InProc&lt;/em&gt; – but WHY?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;StateServer&lt;/em&gt; is a totally out-of-process service that runs on either the same web server or a different server entirely. Session data is saved to this service so if the AppPool recycles, you have no problems whatsoever. Also, the data needs to serialize properly in order for it to be saved to the service.&lt;/p&gt;
&lt;p&gt;Whats the point I hear you ask? Well, the point is that if you use InProc and your application gets load balanced (often without your knowledge), the website won’t work properly. Remember, load balancing is decided, by either the hardware or the software, to help manage the network traffic to a destination server. So 1 request to go to Server1 and another or Server2, or even ServerX! Youch! So your site’s Session could be stored on another machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;StateServer&lt;/em&gt; works because all of the web.config’s point to the same machine, so they all work off that one service.&lt;/p&gt;
&lt;p&gt;The other option is &lt;em&gt;SQLServer&lt;/em&gt;, which stores it in SQL Server, which is more for web farms (multiple physical PCs), rather than web gardens (multiple virtualized PCs). Or you can use &lt;em&gt;Custom&lt;/em&gt; for a custom implementation (e.g ODBC or XML), or &lt;em&gt;Off&lt;/em&gt; to turn it off completely.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Therefore, a good recommendation is to always change your web.config to say:&lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;sessionState&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;mode&lt;/span&gt;=”&lt;span style="color: rgb(255, 0, 0);"&gt;StateServer&lt;/span&gt;” … &lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;And start the ASP.NET State Service on your machine. This way to can always revert to &lt;em&gt;InProc&lt;/em&gt; if you need to, but you are still ready for the switch over.&lt;/p&gt;
&lt;p&gt;Believe me, it’s a lot easier to start out this way, rather than have to work backwards.&lt;/p&gt;
&lt;p&gt;It is always a worthwhile exercise!&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/dominicz/aggbug/357.aspx" width="1" height="1" /&gt;</description><dc:creator>Dominic</dc:creator></item><item><title>Creating objects that know when they have changed - using IsDirty and custom PropertyChangedEvent's</title><link>http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/creating-objects-that-know-when-they-have-changed---using.aspx</link><pubDate>Thu, 09 Oct 2008 01:57:57 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/creating-objects-that-know-when-they-have-changed---using.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/dominicz/comments/356.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/dominicz/comments/commentRss/356.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/dominicz/archive/2008/10/09/creating-objects-that-know-when-they-have-changed---using.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/dominicz/services/trackbacks/356.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/dominicz/rss.aspx">Creating objects that know when they have changed - using IsDirty and custom PropertyChangedEvent's</source><description>&lt;p&gt;When working on a project recently, the data saved back to the database was huge. We are talking well over 100 properties. After talking to my Java buddy, he said that one way is to create an IsDirty method that returns if the object has changed state.&lt;/p&gt;  &lt;p&gt;The IsDirty() method is used to query the state of an object - if it has been modified or not. The implementation is up to the developer, but ultimately it's use can save you a trip to the data source.&lt;/p&gt;  &lt;p&gt;I have split this example into 3 stages:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;First attempt &lt;/li&gt;    &lt;li&gt;Refactored &lt;/li&gt;    &lt;li&gt;Event Handled &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;N.B. This article helps someone in (archaic) .NET 2.0 - but if you've looking to develop for .NET 3.5, it might be worth looking into DependencyProperty's, which caters for this sort of problem.&lt;/p&gt;  &lt;h2&gt;First Attempt&lt;/h2&gt;  &lt;p&gt;The problem I found when prototyping this is that it can be quite impractical at first glance:&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Customer
{
    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; firstName, surname;
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Customer(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; firstName, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; surname)
    {
        &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.firstName = firstName;
        &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.surname = surname;
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FirstName
    {
        get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; firstName; }
        set 
        { 
            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;( firstName != &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; )
            {
                IsDirty = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;
                firstName = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;
            }
        }
    }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Surname
    {
        get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; surname; }
        set 
        { 
            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;( surname != &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; )
            {
                IsDirty = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;
                surname = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;
            }
        }
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsDirty { get; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; set; }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;This is a bit bloated. Also, it relies on every property having to check for itself whether it is equal or not, setting the IsDirty property and also assigning the value.&lt;/p&gt;

&lt;p&gt;After writing this and implementing a few more properties I found this to be a bit too impractical. Instead, I realised that they are all basically doing 3 steps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Checking the previous value to the new value. &lt;/li&gt;

  &lt;li&gt;Setting IsDirty. &lt;/li&gt;

  &lt;li&gt;Assigning the new value. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This example needs simplifying - or refactoring to be more precise.&lt;/p&gt;

&lt;h2&gt;Refactoring&lt;/h2&gt;

&lt;p&gt;Instead, I decided to implement this behaviour in a method called SetValue&amp;lt;T&amp;gt;() , which would raise events when a property has changed. This allows the IsDirty property to be changed centrally and debugging to be centralized. &lt;/p&gt;

&lt;p&gt;Firsty I created the method:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetValue&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; T varName, T &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)
{
    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (varName.Equals(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;))
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;
    
    IsDirty = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;
    varName = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Now, we can change our properties to:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FirstName
{
    get {&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; firstName; }
    set
    {
        SetValue&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(ref firstName,&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);
    }
}

&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Surname
{
    get {&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; surname; }
    set
    {
        SetValue&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(ref surname,&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt; This is one implementation of it, but I decided to extend it to event handling as well, so that even the outside world can be notified about what is changing.&lt;/p&gt;

&lt;h2&gt;Event Handling&lt;/h2&gt;

&lt;p&gt;I decided to also implement this is in a typical Microsoft fashion: OnPropertyChanging and OnPropertyChanged. &lt;/p&gt;

&lt;p&gt;In order to turn this into an event driven model I need to do a few things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create some event arguments describing what is being changed. &lt;/li&gt;

  &lt;li&gt;Add some event handlers to trigger a notification that they have been changed. &lt;/li&gt;

  &lt;li&gt;Trigger the events from within your code &lt;/li&gt;

  &lt;li&gt;(Optionally) wire up the events. &lt;/li&gt;

  &lt;li&gt;Trigger the events from within your code &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Create event arguments&lt;/h3&gt;

&lt;p&gt;Since I am using events, I want to create event arguments detailing what has changed. I have implemented this in 2 identical classes (and 1 base class). Here I have implemented a base class, and 2 classes which improve the clarity of the base class. I have chosen clarity over code bloat:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;//Base class implementation&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;abstract&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PropertyChangeEventArgs : EventArgs
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; PropertyName { get; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; set; }
    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; Value { get; set; }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; PropertyChangeEventArgs(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; propertyName, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; before)
    {
        &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.PropertyName = propertyName;
        &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Value = before;
    }
}

&lt;span style="color: #008000"&gt;//Holds arguments before the proerty has changed&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PropertyChangingEventArgs : PropertyChangeEventArgs
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; ValueBeforeChange
    {
        get
        {
            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Value;
        }
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; PropertyChangingEventArgs(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; propertyName, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; before) 
        : &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;(propertyName,before)
    {
    }
}

&lt;span style="color: #008000"&gt;//Holds arguments after the proerty has changed&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PropertyChangedEventArgs : PropertyChangeEventArgs
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; ValueAfterChange
    { 
        get 
        { 
            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Value; 
        } 
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; PropertyChangedEventArgs(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; propertyName, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; after) 
        : &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;(propertyName, after)
    {
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;Create event handlers&lt;/h3&gt;

&lt;p&gt;Now implement some event handlers:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;event&lt;/span&gt; PropertyChangingEventHandler PropertyChanging;
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; PropertyChangingEventHandler(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; o, PropertyChangingEventArgs e);

&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;event&lt;/span&gt; PropertyChangedEventHandler PropertyChanged;
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; PropertyChangedEventHandler(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; o,PropertyChangedEventArgs e);&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;Trigger the events from within your code&lt;/h3&gt;

&lt;p&gt;Now I need to trigger these events from the SetValue&amp;lt;T&amp;gt;() method. I will also need to find out what property was called by this SetValue&amp;lt;T&amp;gt;() method.&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetValue&amp;lt;T&amp;gt;(T varName, T &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)
{
       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (varName.Equals(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;))
           &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;

       &lt;span style="color: #008000"&gt;//TODO: Find the property's name that is calling this method&lt;/span&gt;
       &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; propertyName = &lt;span style="color: #006080"&gt;"MyProperty"&lt;/span&gt;;

       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (PropertyChanging != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
           OnPropertyChanging(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyChangingEventArgs(propertyName, varName));

       varName = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;

       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (PropertyChanged != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
           OnPropertyChanged(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyChangedEventArgs(propertyName, varName));
   }&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The last thing to do is to find the property that is calling this method. This can be done using Reflection, by looking up the call stack. By getting the previous "frame", we can deduce where this is being called from. In our case, this is called "set_FirstName". Remove the "set_" and we have our property name:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;StackTrace st = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StackTrace();
StackFrame current = st.GetFrame(1);
&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; propertyName = current.GetMethod().Name.Replace(&lt;span style="color: #006080"&gt;"set_"&lt;/span&gt;, &lt;span style="color: #006080"&gt;""&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;(Optionally) wire up the events&lt;/h3&gt;

&lt;p&gt;I want to subscribe to the OnPropertyChanged event, so that I can set the IsDirty property within it. I have done this within a private constructor:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Customer()
{
   PropertyChanged += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyChangedEventHandler(OnPropertyChanged);
}

&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Customer(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; firstName, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; surname) : &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;()
{
   &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.firstName = firstName;
   &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.surname = surname;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;(Optionally) trigger the events from within your code&lt;/h3&gt;

&lt;p&gt;Now, I want to move the IsDirty assignment out of the SetValue() method because although overkill, it is not related to the setting of the value. It is related to the &lt;em&gt;event &lt;/em&gt;but not the &lt;em&gt;assignment&lt;/em&gt;. It also means that you have just wasted 15 minutes reading this article! :-) :&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnPropertyChanged(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, PropertyChangedEventArgs ea)
{
   IsDirty = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;So what have we done? We've looked at ways in which we can implement notification within a class, so that we can save a database access. When getting to a large number of properties, we can bypass each save and also allow the outside world to be notified of its changes.&lt;/p&gt;

&lt;p&gt;In the first example,we saw a cheap and nasty way of doing it, but impractical for larger classes. In the second example we saw a better implementation and in the third example we added event handling to extend the functionality further.&lt;/p&gt;

&lt;p&gt;I hope this article helps someone - but if you've looking to develop for .NET 3.5, it might be worth looking into DependencyProperty's, which caters for this sort of problem.&lt;/p&gt;

&lt;p&gt;Here is the full source code to have a play with:&lt;/p&gt;

&lt;div overflow="auto"&gt;
  &lt;pre&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Customer c = new Customer("Dominic", "Zukiewicz");
            c.FirstName = "Dommy dom dom";

            Console.WriteLine("Customer.IsDirty = " + c.IsDirty);

            Customer c2 = new Customer("Dominic", "Zukiewicz");
            c.Surname = "Zukiewicz";

            Console.WriteLine("Customer2.IsDirty = " + c2.IsDirty);
        }
    }

    class Customer
    {
        private string firstName;
        private string surname;

        private Customer()
        {
            PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);
        }

        public Customer(string firstName, string surname) : this()
        {
            this.firstName = firstName;
            this.surname = surname;
        }

        public string FirstName
        {
            get
            {
                return firstName;
            }
            set
            {
                SetValue&lt;string&gt;(ref firstName, value);
            }
        }

        public string Surname
        {
            get 
            { 
                return surname; 
            }
            set
            {
                SetValue&lt;string&gt;(ref surname,value);
            }
        }

        public bool IsDirty { get; private set; }


        private void SetValue&lt;t&gt;(T varName, T value)
        {
            if (varName.Equals(value))
                return;

            StackTrace st = new StackTrace();
            StackFrame current = st.GetFrame(1);
            string propertyName = current.GetMethod().Name.Replace("set_", "");

            if (PropertyChanging != null)
                OnPropertyChanging(this, new PropertyChangingEventArgs(propertyName, varName));

            varName = value;

            if (PropertyChanged != null)
                OnPropertyChanged(this, new PropertyChangedEventArgs(propertyName, varName));
        }

        public event PropertyChangingEventHandler PropertyChanging;
        public delegate void PropertyChangingEventHandler(object o, PropertyChangingEventArgs e);

        public event PropertyChangedEventHandler PropertyChanged;
        public delegate void PropertyChangedEventHandler(object o,PropertyChangedEventArgs e);

        private void OnPropertyChanged(object sender, PropertyChangedEventArgs ea)
        {
            Debug.Print("Property: {0}, After: {1}", ea.PropertyName, ea.ValueAfterChange);
            IsDirty = true;
        }

        private void OnPropertyChanging(object sender, PropertyChangingEventArgs ea)
        {
            Debug.Print("Property: {0}, Before: {1}", ea.PropertyName, ea.ValueBeforeChange);
        }
        
    }

    //Base class implementation
    public abstract class PropertyChangeEventArgs : EventArgs
    {
        public string PropertyName { get; protected set; }
        protected object Value { get; set; }

        public PropertyChangeEventArgs(string propertyName, object before)
        {
            this.PropertyName = propertyName;
            this.Value = before;
        }
    }

    //Holds arguments before the proerty has changed
    public class PropertyChangingEventArgs : PropertyChangeEventArgs
    {
        public object ValueBeforeChange
        {
            get
            {
                return this.Value;
            }
        }

        public PropertyChangingEventArgs(string propertyName, object before) 
            : base(propertyName,before)
        {
        }
    }

    //Holds arguments after the proerty has changed
    public class PropertyChangedEventArgs : PropertyChangeEventArgs
    {
        public object ValueAfterChange
        { 
            get 
            { 
                return this.Value; 
            } 
        }

        public PropertyChangedEventArgs(string propertyName, object after) 
            : base(propertyName, after)
        {
        }
    }
}&lt;/t&gt;&lt;/string&gt;&lt;/string&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;img src="http://blogs.interakting.co.uk/dominicz/aggbug/356.aspx" width="1" height="1" /&gt;</description><dc:creator>Dominic</dc:creator></item><item><title>Using Visual Studio 2005/2008 to easily insert column names into a stored procedure</title><link>http://blogs.interakting.co.uk/dominicz/archive/2008/10/08/using-visual-studio-20052008-to-easily-insert-column-names-into.aspx</link><pubDate>Wed, 08 Oct 2008 06:13:10 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/dominicz/archive/2008/10/08/using-visual-studio-20052008-to-easily-insert-column-names-into.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/dominicz/comments/355.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/dominicz/comments/commentRss/355.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/dominicz/archive/2008/10/08/using-visual-studio-20052008-to-easily-insert-column-names-into.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/dominicz/services/trackbacks/355.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/dominicz/rss.aspx">Using Visual Studio 2005/2008 to easily insert column names into a stored procedure</source><description>&lt;p&gt;When writing stored procedures or views, I always create them in Visual Studio (2005/2008) and then run them on a specified database. When using "SELECT *", it is compact, but obviously does not help you find the columns of the table or view.&lt;/p&gt;
&lt;p&gt;When using the IDE, I added a new SQL Script for Stored Procedures, and then I typed:&lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;SELECT&lt;/span&gt; *&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;FROM&lt;/span&gt; Customers&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;and a blue box surrounded the statement. I right-clicked -&amp;gt; Design SQL Block.&lt;/p&gt;
&lt;p&gt;The designer then listed all of the column names for me, and when clicking OK, instantly put them back into the SQL script I was creating!&lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;SELECT&lt;/span&gt;  CustomerID, CompanyName, ContactName, ContactTitle, &lt;br /&gt;        Address, City, Region, PostalCode, Country, Phone, Fax&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;FROM&lt;/span&gt;    Customers&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;For the table I was using, this list over 60 columns for me!&lt;/p&gt;
&lt;p&gt;So if you want a quick way of listing all of the column names for table of view:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Add a database project to your site (if you haven't already done so)&lt;/li&gt;
    &lt;li&gt;Right click Queries -&amp;gt; Add SQL Script&lt;/li&gt;
    &lt;li&gt;Choose Stored Procedure Script&lt;/li&gt;
    &lt;li&gt;Type your SELECT * From XYZ statement&lt;/li&gt;
    &lt;li&gt;Right click -&amp;gt; Design SQL Block&lt;/li&gt;
    &lt;li&gt;Click OK.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The designer will be updated with the new query.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/dominicz/aggbug/355.aspx" width="1" height="1" /&gt;</description><dc:creator>Dominic</dc:creator></item><item><title>BizTalk: Division Functiod Returns Double</title><link>http://blogs.interakting.co.uk/mattnield/archive/2008/10/01/biztalk-division-functiod-returns-double.aspx</link><pubDate>Wed, 01 Oct 2008 05:49:06 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/mattnield/archive/2008/10/01/biztalk-division-functiod-returns-double.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/mattnield/comments/354.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/mattnield/comments/commentRss/354.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/mattnield/archive/2008/10/01/biztalk-division-functiod-returns-double.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/mattnield/services/trackbacks/354.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/mattnield/rss.aspx">BizTalk: Division Functiod Returns Double</source><description>&lt;p&gt;Just a little note here that we noticed testing something (how it had not occurred before, I do not know).  We have a function that we were referencing from a referenced assembly that would format values to the slightly odd format being used by the ERP that we were talking too.  In  most cases it seamed to work OK, but for smaller values it didn't quite product the result we expected.&lt;/p&gt;  &lt;p&gt;It turns out that the result of the Division functiod in &lt;a title="BizTalk Server" href="http://www.microsoft.com/biztalk/default.mspx" target="_blank"&gt;BizTalk Server&lt;/a&gt; 2006 is a double.  The mapper being the way it is converts this to a string (assumably using .ToString()).  At least this is how it looks when I point &lt;a title="ILDASM Reference" href="http://msdn.microsoft.com/en-us/library/f7dy01k1(VS.80).aspx"&gt;ildasm.exe&lt;/a&gt; at &lt;a title="Microsoft" href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt;.BizTalk.BaseFunctoids.dll.&lt;/p&gt;  &lt;p&gt;Now, rather simply put, I was being a fool and trying to convert this to a decimal and wondering what was going on.  I was passing what I though was a value of "0.00002" to my referenced method and expecting it to be formatted properly.  When we looked deeper in to the issue, we noticed that the value coming out was in fact "2E-05", which is how a float or a double would represent the value 0.00002.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Quick use of the &lt;a title="Double.TryParse()" href="http://msdn.microsoft.com/en-us/library/system.double.tryparse.aspx"&gt;double.TryParse()&lt;/a&gt; fixes this issue and off we trundle.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Worth keeping in mind, and also worth having a look at the base functoids using ildasm.exe when relying on their output.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/mattnield/aggbug/354.aspx" width="1" height="1" /&gt;</description><dc:creator>Matt Nield</dc:creator></item><item><title>Syncing Outlook with a Windows Mobile device in Vista</title><link>http://blogs.interakting.co.uk/danmatthews/archive/2008/10/01/syncing-outlook-with-a-windows-mobile-device-in-vista.aspx</link><pubDate>Wed, 01 Oct 2008 00:37:39 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/danmatthews/archive/2008/10/01/syncing-outlook-with-a-windows-mobile-device-in-vista.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/353.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/353.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/10/01/syncing-outlook-with-a-windows-mobile-device-in-vista.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/danmatthews/services/trackbacks/353.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/danmatthews/rss.aspx">Syncing Outlook with a Windows Mobile device in Vista</source><description>&lt;p&gt;My XP laptop had ground to a halt - 6 months without a rebuild and it had got so clogged that it literally took 5 minutes just to boot. I needed to wipe it and start again but the head of our technical team offered me a fresh laptop with a clean Vista Business build. Deciding that being a guinea pig was a nice idea, I accepted it. The 4 gig of ram (up from 2 gig) was the sweetener that made up my mind for sure :)&lt;/p&gt;  &lt;p&gt;As I was setting it up just how I wanted it, one of the things I needed to do was sync my two mobile phones with it. I have both an HTC 4350 (Herald) from work and my own personal HTC TyTN II. On my XP laptop I used ActiveSync to sync up my calendar, tasks and contacts.&lt;/p&gt;  &lt;p&gt;Knowing that ActiveSync has been replaced on Vista, I was hoping for an easy experience. After plugging in my TyTN II, Vista offered to sync my media files. Fine, but I wanted to sync with Outlook so I cancelled the dialog and started my hunt. In Control Panel I found 'Sync Centre' which offered to sync my media files again. This was getting annoying. Contacts and/or Outlook were mentioned nowhere.&lt;/p&gt;  &lt;p&gt;Maybe the 'Windows Mobile Device Centre' in Control Panel was my best bet? Nope. That just had settings on whether I wanted to connect via USB and Bluetooth or not. Nothing about syncing. Googling didn't help me that much. There doesn't seem to be much info about this. Is it that obvious? Am I missing something?&lt;/p&gt;  &lt;p&gt;Actually, I was missing something. The latest download of &lt;a href="http://www.microsoft.com/windowsmobile/en-us/help/synchronize/device-center.mspx"&gt;Windows Mobile Device Centre&lt;/a&gt; (currently 6.1 as I write). This is basically what ActiveSync used to be, and syncs up all the bits and pieces you'd expect with Outlook. In fact, it's very smart and clean and appears to be a nice improvement on ActiveSync.&lt;/p&gt;  &lt;p&gt;I thought it worth blogging this for two reasons. Firstly, hopefully this will get indexed so that it can be a quick help to others who were in the same boat as me. Secondly, is this part of the problem with Vista? It's not exactly intuitive that you have to install an updated version of a Control Panel applet to be able to sync (although behind the scenes it's more than that, of course). It almost seems that the out-the-box install is half baked. And the help isn't much help.&lt;/p&gt;  &lt;p&gt;It's possible that I still missed a trick, of course, and if I have done then please feel free to comment here and set me straight!&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/353.aspx" width="1" height="1" /&gt;</description><dc:creator>Dan Matthews</dc:creator></item><item><title>Silverlight: System.Net.WebClient Returns &amp;quot;Security error&amp;quot;</title><link>http://blogs.interakting.co.uk/mattnield/archive/2008/09/19/silverlight-system.net.webclient-returns-quotsecurity-errorquot.aspx</link><pubDate>Fri, 19 Sep 2008 06:47:24 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/mattnield/archive/2008/09/19/silverlight-system.net.webclient-returns-quotsecurity-errorquot.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/mattnield/comments/352.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/mattnield/comments/commentRss/352.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/mattnield/archive/2008/09/19/silverlight-system.net.webclient-returns-quotsecurity-errorquot.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/mattnield/services/trackbacks/352.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/mattnield/rss.aspx">Silverlight: System.Net.WebClient Returns &amp;quot;Security error&amp;quot;</source><description>&lt;p&gt;When trying to access remote content in &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt;, you need to add a &lt;a title="How to: Make a Service Available Across Domain Boundaries" href="http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx"&gt;clientaccespolicy.xml file&lt;/a&gt; to the root of the web server that you are trying to access.  I did this, my file looked like this:&lt;/p&gt;  &lt;div class="csharpcode-wrapper"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;access-policy&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cross-domain-access&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;policy&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;allow-from&lt;/span&gt; &lt;span class="attr"&gt;http-request-headers&lt;/span&gt;&lt;span class="kwrd"&gt;="*"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;domain&lt;/span&gt; &lt;span class="attr"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;="*"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;allow-from&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;grant-to&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;resource&lt;/span&gt; &lt;span class="attr"&gt;include-subpaths&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;="/"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;grant-to&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;policy&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;cross-domain-access&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;access-policy&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;So essentially, anyone can access this.&lt;/p&gt;

&lt;p&gt;I wrote my code to retrieve the information in a C# console app, just to test it out the WebClient as follows:&lt;/p&gt;

&lt;div class="csharpcode-wrapper"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Xml;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Xml.Linq;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; GetBlogContentTest
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            WebClient w = &lt;span class="kwrd"&gt;new&lt;/span&gt; WebClient();

            &lt;span class="kwrd"&gt;string&lt;/span&gt; result = w.DownloadString(&lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(&lt;span class="str"&gt;"http://blogs.interakting.co.uk/MainFeed.aspx"&lt;/span&gt;));
            
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!String.IsNullOrEmpty(result))
            {
                XDocument xDoc = XDocument.Parse(result, LoadOptions.SetBaseUri);

                var blogItems = from item &lt;span class="kwrd"&gt;in&lt;/span&gt; xDoc.Descendants(&lt;span class="str"&gt;"item"&lt;/span&gt;)
                                select &lt;span class="kwrd"&gt;new&lt;/span&gt; ChannelItem
                                {
                                    Title = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)item.Element(&lt;span class="str"&gt;"title"&lt;/span&gt;),
                                    Link = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)item.Element(&lt;span class="str"&gt;"link"&lt;/span&gt;),
                                    PubDate = (DateTime)item.Element(&lt;span class="str"&gt;"pubDate"&lt;/span&gt;),
                                    SourceUrl = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)item.Element(&lt;span class="str"&gt;"source"&lt;/span&gt;).Attribute(&lt;span class="str"&gt;"url"&lt;/span&gt;),
                                    Description = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)item.Element(&lt;span class="str"&gt;"description"&lt;/span&gt;),
                                    Author = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)item.Element(XName.Get(&lt;span class="str"&gt;"creator"&lt;/span&gt;,&lt;span class="str"&gt;"http://purl.org/dc/elements/1.1/"&lt;/span&gt;))
                                };

                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ChannelItem item &lt;span class="kwrd"&gt;in&lt;/span&gt; blogItems)
                {
                    Console.WriteLine(&lt;span class="str"&gt;"Title: {0}"&lt;/span&gt;, item.Title);
                    Console.WriteLine(&lt;span class="str"&gt;"Link : {0}"&lt;/span&gt;, item.Link);
                    Console.WriteLine(&lt;span class="str"&gt;"SUrl : {0}"&lt;/span&gt;, item.SourceUrl);
                    Console.WriteLine(&lt;span class="str"&gt;"Auth : {0}"&lt;/span&gt;, item.Author);
                    Console.WriteLine(&lt;span class="str"&gt;"Date : {0}"&lt;/span&gt;, item.PubDate);
                    Console.WriteLine(&lt;span class="str"&gt;"Content Length: {0}{1}"&lt;/span&gt;, item.Description.Length, Environment.NewLine);
                }

            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt;
            {
                Console.WriteLine(&lt;span class="str"&gt;"No Results Retrieved"&lt;/span&gt;);
            }

            Console.ReadLine();
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This also, worked fine.  &lt;strong&gt;However&lt;/strong&gt;, when I put the same code in to my shiny new &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt; application and run it through debug I get myself a nice little error.  The error message itself is a little bit on the ambiguous as we sometimes come to expect from technologies in their infancy.  Essentially the error I got was "&lt;em&gt;Security error&lt;/em&gt;".  Gee, thanks for that?!&lt;/p&gt;

&lt;p&gt;Digging a  little deeper in tot eh actual exception, we get the stack etc and the actual error (sort of):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;SecurityException&lt;/p&gt;

  &lt;p&gt;at MS.Internal.InternalWebRequest.Send()
    &lt;br /&gt;at System.Net.BrowserHttpWebRequest.BeginGetResponseImplementation()

    &lt;br /&gt;at System.Net.BrowserHttpWebRequest.InternalBeginGetResponse(AsyncCallback callback, Object state)

    &lt;br /&gt;at System.Net.AsyncHelper.BeginOnUI(BeginMethod beginMethod, AsyncCallback callback, Object state)

    &lt;br /&gt;at System.Net.BrowserHttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)

    &lt;br /&gt;at InteraktingMainFeed.Page.GetMainFeed()

    &lt;br /&gt;at InteraktingMainFeed.Page..ctor()

    &lt;br /&gt;at InteraktingMainFeed.App.Application_Startup(Object sender, StartupEventArgs e)

    &lt;br /&gt;at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)

    &lt;br /&gt;at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I was trying everything to fix this until I hit upon the idea of taking Casini (Visual Studio's web server) out of the question (just in case) and setting up a virtual directory on my local IIS to server the &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt; web app.&lt;/p&gt;

&lt;p&gt;That actually fixes it.  I don't know why this effects the way the &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt; app works, but it does.  It's highly frustrating and in my opinion completely under-tested.  As developers, we generally need to be able to debug our applications but there is now a nice hurdle in the way and you can't just use F5.  Basically, I'm going to have to attach to the web process to debug.  It's not the end of the world, but it would be nice if I could just debug the lazy way.&lt;/p&gt;

&lt;p&gt;I can see that picking up &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt; is going to have some nice little challenges along the way.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/mattnield/aggbug/352.aspx" width="1" height="1" /&gt;</description><dc:creator>Matt Nield</dc:creator></item><item><title>Silverlight: Design View/Page Goes Blank</title><link>http://blogs.interakting.co.uk/mattnield/archive/2008/09/17/silverlight-design-viewpage-goes-blank.aspx</link><pubDate>Wed, 17 Sep 2008 03:03:40 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/mattnield/archive/2008/09/17/silverlight-design-viewpage-goes-blank.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/mattnield/comments/351.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/mattnield/comments/commentRss/351.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/mattnield/archive/2008/09/17/silverlight-design-viewpage-goes-blank.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/mattnield/services/trackbacks/351.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/mattnield/rss.aspx">Silverlight: Design View/Page Goes Blank</source><description>&lt;p&gt;My previous post talks about learning some &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt; and going through some of &lt;a href="javascript:void(0);/*1221653095867*/"&gt;ScottGu's articles about getting started&lt;/a&gt; with &lt;a title="Microsoft Silverlight" href="http://silverlight.net/" rel="" target="_blank"&gt;Silverlight&lt;/a&gt;.  As I have been trundling through then I have started to notice one thing that is getting particularly irritating.&lt;/p&gt;
&lt;p&gt;When you're styling up your application, you need to be &lt;strong&gt;&lt;em&gt;very careful&lt;/em&gt;&lt;/strong&gt; about typing the Setter properties correctly.  I admit, I am using &lt;a title="Visual Studio" href="http://msdn.microsoft.com/vstudio/" target="_blank"&gt;Visual Studio&lt;/a&gt; and not Expression &amp;lt;&lt;em&gt;insert useful variant here&lt;/em&gt;&amp;gt;, but I would still expect a little more intelligence or when editing the XAML.&lt;/p&gt;
&lt;p&gt;Let me explain...&lt;/p&gt;
&lt;p&gt;Consider the following XAML from my App.xaml file in Scott's article:&lt;/p&gt;
&lt;div class="csharpcode-wrapper"&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="ThumbNailPreview"&lt;/span&gt; &lt;span class="attr"&gt;TargetType&lt;/span&gt;&lt;span class="kwrd"&gt;="Image"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="VerticleAlignment"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;     &lt;span class="kwrd"&gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Margin"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="7,7,5,5"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;     &lt;span class="kwrd"&gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Height"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="55"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;     &lt;span class="kwrd"&gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;="Width"&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="55"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Note how (me being me), I have spelt VerticalAlignment incorrectly.  The result of this will be that the part of the XAML that uses that Style will not render correctly and seems to cause the entire application to '&lt;em&gt;white-out&lt;/em&gt;'.  Now, when this is a Style that is visible to us at design-time, then the design view of the XAML will go blank and we'll get some kind of indication that something is not correct.  We don't know what is incorrect and no compilation errors appear.  In which case, get someone to check your code over for you (at the end of the day, you typed it wrong and someone else will probably pick up your mistake quicker, we all know how it is ^^).&lt;/p&gt;
&lt;p&gt;So cool, we can fix the problem - lovely.  &lt;strong&gt;However&lt;/strong&gt;, if the Style is being used by a control that is in a template for data binding, the problem does not reveal itself in design view insider &lt;a title="Visual Studio" href="http://msdn.microsoft.com/vstudio/" target="_blank"&gt;Visual Studio&lt;/a&gt;.  It lurks somewhere in a dark corner waiting for you to run your application and bind some data to it.  At which point; BLAM!, you're application pulls a whitey and the screen goes blank.  Ye then need to go back to &lt;a title="Visual Studio" href="http://msdn.microsoft.com/vstudio/" target="_blank"&gt;Visual Studio&lt;/a&gt; and figure out what was wrong.  Again, get someone to look over your shoulder perhaps to quickly spot your blatant typo.&lt;/p&gt;
&lt;p&gt;I'm sure Expression Whatever is very good at all this Style stuff, and I will shortly try it out, but I really was hoping for better intellisense in &lt;a title="Visual Studio" href="http://msdn.microsoft.com/vstudio/" target="_blank"&gt;Visual Studio&lt;/a&gt; to let me know what properties I can use in setters for the Style's TargetType.  Maybe v.Next will do this?  that would be nice.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/mattnield/aggbug/351.aspx" width="1" height="1" /&gt;</description><dc:creator>Matt Nield</dc:creator></item><item><title>Silverlight: Getting Started</title><link>http://blogs.interakting.co.uk/mattnield/archive/2008/09/16/silverlight-getting-started.aspx</link><pubDate>Tue, 16 Sep 2008 03:00:52 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/mattnield/archive/2008/09/16/silverlight-getting-started.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/mattnield/comments/350.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/mattnield/comments/commentRss/350.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/mattnield/archive/2008/09/16/silverlight-getting-started.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/mattnield/services/trackbacks/350.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/mattnield/rss.aspx">Silverlight: Getting Started</source><description>&lt;p&gt;I found myself with a little time between &lt;a target="_blank" href="http://www.microsoft.com/biztalk/default.mspx" title="BizTalk Server"&gt;BizTalk Server&lt;/a&gt; tasks recently and decided it was high time I took a look at trying out &lt;a target="_blank" rel="" href="http://silverlight.net/" title="Microsoft Silverlight"&gt;Silverlight&lt;/a&gt; and seeing what it is worth.  It's still early days for me at the moment, but I thought I would share my starting point.&lt;/p&gt;
&lt;p&gt;I was lucky enough to find a &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx" title="First Look at Silverlight"&gt;series of posts buy Scott Guthrie&lt;/a&gt; that give a good 8-step tutorial on building a &lt;a target="_blank" rel="" href="http://silverlight.net/" title="Microsoft Silverlight"&gt;Silverlight&lt;/a&gt; application in &lt;a target="_blank" href="http://msdn.microsoft.com/vstudio/" title="Visual Studio"&gt;Visual Studio&lt;/a&gt; 2008.&lt;/p&gt;
&lt;p&gt;I've really only just started and am taking the time to read some surrounding content on the web about each step, but I have to say that it looks quite impressive so far (as I think we all know).&lt;/p&gt;
&lt;p&gt;One thing I did notice is that the WatermarkedTextBox control seems to have been removed from the current release of &lt;a target="_blank" rel="" href="http://silverlight.net/" title="Microsoft Silverlight"&gt;Silverlight&lt;/a&gt; and there at present does not seem to be a Watermark option on the standard TexBox control, but that's a pretty small issue when I'm effectively just getting to grips with it.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/mattnield/aggbug/350.aspx" width="1" height="1" /&gt;</description><dc:creator>Matt Nield</dc:creator></item><item><title>.Net: Methods with a Variable Number of Arguments</title><link>http://blogs.interakting.co.uk/mattnield/archive/2008/09/12/.net-methods-with-a-variable-number-of-arguments.aspx</link><pubDate>Fri, 12 Sep 2008 08:02:42 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/mattnield/archive/2008/09/12/.net-methods-with-a-variable-number-of-arguments.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/mattnield/comments/349.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/mattnield/comments/commentRss/349.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/mattnield/archive/2008/09/12/.net-methods-with-a-variable-number-of-arguments.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/mattnield/services/trackbacks/349.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/mattnield/rss.aspx">.Net: Methods with a Variable Number of Arguments</source><description>&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Quite often we want to be able to perform the same operation on some information given a differing number of arguments.  Typically, you might pass these arguments in as an array, thus avoiding the need to specify the number of arguments.  In order to call a function like this, we then need to go ahead and build and array of to pass in our arguments.  To me that seems like a little bit of an effort, at each point in my application, I know how many things I want to pass in.  So how else can I do this?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now, consider the funtion &lt;a title="System.String.Format() on MSDN" href="http://msdn.microsoft.com/en-us/library/fht0f5be.aspx"&gt;System.String.Format().&lt;/a&gt;  In one form, the Format function can take a string and an array of type Objects.  A typical call to String.Format will be as follows:&lt;/p&gt;  &lt;div class="csharpcode-wrapper"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; myString = System.String.Format(
    &lt;span class="str"&gt;"Employee #{0} had been with the company since {1}{2}"&lt;/span&gt;,
    currentEmployee.Number,
    currentEmployee.ContractCommenceDate.ToShortDateString(),
    Environment.NewLine
    );&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Notice that our array of objects is represented as a comma separated list.  Lets see what happens if we try this and create a simple console application as follows:&lt;/p&gt;

&lt;div class="csharpcode-wrapper"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; VariadicFunctions
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            Console.WriteLine(
                Concat(
                    &lt;span class="str"&gt;"String 1 "&lt;/span&gt;,
                    &lt;span class="str"&gt;"String 2 "&lt;/span&gt;,
                    &lt;span class="str"&gt;"Stirng 3 "&lt;/span&gt;
                    )
                );
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Glue a lots of strings together in to the mother of all strings.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name="myStrings"&amp;gt;A collection of obedient strings&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;The mother of all strings&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; String Concat(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] myStrings)
        {
            StringBuilder sBuild = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder();

            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (String str &lt;span class="kwrd"&gt;in&lt;/span&gt; myStrings)
            {
                sBuild.Append(str);
            }

            &lt;span class="kwrd"&gt;return&lt;/span&gt; sBuild.ToString();
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;When we compile, we get an error telling us "&lt;em&gt;No overload for method 'Concat' takes '3' arguments&lt;/em&gt;".  That makes sense, the method is looking for a string array, not a load of separate strings.  What we need to do is turn this in to what is know as a &lt;strong&gt;Variadic Function&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A variadic functions is a function that takes an variable number of arguments.  Essentially, to turn our function 'Concat' in to a variadic function we just need to use the &lt;a title="Params keywork on MSDN" href="http://msdn.microsoft.com/en-gb/library/w5zay9db.aspx"&gt;params keyword&lt;/a&gt;.  What this keyword does is, in simple-speak, allows us to enter our additional arguments in a comma separated list.  Simply adding this keyword in will then allow us to comma-separate our arguments:&lt;/p&gt;

&lt;div class="csharpcode-wrapper"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; VariadicFunctions
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            Console.WriteLine(
                Concat(
                    &lt;span class="str"&gt;"String 1 "&lt;/span&gt;,
                    &lt;span class="str"&gt;"String 2 "&lt;/span&gt;,
                    &lt;span class="str"&gt;"Stirng 3 "&lt;/span&gt;
                    )
                );
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Glue a lots of strings together in to the mother of all strings.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name="myStrings"&amp;gt;A collection of obedient strings&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;The mother of all strings&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; String Concat(&lt;span class="kwrd"&gt;params&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] myStrings)
        {
            StringBuilder sBuild = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder();

            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (String str &lt;span class="kwrd"&gt;in&lt;/span&gt; myStrings)
            {
                sBuild.Append(str);
            }

            &lt;span class="kwrd"&gt;return&lt;/span&gt; sBuild.ToString();
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And there we go, no build errors, we can add as many stings as we like without issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Variadic Functions on Wikipedia: &lt;a title="http://en.wikipedia.org/wiki/Varargs" href="http://en.wikipedia.org/wiki/Varargs"&gt;http://en.wikipedia.org/wiki/Varargs&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;Params Keyword on MSDN: &lt;a title="http://msdn.microsoft.com/en-gb/library/w5zay9db.aspx" href="http://msdn.microsoft.com/en-gb/library/w5zay9db.aspx"&gt;http://msdn.microsoft.com/en-gb/library/w5zay9db.aspx&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Keywords:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Variadic, params, arguments array, variable arguments, variable parameters, parameters array &lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blogs.interakting.co.uk/mattnield/aggbug/349.aspx" width="1" height="1" /&gt;</description><dc:creator>Matt Nield</dc:creator></item><item><title>StreamReader.BaseStream.Position isn't changing after calling StreamReader.ReadLine()</title><link>http://blogs.interakting.co.uk/dominicz/archive/2008/09/05/streamreader.basestream.position-isnt-changing-after-calling-streamreader.readline-yet-again.aspx</link><pubDate>Fri, 05 Sep 2008 04:28:56 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/dominicz/archive/2008/09/05/streamreader.basestream.position-isnt-changing-after-calling-streamreader.readline-yet-again.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/dominicz/comments/348.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/dominicz/comments/commentRss/348.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/dominicz/archive/2008/09/05/streamreader.basestream.position-isnt-changing-after-calling-streamreader.readline-yet-again.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/dominicz/services/trackbacks/348.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/dominicz/rss.aspx">StreamReader.BaseStream.Position isn't changing after calling StreamReader.ReadLine()</source><description>&lt;p&gt;I was trying to parse a file which was divided into numerous parts - each one 12 lines long. For debugging, I was interested in how fast the file was being read and processed and therefore looked at the &lt;code&gt;StreamReader.BaseStream.Position&lt;/code&gt; property. Here is an example of what I was trying to do:&lt;/p&gt;
&lt;div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; height: 313px; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; Program&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Main(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; filename = &lt;span style="color: rgb(0, 96, 128);"&gt;@"C:\windows\windowsupdate.log"&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; filenameBackup = filename + &lt;span style="color: rgb(0, 96, 128);"&gt;".bac"&lt;/span&gt;;&lt;br /&gt;        File.Copy(filename, filenameBackup);&lt;br /&gt;&lt;br /&gt;        FileStream fs = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; FileStream(filenameBackup, FileMode.Open, FileAccess.Read);&lt;br /&gt;        StreamReader sr = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; StreamReader(fs);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; lineNumber = 0;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;while&lt;/span&gt; (!sr.EndOfStream)&lt;br /&gt;        {&lt;br /&gt;            Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;"Lines Read = {0}, Position = {1}"&lt;/span&gt;, lineNumber, sr.BaseStream.Position);&lt;br /&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] lines = ReadXLines(sr,5);&lt;br /&gt;            lineNumber += lines.Length;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Console.Read();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] ReadXLines(StreamReader sr, &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; linesToRead)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] lines = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[linesToRead];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; lineNumber = 0; lineNumber &amp;lt; lines.Length; lineNumber++)&lt;br /&gt;        {&lt;br /&gt;            lines[lineNumber] = sr.ReadLine();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; lines;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Now, the output on my computer was this:&lt;/p&gt;
&lt;code&gt;   &lt;/code&gt;
&lt;p&gt;Lines Read = 0, Position = &lt;strong&gt;1024&lt;/strong&gt;       &lt;br /&gt;
Lines Read = 5, Position = &lt;strong&gt;1024&lt;/strong&gt;       &lt;br /&gt;
Lines Read = 10, Position = &lt;strong&gt;1024&lt;/strong&gt;       &lt;br /&gt;
Lines Read = 15, Position = 2048       &lt;br /&gt;
Lines Read = 20, Position = 2048       &lt;br /&gt;
Lines Read = 25, Position = 3072       &lt;br /&gt;
Lines Read = 30, Position = 3072       &lt;br /&gt;
Lines Read = 35, Position = 4096       &lt;br /&gt;
Lines Read = 40, Position = 5120       &lt;br /&gt;
Lines Read = 45, Position = 5120       &lt;br /&gt;
Lines Read = 50, Position = 6144       &lt;br /&gt;
Lines Read = 55, Position = 7168       &lt;br /&gt;
Lines Read = 60, Position = 7168       &lt;br /&gt;
Lines Read = 65, Position = 8192       &lt;br /&gt;
Lines Read = 70, Position = 8192       &lt;br /&gt;
Lines Read = 75, Position = 9216       &lt;br /&gt;
Lines Read = 80, Position = 9216       &lt;br /&gt;
Lines Read = 85, Position = 10240       &lt;br /&gt;
Lines Read = 90, Position = 10240       &lt;br /&gt;
Lines Read = 95, Position = 11264       &lt;br /&gt;
Lines Read = 100, Position = 11264       &lt;br /&gt;
Lines Read = 105, Position = 12288       &lt;br /&gt;
......      &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;What is odd about this sequence is that the position of the &lt;code&gt;FileStream&lt;/code&gt; is already at 1024 before anything has been read! Also, the 1024 position stays the same for 2 reads. Why is this?&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;StreamReader&lt;/code&gt; class is a buffered reader. Therefore, it is reading the stream before anything is processed and when reading directly from &lt;code&gt;StreamReader&lt;/code&gt;, if the amount read does not extract the entire buffer, then the position of the underlying stream doesn't change.&lt;/p&gt;
&lt;p&gt;Unfortunately, there is nothing you can do about this. Therefore the only 2 ways you can keep track of the position is to:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Count how many characters are in each line (plus the &lt;code&gt;Environment.Newline&lt;/code&gt;) and total up the position line by line.&lt;/li&gt;
    &lt;li&gt;Create your own implementation of the &lt;code&gt;FileStream&lt;/code&gt;, which has a ReadLine() method. This method should continue to read the Stream until Environment.Newline is encountered. Remember, &lt;code&gt;Environment.Newline&lt;/code&gt; is not included in the string returned.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blogs.interakting.co.uk/dominicz/aggbug/348.aspx" width="1" height="1" /&gt;</description><dc:creator>Dominic</dc:creator></item><item><title>Security: Google retracts its privacy clauses</title><link>http://blogs.interakting.co.uk/steve/archive/2008/09/04/security-google-retracts-its-privacy-clauses.aspx</link><pubDate>Thu, 04 Sep 2008 00:26:39 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/steve/archive/2008/09/04/security-google-retracts-its-privacy-clauses.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/steve/comments/345.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/steve/comments/commentRss/345.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/steve/archive/2008/09/04/security-google-retracts-its-privacy-clauses.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/steve/services/trackbacks/345.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/steve/rss.aspx">Security: Google retracts its privacy clauses</source><description>&lt;p&gt;Since yesterday, and my post about Google Chrome, Google has updated its terms and conditions and removed the clauses.  See my previous post here: &lt;a title="http://blogs.interakting.co.uk/steve/archive/2008/09/03/security-how-much-do-you-trust-google.aspx" href="http://blogs.interakting.co.uk/steve/archive/2008/09/03/security-how-much-do-you-trust-google.aspx"&gt;Security: How much do you trust Google?&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Privacy clauses&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Section 11 has been completed rewritten.  Note that this is the only change in the terms of service, even the date has not been changed:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;11. Content license from you&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Looks a bit different to the previous clause.  Specifically, the following has been removed:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;11.1 ... By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services. This license is for the sole purpose of enabling Google to display, distribute and promote the Services and may be revoked for certain Services as defined in the Additional Terms of those Services.&lt;/p&gt;
&lt;p&gt;11.2 You agree that this license includes a right for Google to make such Content available to other companies, organizations or individuals with whom Google has relationships for the provision of syndicated services, and to use such Content in connection with the provision of those services.&lt;/p&gt;
&lt;p&gt;11.3 You understand that Google, in performing the required technical steps to provide the Services to our users, may (a) transmit or distribute your Content over various public networks and in various media; and (b) make such changes to your Content as are necessary to conform and adapt that Content to the technical requirements of connecting networks, devices, services or media. You agree that this license shall permit Google to take these actions.&lt;/p&gt;
&lt;p&gt;11.4 You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above license.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Terms and conditions (still dated 15 August 2008) in full&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;h5&gt;Google Chrome Terms of Service&lt;/h5&gt;
&lt;p&gt;These Terms of Service apply to the executable code version of Google Chrome. Source code for Google Chrome is available free of charge under open source software license agreements at &lt;a href="http://code.google.com/chromium/terms.html"&gt;http://code.google.com/chromium/terms.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Your relationship with Google&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1.1 Your use of Google’s products, software, services and web sites (referred to collectively as the “Services” in this document and excluding any services provided to you by Google under a separate written agreement) is subject to the terms of a legal agreement between you and Google. “Google” means Google Inc., whose principal place of business is at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. This document explains how the agreement is made up, and sets out some of the terms of that agreement.&lt;/p&gt;
&lt;p&gt;1.2 Unless otherwise agreed in writing with Google, your agreement with Google will always include, at a minimum, the terms and conditions set out in this document. These are referred to below as the “Universal Terms”. Open source software licenses for Google Chrome source code constitute separate written agreements. To the limited extent that the open source software licenses expressly supersede these Universal Terms, the open source licenses govern your agreement with Google for the use of Google Chrome or specific included components of Google Chrome.&lt;/p&gt;
&lt;p&gt;1.3 Your agreement with Google will also include the terms of any Legal Notices applicable to the Services, in addition to the Universal Terms. All of these are referred to below as the “Additional Terms”. Where Additional Terms apply to a Service, these will be accessible for you to read either within, or through your use of, that Service.&lt;/p&gt;
&lt;p&gt;1.4 The Universal Terms, together with the Additional Terms, form a legally binding agreement between you and Google in relation to your use of the Services. It is important that you take the time to read them carefully. Collectively, this legal agreement is referred to below as the “Terms”.&lt;/p&gt;
&lt;p&gt;1.5 If there is any contradiction between what the Additional Terms say and what the Universal Terms say, then the Additional Terms shall take precedence in relation to that Service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Accepting the Terms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;2.1 In order to use the Services, you must first agree to the Terms. You may not use the Services if you do not accept the Terms.&lt;/p&gt;
&lt;p&gt;2.2 You can accept the Terms by:&lt;/p&gt;
&lt;p&gt;(A) clicking to accept or agree to the Terms, where this option is made available to you by Google in the user interface for any Service; or&lt;/p&gt;
&lt;p&gt;(B) by actually using the Services. In this case, you understand and agree that Google will treat your use of the Services as acceptance of the Terms from that point onwards.&lt;/p&gt;
&lt;p&gt;2.3 You may not use the Services and may not accept the Terms if (a) you are not of legal age to form a binding contract with Google, or (b) you are a person barred from receiving the Services under the laws of the United States or other countries including the country in which you are resident or from which you use the Services.&lt;/p&gt;
&lt;p&gt;2.4 Before you continue, you should print off or save a local copy of the Universal Terms for your records.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Language of the Terms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3.1 Where Google has provided you with a translation of the English language version of the Terms, then you agree that the translation is provided for your convenience only and that the English language versions of the Terms will govern your relationship with Google.&lt;/p&gt;
&lt;p&gt;3.2 If there is any contradiction between what the English language version of the Terms says and what a translation says, then the English language version shall take precedence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Provision of the Services by Google&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;4.1 Google has subsidiaries and affiliated legal entities around the world (“Subsidiaries and Affiliates”). Sometimes, these companies will be providing the Services to you on behalf of Google itself. You acknowledge and agree that Subsidiaries and Affiliates will be entitled to provide the Services to you.&lt;/p&gt;
&lt;p&gt;4.2 Google is constantly innovating in order to provide the best possible experience for its users. You acknowledge and agree that the form and nature of the Services which Google provides may change from time to time without prior notice to you.&lt;/p&gt;
&lt;p&gt;4.3 As part of this continuing innovation, you acknowledge and agree that Google may stop (permanently or temporarily) providing the Services (or any features within the Services) to you or to users generally at Google’s sole discretion, without prior notice to you. You may stop using the Services at any time. You do not need to specifically inform Google when you stop using the Services.&lt;/p&gt;
&lt;p&gt;4.4 You acknowledge and agree that if Google disables access to your account, you may be prevented from accessing the Services, your account details or any files or other content which is contained in your account.&lt;/p&gt;
&lt;p&gt;4.5 You acknowledge and agree that while Google may not currently have set a fixed upper limit on the number of transmissions you may send or receive through the Services or on the amount of storage space used for the provision of any Service, such fixed upper limits may be set by Google at any time, at Google’s discretion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Use of the Services by you&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;5.1 In order to access certain Services, you may be required to provide information about yourself (such as identification or contact details) as part of the registration process for the Service, or as part of your continued use of the Services. You agree that any registration information you give to Google will always be accurate, correct and up to date.&lt;/p&gt;
&lt;p&gt;5.2 You agree to use the Services only for purposes that are permitted by (a) the Terms and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).&lt;/p&gt;
&lt;p&gt;5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.&lt;/p&gt;
&lt;p&gt;5.4 You agree that you will not engage in any activity that interferes with or disrupts the Services (or the servers and networks which are connected to the Services).&lt;/p&gt;
&lt;p&gt;5.5 Unless you have been specifically permitted to do so in a separate agreement with Google, you agree that you will not reproduce, duplicate, copy, sell, trade or resell the Services for any purpose.&lt;/p&gt;
&lt;p&gt;5.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the Terms and for the consequences (including any loss or damage which Google may suffer) of any such breach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Your passwords and account security&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;6.1 You agree and understand that you are responsible for maintaining the confidentiality of passwords associated with any account you use to access the Services.&lt;/p&gt;
&lt;p&gt;6.2 Accordingly, you agree that you will be solely responsible to Google for all activities that occur under your account.&lt;/p&gt;
&lt;p&gt;6.3 If you become aware of any unauthorized use of your password or of your account, you agree to notify Google immediately at &lt;a href="http://www.google.com/support/accounts/bin/answer.py?answer=48601"&gt;http://www.google.com/support/accounts/bin/answer.py?answer=48601&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. Privacy and your personal information&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;7.1 For information about Google’s data protection practices, please read Google’s privacy policy at &lt;a href="http://www.google.com/privacy.html"&gt;http://www.google.com/privacy.html&lt;/a&gt;. This policy explains how Google treats your personal information, and protects your privacy, when you use the Services.&lt;/p&gt;
&lt;p&gt;7.2 You agree to the use of your data in accordance with Google’s privacy policies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8. Content in the Services&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;8.1 You understand that all information (such as data files, written text, computer software, music, audio files or other sounds, photographs, videos or other images) which you may have access to as part of, or through your use of, the Services are the sole responsibility of the person from which such content originated. All such information is referred to below as the “Content”.&lt;/p&gt;
&lt;p&gt;8.2 You should be aware that Content presented to you as part of the Services, including but not limited to advertisements in the Services and sponsored Content within the Services may be protected by intellectual property rights which are owned by the sponsors or advertisers who provide that Content to Google (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this Content (either in whole or in part) unless you have been specifically told that you may do so by Google or by the owners of that Content, in a separate agreement.&lt;/p&gt;
&lt;p&gt;8.3 Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Content from any Service. For some of the Services, Google may provide tools to filter out explicit sexual content. These tools include the SafeSearch preference settings (see &lt;a href="http://www.google.com/help/customize.html#safe"&gt;http://www.google.com/help/customize.html#safe&lt;/a&gt;). In addition, there are commercially available services and software to limit access to material that you may find objectionable.&lt;/p&gt;
&lt;p&gt;8.4 You understand that by using the Services you may be exposed to Content that you may find offensive, indecent or objectionable and that, in this respect, you use the Services at your own risk.&lt;/p&gt;
&lt;p&gt;8.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any Content that you create, transmit or display while using the Services and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. Proprietary rights&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;9.1 You acknowledge and agree that Google (or Google’s licensors) own all legal right, title and interest in and to the Services, including any intellectual property rights which subsist in the Services (whether those rights happen to be registered or not, and wherever in the world those rights may exist). You further acknowledge that the Services may contain information which is designated confidential by Google and that you shall not disclose such information without Google’s prior written consent.&lt;/p&gt;
&lt;p&gt;9.2 Unless you have agreed otherwise in writing with Google, nothing in the Terms gives you a right to use any of Google’s trade names, trade marks, service marks, logos, domain names, and other distinctive brand features.&lt;/p&gt;
&lt;p&gt;9.3 If you have been given an explicit right to use any of these brand features in a separate written agreement with Google, then you agree that your use of such features shall be in compliance with that agreement, any applicable provisions of the Terms, and Google's brand feature use guidelines as updated from time to time. These guidelines can be viewed online at &lt;a href="http://www.google.com/permissions/guidelines.html"&gt;http://www.google.com/permissions/guidelines.html&lt;/a&gt; (or such other URL as Google may provide for this purpose from time to time).&lt;/p&gt;
&lt;p&gt;9.4 Other than the limited license set forth in Section 11, Google acknowledges and agrees that it obtains no right, title or interest from you (or your licensors) under these Terms in or to any Content that you submit, post, transmit or display on, or through, the Services, including any intellectual property rights which subsist in that Content (whether those rights happen to be registered or not, and wherever in the world those rights may exist). Unless you have agreed otherwise in writing with Google, you agree that you are responsible for protecting and enforcing those rights and that Google has no obligation to do so on your behalf.&lt;/p&gt;
&lt;p&gt;9.5 You agree that you shall not remove, obscure, or alter any proprietary rights notices (including copyright and trade mark notices) which may be affixed to or contained within the Services.&lt;/p&gt;
&lt;p&gt;9.6 Unless you have been expressly authorized to do so in writing by Google, you agree that in using the Services, you will not use any trade mark, service mark, trade name, logo of any company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. License from Google&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;10.1 Google gives you a personal, worldwide, royalty-free, non-assignable and non-exclusive license to use the software provided to you by Google as part of the Services as provided to you by Google (referred to as the “Software” below). This license is for the sole purpose of enabling you to use and enjoy the benefit of the Services as provided by Google, in the manner permitted by the Terms.&lt;/p&gt;
&lt;p&gt;10.2 You may not (and you may not permit anyone else to) copy, modify, create a derivative work of, reverse engineer, decompile or otherwise attempt to extract the source code of the Software or any part thereof, unless this is expressly permitted or required by law, or unless you have been specifically told that you may do so by Google, in writing.&lt;/p&gt;
&lt;p&gt;10.3 Unless Google has given you specific written permission to do so, you may not assign (or grant a sub-license of) your rights to use the Software, grant a security interest in or over your rights to use the Software, or otherwise transfer any part of your rights to use the Software.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11. Content license from you&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12. Software updates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;12.1 The Software which you use may automatically download and install updates from time to time from Google. These updates are designed to improve, enhance and further develop the Services and may take the form of bug fixes, enhanced functions, new software modules and completely new versions. You agree to receive such updates (and permit Google to deliver these to you) as part of your use of the Services.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13. Ending your relationship with Google&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;13.1 The Terms will continue to apply until terminated by either you or Google as set out below.&lt;/p&gt;
&lt;p&gt;13.2 If you want to terminate your legal agreement with Google, you may do so by (a) notifying Google at any time and (b) closing your accounts for all of the Services which you use, where Google has made this option available to you. Your notice should be sent, in writing, to Google’s address which is set out at the beginning of these Terms.&lt;/p&gt;
&lt;p&gt;13.3 Google may at any time, terminate its legal agreement with you if:&lt;/p&gt;
&lt;p&gt;(A) you have breached any provision of the Terms (or have acted in manner which clearly shows that you do not intend to, or are unable to comply with the provisions of the Terms); or&lt;/p&gt;
&lt;p&gt;(B) Google is required to do so by law (for example, where the provision of the Services to you is, or becomes, unlawful); or&lt;/p&gt;
&lt;p&gt;(C) the partner with whom Google offered the Services to you has terminated its relationship with Google or ceased to offer the Services to you; or&lt;/p&gt;
&lt;p&gt;(D) Google is transitioning to no longer providing the Services to users in the country in which you are resident or from which you use the service; or&lt;/p&gt;
&lt;p&gt;(E) the provision of the Services to you by Google is, in Google’s opinion, no longer commercially viable.&lt;/p&gt;
&lt;p&gt;13.4 Nothing in this Section shall affect Google’s rights regarding provision of Services under Section 4 of the Terms.&lt;/p&gt;
&lt;p&gt;13.5 When these Terms come to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the Terms have been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 20.7 shall continue to apply to such rights, obligations and liabilities indefinitely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14. EXCLUSION OF WARRANTIES&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;14.1 NOTHING IN THESE TERMS, INCLUDING SECTIONS 14 AND 15, SHALL EXCLUDE OR LIMIT GOOGLE’S WARRANTY OR LIABILITY FOR LOSSES WHICH MAY NOT BE LAWFULLY EXCLUDED OR LIMITED BY APPLICABLE LAW. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR CONDITIONS OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR LOSS OR DAMAGE CAUSED BY NEGLIGENCE, BREACH OF CONTRACT OR BREACH OF IMPLIED TERMS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, ONLY THE LIMITATIONS WHICH ARE LAWFUL IN YOUR JURISDICTION WILL APPLY TO YOU AND OUR LIABILITY WILL BE LIMITED TO THE MAXIMUM EXTENT PERMITTED BY LAW.&lt;/p&gt;
&lt;p&gt;14.2 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SERVICES IS AT YOUR SOLE RISK AND THAT THE SERVICES ARE PROVIDED "AS IS" AND “AS AVAILABLE.”&lt;/p&gt;
&lt;p&gt;14.3 IN PARTICULAR, GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS DO NOT REPRESENT OR WARRANT TO YOU THAT:&lt;/p&gt;
&lt;p&gt;(A) YOUR USE OF THE SERVICES WILL MEET YOUR REQUIREMENTS,&lt;/p&gt;
&lt;p&gt;(B) YOUR USE OF THE SERVICES WILL BE UNINTERRUPTED, TIMELY, SECURE OR FREE FROM ERROR,&lt;/p&gt;
&lt;p&gt;(C) ANY INFORMATION OBTAINED BY YOU AS A RESULT OF YOUR USE OF THE SERVICES WILL BE ACCURATE OR RELIABLE, AND&lt;/p&gt;
&lt;p&gt;(D) THAT DEFECTS IN THE OPERATION OR FUNCTIONALITY OF ANY SOFTWARE PROVIDED TO YOU AS PART OF THE SERVICES WILL BE CORRECTED.&lt;/p&gt;
&lt;p&gt;14.4 ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SERVICES IS DONE AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF ANY SUCH MATERIAL.&lt;/p&gt;
&lt;p&gt;14.5 NO ADVICE OR INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM GOOGLE OR THROUGH OR FROM THE SERVICES SHALL CREATE ANY WARRANTY NOT EXPRESSLY STATED IN THE TERMS.&lt;/p&gt;
&lt;p&gt;14.6 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15. LIMITATION OF LIABILITY&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;15.1 SUBJECT TO OVERALL PROVISION IN PARAGRAPH 14.1 ABOVE, YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU FOR:&lt;/p&gt;
&lt;p&gt;(A) ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES WHICH MAY BE INCURRED BY YOU, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY.. THIS SHALL INCLUDE, BUT NOT BE LIMITED TO, ANY LOSS OF PROFIT (WHETHER INCURRED DIRECTLY OR INDIRECTLY), ANY LOSS OF GOODWILL OR BUSINESS REPUTATION, ANY LOSS OF DATA SUFFERED, COST OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR OTHER INTANGIBLE LOSS;&lt;/p&gt;
&lt;p&gt;(B) ANY LOSS OR DAMAGE WHICH MAY BE INCURRED BY YOU, INCLUDING BUT NOT LIMITED TO LOSS OR DAMAGE AS A RESULT OF:&lt;/p&gt;
&lt;p&gt;(I) ANY RELIANCE PLACED BY YOU ON THE COMPLETENESS, ACCURACY OR EXISTENCE OF ANY ADVERTISING, OR AS A RESULT OF ANY RELATIONSHIP OR TRANSACTION BETWEEN YOU AND ANY ADVERTISER OR SPONSOR WHOSE ADVERTISING APPEARS ON THE SERVICES;&lt;/p&gt;
&lt;p&gt;(II) ANY CHANGES WHICH GOOGLE MAY MAKE TO THE SERVICES, OR FOR ANY PERMANENT OR TEMPORARY CESSATION IN THE PROVISION OF THE SERVICES (OR ANY FEATURES WITHIN THE SERVICES);&lt;/p&gt;
&lt;p&gt;(III) THE DELETION OF, CORRUPTION OF, OR FAILURE TO STORE, ANY CONTENT AND OTHER COMMUNICATIONS DATA MAINTAINED OR TRANSMITTED BY OR THROUGH YOUR USE OF THE SERVICES;&lt;/p&gt;
&lt;p&gt;(III) YOUR FAILURE TO PROVIDE GOOGLE WITH ACCURATE ACCOUNT INFORMATION;&lt;/p&gt;
&lt;p&gt;(IV) YOUR FAILURE TO KEEP YOUR PASSWORD OR ACCOUNT DETAILS SECURE AND CONFIDENTIAL;&lt;/p&gt;
&lt;p&gt;15.2 THE LIMITATIONS ON GOOGLE’S LIABILITY TO YOU IN PARAGRAPH 15.1 ABOVE SHALL APPLY WHETHER OR NOT GOOGLE HAS BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16. Copyright and trade mark policies&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;16.1 It is Google’s policy to respond to notices of alleged copyright infringement that comply with applicable international intellectual property law (including, in the United States, the Digital Millennium Copyright Act) and to terminating the accounts of repeat infringers. Details of Google’s policy can be found at &lt;a href="http://www.google.com/dmca.html"&gt;http://www.google.com/dmca.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;16.2 Google operates a trade mark complaints procedure in respect of Google’s advertising business, details of which can be found at &lt;a href="http://www.google.com/tm_complaint.html"&gt;http://www.google.com/tm_complaint.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;17. Advertisements&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;17.1 Some of the Services are supported by advertising revenue and may display advertisements and promotions. These advertisements may be targeted to the content of information stored on the Services, queries made through the Services or other information.&lt;/p&gt;
&lt;p&gt;17.2 The manner, mode and extent of advertising by Google on the Services are subject to change without specific notice to you.&lt;/p&gt;
&lt;p&gt;17.3 In consideration for Google granting you access to and use of the Services, you agree that Google may place such advertising on the Services.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;18. Other content&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;18.1 The Services may include hyperlinks to other web sites or content or resources. Google may have no control over any web sites or resources which are provided by companies or persons other than Google.&lt;/p&gt;
&lt;p&gt;18.2 You acknowledge and agree that Google is not responsible for the availability of any such external sites or resources, and does not endorse any advertising, products or other materials on or available from such web sites or resources.&lt;/p&gt;
&lt;p&gt;18.3 You acknowledge and agree that Google is not liable for any loss or damage which may be incurred by you as a result of the availability of those external sites or resources, or as a result of any reliance placed by you on the completeness, accuracy or existence of any advertising, products or other materials on, or available from, such web sites or resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;19. Changes to the Terms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;19.1 Google may make changes to the Universal Terms or Additional Terms from time to time. When these changes are made, Google will make a new copy of the Universal Terms available at &lt;a href="http://www.google.com/accounts/TOS?hl=en"&gt;http://www.google.com/accounts/TOS?hl=en&lt;/a&gt; and any new Additional Terms will be made available to you from within, or through, the affected Services.&lt;/p&gt;
&lt;p&gt;19.2 You understand and agree that if you use the Services after the date on which the Universal Terms or Additional Terms have changed, Google will treat your use as acceptance of the updated Universal Terms or Additional Terms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;20. General legal terms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;20.1 Sometimes when you use the Services, you may (as a result of, or through your use of the Services) use a service or download a piece of software, or purchase goods, which are provided by another person or company. Your use of these other services, software or goods may be subject to separate terms between you and the company or person concerned. If so, the Terms do not affect your legal relationship with these other companies or individuals.&lt;/p&gt;
&lt;p&gt;20.2 The Terms constitute the whole legal agreement between you and Google and govern your use of the Services (but excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the Services.&lt;/p&gt;
&lt;p&gt;20.3 You agree that Google may provide you with notices, including those regarding changes to the Terms, by email, regular mail, or postings on the Services.&lt;/p&gt;
&lt;p&gt;20.4 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the Terms (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google’s rights and that those rights or remedies will still be available to Google.&lt;/p&gt;
&lt;p&gt;20.5 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of these Terms is invalid, then that provision will be removed from the Terms without affecting the rest of the Terms. The remaining provisions of the Terms will continue to be valid and enforceable.&lt;/p&gt;
&lt;p&gt;20.6 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the Terms and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the Terms which confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the Terms.&lt;/p&gt;
&lt;p&gt;20.7 The Terms, and your relationship with Google under the Terms, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the Terms. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.&lt;/p&gt;
&lt;p&gt;August 15, 2008&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Metadata&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Categories: Business, IT Management, Security &lt;/li&gt;
    &lt;li&gt;Additional keywords: Google, Google Chrome, Privacy &lt;/li&gt;
    &lt;li&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/security"&gt;security&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/business"&gt;business&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/IT%20Management"&gt;IT Management&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/privacy"&gt;privacy&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Google%20Chrome"&gt;Google Chrome&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blogs.interakting.co.uk/steve/aggbug/345.aspx" width="1" height="1" /&gt;</description><dc:creator>Stephen Horsfield</dc:creator></item><item><title>ActiveSync and Proxy Server</title><link>http://blogs.interakting.co.uk/brad/archive/2008/09/04/activesync-and-proxy-server.aspx</link><pubDate>Wed, 03 Sep 2008 22:38:12 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/brad/archive/2008/09/04/activesync-and-proxy-server.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/brad/comments/344.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/brad/comments/commentRss/344.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/brad/archive/2008/09/04/activesync-and-proxy-server.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/brad/services/trackbacks/344.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/brad/rss.aspx">ActiveSync and Proxy Server</source><description>&lt;p&gt;Our network guys recently added a proxy server to our network which has caused my Windows Mobile device to no longer sync with Exchange via ActiveSync. I thought that's annoying but its ok I will just set the proxy settings in ActiveSync... To my disapointment ActiveSync doenst have that option! &lt;/p&gt;  &lt;p&gt;After some investigation I discovered that if you change the "This computer is connected to:" value to "The Internet" (rather than "Automatic") it works fine!&lt;/p&gt;  &lt;p&gt;So in summary, with your device connected, in ActiveSync go to:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;File &amp;gt; Connection Settings &amp;gt; This computer is connected to: &amp;gt; The Internet&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.interakting.co.uk/brad/aggbug/344.aspx" width="1" height="1" /&gt;</description><dc:creator>Brad</dc:creator></item><item><title>Google Chrome and McAfee Anti Virus</title><link>http://blogs.interakting.co.uk/danmatthews/archive/2008/09/03/google-chrome-and-mcafee-anti-virus.aspx</link><pubDate>Wed, 03 Sep 2008 03:19:29 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/danmatthews/archive/2008/09/03/google-chrome-and-mcafee-anti-virus.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/343.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/343.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/09/03/google-chrome-and-mcafee-anti-virus.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.interakting.co.uk/danmatthews/services/trackbacks/343.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/danmatthews/rss.aspx">Google Chrome and McAfee Anti Virus</source><description>&lt;p&gt;Chrome threw the following error when posting to a forum:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.interakting.co.uk/images/blogs_interakting_co_uk/danmatthews/WindowsLiveWriter/GoogleChromeandMcAfeeAntiVirus_BB9D/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="288" alt="image" src="http://blogs.interakting.co.uk/images/blogs_interakting_co_uk/danmatthews/WindowsLiveWriter/GoogleChromeandMcAfeeAntiVirus_BB9D/image_thumb_1.png" width="634" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;(my login name and domain is deliberately blanked)&lt;/p&gt;  &lt;p&gt;This warning 'Exploit-ObscuredHtml' isn't thrown when doing exactly the same in Internet Explorer, so I'd be interested to know why it's throwing the virus alert. Possibly because it's running the javascript in a separate process to the HTML? Unlikely. More inclined to think it's because it's in the unsecure 'Documents and Settings' folder whereas IE uses the rather more locked-down Temporary Internet Files folder.&lt;/p&gt;  &lt;p&gt;Either way, I can imagine lots of sites would use Javascript that would trigger this and I'd imagine other AV tools would flag it too. Surely the AV vendors and/or Google need to address this somehow? Isn't it a bad place to put files that you will run script? If you have seen this behaviour as well then feel free to post the Url and the name of your AV tool.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/343.aspx" width="1" height="1" /&gt;</description><dc:creator>Dan Matthews</dc:creator></item><item><title>Security: How much do you trust Google?</title><link>http://blogs.interakting.co.uk/steve/archive/2008/09/03/security-how-much-do-you-trust-google.aspx</link><pubDate>Tue, 02 Sep 2008 23:14:41 GMT</pubDate><guid isPermaLink="true">http://blogs.interakting.co.uk/steve/archive/2008/09/03/security-how-much-do-you-trust-google.aspx</guid><wfw:comment>http://blogs.interakting.co.uk/steve/comments/342.aspx</wfw:comment><wfw:commentRss>http://blogs.interakting.co.uk/steve/comments/commentRss/342.aspx</wfw:commentRss><comments>http://blogs.interakting.co.uk/steve/archive/2008/09/03/security-how-much-do-you-trust-google.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.interakting.co.uk/steve/services/trackbacks/342.aspx</trackback:ping><source url="http://blogs.interakting.co.uk/steve/rss.aspx">Security: How much do you trust Google?</source><description>&lt;p&gt;Google has just released a beta of its Google Chrome web browser.  Make sure you read the terms and conditions.  Have a look at the privacy clauses...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Note: Google has updated its terms and conditions.  Read my blog post here: &lt;font face="Arial"&gt;&lt;a title="http://blogs.interakting.co.uk/steve/archive/2008/09/04/security-google-retracts-its-privacy-clauses.aspx" href="http://blogs.interakting.co.uk/steve/archive/2008/09/04/security-google-retracts-its-privacy-clauses.aspx"&gt;Security: Google retracts its privacy clauses&lt;/a&gt;]&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Privacy clauses&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;11. Content license from you&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services. By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services. This license is for the sole purpose of enabling Google to display, distribute and promote the Services and may be revoked for certain Services as defined in the Additional Terms of those Services.&lt;/p&gt;
&lt;p&gt;11.2 You agree that this license includes a right for Google to make such Content available to other companies, organizations or individuals with whom Google has relationships for the provision of syndicated services, and to use such Content in connection with the provision of those services.&lt;/p&gt;
&lt;p&gt;11.3 You understand that Google, in performing the required technical steps to provide the Services to our users, may (a) transmit or distribute your Content over various public networks and in various media; and (b) make such changes to your Content as are necessary to conform and adapt that Content to the technical requirements of connecting networks, devices, services or media. You agree that this license shall permit Google to take these actions.&lt;/p&gt;
&lt;p&gt;11.4 You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above license.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is this something you want?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Terms and conditions (dated 15 August 2008) in full&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;h3&gt;Google Chrome Terms of Service&lt;/h3&gt;
&lt;p&gt;These Terms of Service apply to the executable code version of Google Chrome. Source code for Google Chrome is available free of charge under open source software license agreements at &lt;a href="http://code.google.com/chromium/terms.html"&gt;&lt;font color="#0000ff"&gt;http://code.google.com/chromium/terms.html&lt;/font&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;1. Your relationship with Google&lt;/p&gt;
&lt;p&gt;1.1 Your use of Google’s products, software, services and web sites (referred to collectively as the “Services” in this document and excluding any services provided to you by Google under a separate written agreement) is subject to the terms of a legal agreement between you and Google. “Google” means Google Inc., whose principal place of business is at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. This document explains how the agreement is made up, and sets out some of the terms of that agreement.&lt;/p&gt;
&lt;p&gt;1.2 Unless otherwise agreed in writing with Google, your agreement with Google will always include, at a minimum, the terms and conditions set out in this document. These are referred to below as the “Universal Terms”. Open source software licenses for Google Chrome source code constitute separate written agreements. To the limited extent that the open source software licenses expressly supersede these Universal Terms, the open source licenses govern your agreement with Google for the use of Google Chrome or specific included components of Google Chrome.&lt;/p&gt;
&lt;p&gt;1.3 Your agreement with Google will also include the terms of any Legal Notices applicable to the Services, in addition to the Universal Terms. All of these are referred to below as the “Additional Terms”. Where Additional Terms apply to a Service, these will be accessible for you to read either within, or through your use of, that Service.&lt;/p&gt;
&lt;p&gt;1.4 The Universal Terms, together with the Additional Terms, form a legally binding agreement between you and Google in relation to your use of the Services. It is important that you take the time to read them carefully. Collectively, this legal agreement is referred to below as the “Terms”.&lt;/p&gt;
&lt;p&gt;1.5 If there is any contradiction between what the Additional Terms say and what the Universal Terms say, then the Additional Terms shall take precedence in relation to that Service.&lt;/p&gt;
&lt;p&gt;2. Accepting the Terms&lt;/p&gt;
&lt;p&gt;2.1 In order to use the Services, you must first agree to the Terms. You may not use the Services if you do not accept the Terms.&lt;/p&gt;
&lt;p&gt;2.2 You can accept the Terms by:&lt;/p&gt;
&lt;p&gt;(A) clicking to accept or agree to the Terms, where this option is made available to you by Google in the user interface for any Service; or&lt;/p&gt;
&lt;p&gt;(B) by actually using the Services. In this case, you understand and agree that Google will treat your use of the Services as acceptance of the Terms from that point onwards.&lt;/p&gt;
&lt;p&gt;2.3 You may not use the Services and may not accept the Terms if (a) you are not of legal age to form a binding contract with Google, or (b) you are a person barred from receiving the Services under the laws of the United States or other countries including the country in which you are resident or from which you use the Services.&lt;/p&gt;
&lt;p&gt;2.4 Before you continue, you should print off or save a local copy of the Universal Terms for your records.&lt;/p&gt;
&lt;p&gt;3. Language of the Terms&lt;/p&gt;
&lt;p&gt;3.1 Where Google has provided you with a translation of the English language version of the Terms, then you agree that the translation is provided for your convenience only and that the English language versions of the Terms will govern your relationship with Google.&lt;/p&gt;
&lt;p&gt;3.2 If there is any contradiction between what the English language version of the Terms says and what a translation says, then the English language version shall take precedence.&lt;/p&gt;
&lt;p&gt;4. Provision of the Services by Google&lt;/p&gt;
&lt;p&gt;4.1 Google has subsidiaries and affiliated legal entities around the world (“Subsidiaries and Affiliates”). Sometimes, these companies will be providing the Services to you on behalf of Google itself. You acknowledge and agree that Subsidiaries and Affiliates will be entitled to provide the Services to you.&lt;/p&gt;
&lt;p&gt;4.2 Google is constantly innovating in order to provide the best possible experience for its users. You acknowledge and agree that the form and nature of the Services which Google provides may change from time to time without prior notice to you.&lt;/p&gt;
&lt;p&gt;4.3 As part of this continuing innovation, you acknowledge and agree that Google may stop (permanently or temporarily) providing the Services (or any features within the Services) to you or to users generally at Google’s sole discretion, without prior notice to you. You may stop using the Services at any time. You do not need to specifically inform Google when you stop using the Services.&lt;/p&gt;
&lt;p&gt;4.4 You acknowledge and agree that if Google disables access to your account, you may be prevented from accessing the Services, your account details or any files or other content which is contained in your account.&lt;/p&gt;
&lt;p&gt;4.5 You acknowledge and agree that while Google may not currently have set a fixed upper limit on the number of transmissions you may send or receive through the Services or on the amount of storage space used for the provision of any Service, such fixed upper limits may be set by Google at any time, at Google’s discretion.&lt;/p&gt;
&lt;p&gt;5. Use of the Services by you&lt;/p&gt;
&lt;p&gt;5.1 In order to access certain Services, you may be required to provide information about yourself (such as identification or contact details) as part of the registration process for the Service, or as part of your continued use of the Services. You agree that any registration information you give to Google will always be accurate, correct and up to date.&lt;/p&gt;
&lt;p&gt;5.2 You agree to use the Services only for purposes that are permitted by (a) the Terms and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).&lt;/p&gt;
&lt;p&gt;5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.&lt;/p&gt;
&lt;p&gt;5.4 You agree that you will not engage in any activity that interferes with or disrupts the Services (or the servers and networks which are connected to the Services).&lt;/p&gt;
&lt;p&gt;5.5 Unless you have been specifically permitted to do so in a separate agreement with Google, you agree that you will not reproduce, duplicate, copy, sell, trade or resell the Services for any purpose.&lt;/p&gt;
&lt;p&gt;5.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the Terms and for the consequences (including any loss or damage which Google may suffer) of any such breach.&lt;/p&gt;
&lt;p&gt;6. Your passwords and account security&lt;/p&gt;
&lt;p&gt;6.1 You agree and understand that you are responsible for maintaining the confidentiality of passwords associated with any account you use to access the Services.&lt;/p&gt;
&lt;p&gt;6.2 Accordingly, you agree that you will be solely responsible to Google for all activities that occur under your account.&lt;/p&gt;
&lt;p&gt;6.3 If you become aware of any unauthorized use of your password or of your account, you agree to notify Google immediately at &lt;a href="http://www.google.com/support/accounts/bin/answer.py?answer=48601"&gt;&lt;font color="#0000ff"&gt;http://www.google.com/support/accounts/bin/answer.py?answer=48601&lt;/font&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;7. Privacy and your personal information&lt;/p&gt;
&lt;p&gt;7.1 For information about Google’s data protection practices, please read Google’s privacy policy at &lt;a href="http://www.google.com/privacy.html"&gt;&lt;font color="#0000ff"&gt;http://www.google.com/privacy.html&lt;/font&gt;&lt;/a&gt;. This policy explains how Google treats your personal information, and protects your privacy, when you use the Services.&lt;/p&gt;
&lt;p&gt;7.2 You agree to the use of your data in accordance with Google’s privacy policies.&lt;/p&gt;
&lt;p&gt;8. Content in the Services&lt;/p&gt;
&lt;p&gt;8.1 You understand that all information (such as data files, written text, computer software, music, audio files or other sounds, photographs, videos or other images) which you may have access to as part of, or through your use of, the Services are the sole responsibility of the person from which such content originated. All such information is referred to below as the “Content”.&lt;/p&gt;
&lt;p&gt;8.2 You should be aware that Content presented to you as part of the Services, including but not limited to advertisements in the Services and sponsored Content within the Services may be protected by intellectual property rights which are owned by the sponsors or advertisers who provide that Content to Google (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this Content (either in whole or in part) unless you have been specifically told that you may do so by Google or by the owners of that Content, in a separate agreement.&lt;/p&gt;
&lt;p&gt;8.3 Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Content from any Service. For some of the Services, Google may provide tools to filter out explicit sexual content. These tools include the SafeSearch preference settings (see &lt;a href="http://www.google.com/help/customize.html#safe"&gt;&lt;font color="#0000ff"&gt;http://www.google.com/help/customize.html#safe&lt;/font&gt;&lt;/a&gt;). In addition, there are commercially available services and software to limit access to material that you may find objectionable.&lt;/p&gt;
&lt;p&gt;8.4 You understand that by using the Services you may be exposed to Content that you may find offensive, indecent or objectionable and that, in this respect, you use the Services at your own risk.&lt;/p&gt;
&lt;p&gt;8.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any Content that you create, transmit or display while using the Services and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.&lt;/p&gt;
&lt;p&gt;9. Proprietary rights&lt;/p&gt;
&lt;p&gt;9.1 You acknowledge and agree that Google (or Google’s licensors) own all legal right, title and interest in and to the Services, including any intellectual property rights which subsist in the Services (whether those rights happen to be registered or not, and wherever in the world those rights may exist). You further acknowledge that the Services may contain information which is designated confidential by Google and that you shall not disclose such information without Google’s prior written consent.&lt;/p&gt;
&lt;p&gt;9.2 Unless you have agreed otherwise in writing with Google, nothing in the Terms gives you a right to use any of Google’s trade names, trade marks, service marks, logos, domain names, and other distinctive brand features.&lt;/p&gt;
&lt;p&gt;9.3 If you have been given an explicit right to use any of these brand features in a separate written agreement with Google, then you agree that your use of such features shall be in compliance with that agreement, any applicable provisions of the Terms, and Google's brand feature use guidelines as updated from time to time. These guidelines can be viewed online at &lt;a href="http://www.google.com/permissions/guidelines.html"&gt;&lt;font color="#0000ff"&gt;http://www.google.com/permissions/guidelines.html&lt;/font&gt;&lt;/a&gt; (or such other URL as Google may provide for this purpose from time to time).&lt;/p&gt;
&lt;p&gt;9.4 Other than the limited license set forth in Section 11, Google acknowledges and agrees that it obtains no right, title or interest from you (or your licensors) under these Terms in or to any Content that you submit, post, transmit or display on, or through, the Services, including any intellectual property rights which subsist in that Content (whether those rights happen to be registered or not, and wherever in the world those rights may exist). Unless you have agreed otherwise in writing with Google, you agree that you are responsible for protecting and enforcing those rights and that Google has no obligation to do so on your behalf.&lt;/p&gt;
&lt;p&gt;9.5 You agree that you shall not remove, obscure, or alter any proprietary rights notices (including copyright and trade mark