<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>kevin Mocha - SDR</title>
    <link>http://blog.ilovedoudou.com/</link>
    <description>Bookmarks collected from web.</description>
    <language>en-us</language>
    <copyright>Kevin Mocha</copyright>
    <lastBuildDate>Sun, 11 Apr 2010 05:27:36 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>lulustock@gmail.com</managingEditor>
    <webMaster>lulustock@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=d84e5604-34eb-4f86-8fe7-88302de63bc5</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,d84e5604-34eb-4f86-8fe7-88302de63bc5.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,d84e5604-34eb-4f86-8fe7-88302de63bc5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d84e5604-34eb-4f86-8fe7-88302de63bc5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://blog.ilovedoudou.com/content/binary/WindowsLiveWriter/LicenseCheckSharePointWorkflow_1486/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.ilovedoudou.com/content/binary/WindowsLiveWriter/LicenseCheckSharePointWorkflow_1486/image_thumb.png" width="443" height="678" />
          </a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=d84e5604-34eb-4f86-8fe7-88302de63bc5" />
      </body>
      <title>License Check SharePoint Workflow</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,d84e5604-34eb-4f86-8fe7-88302de63bc5.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,d84e5604-34eb-4f86-8fe7-88302de63bc5.aspx</link>
      <pubDate>Sun, 11 Apr 2010 05:27:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://blog.ilovedoudou.com/content/binary/WindowsLiveWriter/LicenseCheckSharePointWorkflow_1486/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.ilovedoudou.com/content/binary/WindowsLiveWriter/LicenseCheckSharePointWorkflow_1486/image_thumb.png" width="443" height="678"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=d84e5604-34eb-4f86-8fe7-88302de63bc5" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,d84e5604-34eb-4f86-8fe7-88302de63bc5.aspx</comments>
      <category>DotNet/ SharePoint;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=6f08533c-3d77-419c-9df8-38b598c941a8</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,6f08533c-3d77-419c-9df8-38b598c941a8.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,6f08533c-3d77-419c-9df8-38b598c941a8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6f08533c-3d77-419c-9df8-38b598c941a8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div class="csharpcode">
          <pre class="alt">
            <span class="lnum"> 1: </span>
            <span class="kwrd">RESTORE</span> FILELISTONLY </pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">FROM</span>
            <span class="kwrd">DISK</span> = <span class="str">'C:\Bridge.bak'</span></pre>
          <pre class="alt">
            <span class="lnum"> 3: </span>
            <span class="kwrd">GO</span>
          </pre>
          <pre>
            <span class="lnum"> 4: </span> </pre>
          <pre class="alt">
            <span class="lnum"> 5: </span>
            <span class="kwrd">RESTORE</span>
            <span class="kwrd">DATABASE</span> Bridge</pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">FROM</span>
            <span class="kwrd">DISK</span> = <span class="str">'C:\Bridge.bak'</span></pre>
          <pre class="alt">
            <span class="lnum"> 7: </span>
            <span class="kwrd">WITH</span>
          </pre>
          <pre>
            <span class="lnum"> 8: </span> MOVE <span class="str">'Bridge'</span><span class="kwrd">TO</span><span class="str">'C:\Users\Public\Documents\Bridge.mdf'</span>,</pre>
          <pre class="alt">
            <span class="lnum"> 9: </span> MOVE <span class="str">'Bridge_log'</span><span class="kwrd">TO</span><span class="str">'C:\Users\Public\Documents\Bridge_log.mdf'</span></pre>
          <pre>
            <span class="lnum"> 10: </span>GO</pre>
        </div>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
 
</p>
        <p>
“Login Failed for user Reason: The password of the account must be changed!”<br />
“I ran the following command to turn off MUST_CHANGE:<br />
ALTER LOGIN UserLogin WITH PASSWORD = 'NewPassword' UNLOCK<br />
Then you can uncheck 'Enforce password policy' and 'Enforce password expiration'<br />
or just run the following two sql commands:<br />
ALTER LOGIN UserLogin WITH CHECK_EXPIRATION = OFF<br />
ALTER LOGIN UserLogin WITH CHECK_POLICY = OFF<br />
Once both of these properties were unchecked the application ran fine with no errors.<br />
Interesting.  I'm not sure if there was a global setting that caused this when
SQL Server 2005 was installed?”
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=6f08533c-3d77-419c-9df8-38b598c941a8" />
      </body>
      <title>Restore MSSQL Database and Permissions.</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,6f08533c-3d77-419c-9df8-38b598c941a8.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,6f08533c-3d77-419c-9df8-38b598c941a8.aspx</link>
      <pubDate>Tue, 27 Oct 2009 17:32:32 GMT</pubDate>
      <description>&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;RESTORE&lt;/span&gt; FILELISTONLY &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; &lt;span class="kwrd"&gt;FROM&lt;/span&gt; &lt;span class="kwrd"&gt;DISK&lt;/span&gt; = &lt;span class="str"&gt;'C:\Bridge.bak'&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&lt;span class="kwrd"&gt;RESTORE&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; Bridge&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="kwrd"&gt;FROM&lt;/span&gt; &lt;span class="kwrd"&gt;DISK&lt;/span&gt; = &lt;span class="str"&gt;'C:\Bridge.bak'&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="kwrd"&gt;WITH&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; MOVE &lt;span class="str"&gt;'Bridge'&lt;/span&gt; &lt;span class="kwrd"&gt;TO&lt;/span&gt; &lt;span class="str"&gt;'C:\Users\Public\Documents\Bridge.mdf'&lt;/span&gt;,&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; MOVE &lt;span class="str"&gt;'Bridge_log'&lt;/span&gt; &lt;span class="kwrd"&gt;TO&lt;/span&gt; &lt;span class="str"&gt;'C:\Users\Public\Documents\Bridge_log.mdf'&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt;GO&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
“Login Failed for user Reason: The password of the account must be changed!”&lt;br&gt;
“I ran the following command to turn off MUST_CHANGE:&lt;br&gt;
ALTER LOGIN UserLogin WITH PASSWORD = 'NewPassword' UNLOCK&lt;br&gt;
Then you can uncheck 'Enforce password policy' and 'Enforce password expiration'&lt;br&gt;
or just run the following two sql commands:&lt;br&gt;
ALTER LOGIN UserLogin WITH CHECK_EXPIRATION = OFF&lt;br&gt;
ALTER LOGIN UserLogin WITH CHECK_POLICY = OFF&lt;br&gt;
Once both of these properties were unchecked the application ran fine with no errors.&lt;br&gt;
Interesting.&amp;nbsp; I'm not sure if there was a global setting that caused this when
SQL Server 2005 was installed?”
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=6f08533c-3d77-419c-9df8-38b598c941a8" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,6f08533c-3d77-419c-9df8-38b598c941a8.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=8a16cdc3-736b-4bc9-94d2-e49551124d35</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,8a16cdc3-736b-4bc9-94d2-e49551124d35.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,8a16cdc3-736b-4bc9-94d2-e49551124d35.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8a16cdc3-736b-4bc9-94d2-e49551124d35</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358" href="http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358">http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358</a>
        </p>
        <p>
          <a title="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f" href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f">http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=8a16cdc3-736b-4bc9-94d2-e49551124d35" />
      </body>
      <title>WPF DataGrid Group Sub-Totals</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,8a16cdc3-736b-4bc9-94d2-e49551124d35.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,8a16cdc3-736b-4bc9-94d2-e49551124d35.aspx</link>
      <pubDate>Wed, 19 Aug 2009 14:23:25 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358" href="http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358"&gt;http://wpf.codeplex.com/Thread/View.aspx?ThreadId=44358&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f" href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f"&gt;http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/03972347-969f-4704-9b54-2d13c265fb8f&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=8a16cdc3-736b-4bc9-94d2-e49551124d35" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,8a16cdc3-736b-4bc9-94d2-e49551124d35.aspx</comments>
      <category>DotNet / WPF;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=72a12c83-fd99-4611-a85f-ebdbac32f8f9</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,72a12c83-fd99-4611-a85f-ebdbac32f8f9.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,72a12c83-fd99-4611-a85f-ebdbac32f8f9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=72a12c83-fd99-4611-a85f-ebdbac32f8f9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28" href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28">http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28</a>
        </p>
        <p>
          <em>“</em>
        </p>
        <p>
          <em>This exception says that you are deleting a relationship but not the entity association
with that relationship.  Sometimes that's OK, but if your relationship is a 1-to-many
(rather than 0..1-to-many) that means the entities on the many side cannot exist independent
of the entity on the one side.  In your case, you are deleting the relationship
between a Link and a WebPage, but the Link cannot exist on its own independent of
the WebPage.<br />
Configuring a cascade delete doesn't make it so that deleting the relationship will
delete the entity--what it does is make it so that deleting the entity on one side
of a relationship will cause the entity on the other side to be deleted.  So
that doesn't fix the issue in this case.<br />
The fix in this case would be to change the line at the end of FromBusinessObject
from 
<br />
    this.Links.Remove(entity);<br />
to<br />
    context.DeleteObject(entity);<br />
Of course that also means you will need to pass the context to the FromBusinessObject
method or something like that...<br />
This change will cause the link entity to be deleted which implicitly deletes any
relationships it participates in rather than just deleting the relationship between
the page and the link.</em>
        </p>
        <p>
          <em>
          </em> 
</p>
        <p>
          <em>“</em>
        </p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">partial</span>
            <span class="kwrd">void</span> OnContextCreated()</pre>
          <pre>
            <span class="lnum"> 2: </span> {</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">this</span>.SavingChanges += <span class="kwrd">new</span> EventHandler(onSavingChanges);</pre>
          <pre>
            <span class="lnum"> 4: </span> }</pre>
          <pre>
            <span class="lnum"> 5: </span> </pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">private</span>
            <span class="kwrd">static</span>
            <span class="kwrd">void</span> onSavingChanges(<span class="kwrd">object</span> sender,
EventArgs e)</pre>
          <pre>
            <span class="lnum"> 7: </span> {</pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="kwrd">foreach</span> (ObjectStateEntry
entry <span class="kwrd">in</span> ((ObjectContext)sender).ObjectStateManager.GetObjectStateEntries(EntityState.Deleted))</pre>
          <pre>
            <span class="lnum"> 9: </span> {</pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="kwrd">if</span> (entry.IsRelationship)</pre>
          <pre>
            <span class="lnum"> 11: </span> {</pre>
          <pre>
            <span class="lnum"> 12: </span> AssociationType asso = (AssociationType)entry.EntitySet.ElementType;</pre>
          <pre>
            <span class="lnum"> 13: </span> </pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="kwrd">if</span> (asso.RelationshipEndMembers[0].RelationshipMultiplicity
== RelationshipMultiplicity.One &amp;&amp; asso.RelationshipEndMembers[1].RelationshipMultiplicity
== RelationshipMultiplicity.Many)</pre>
          <pre>
            <span class="lnum"> 15: </span> {</pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="kwrd">object</span> o = entry.OriginalValues[1];</pre>
          <pre>
            <span class="lnum"> 17: </span>
            <span class="kwrd">object</span> ob = ((ObjectContext)sender).GetObjectByKey((EntityKey)o);</pre>
          <pre>
            <span class="lnum"> 18: </span> ((ObjectContext)sender).DeleteObject(ob);</pre>
          <pre>
            <span class="lnum"> 19: </span> }</pre>
          <pre>
            <span class="lnum"> 20: </span>
            <span class="kwrd">else</span>
            <span class="kwrd">if</span> (asso.RelationshipEndMembers[1].RelationshipMultiplicity
== RelationshipMultiplicity.One &amp;&amp; asso.RelationshipEndMembers[0].RelationshipMultiplicity
== RelationshipMultiplicity.Many)</pre>
          <pre>
            <span class="lnum"> 21: </span> {</pre>
          <pre>
            <span class="lnum"> 22: </span>
            <span class="kwrd">object</span> o = entry.OriginalValues[0];</pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="kwrd">object</span> ob = ((ObjectContext)sender).GetObjectByKey((EntityKey)o);</pre>
          <pre>
            <span class="lnum"> 24: </span> ((ObjectContext)sender).DeleteObject(ob);</pre>
          <pre>
            <span class="lnum"> 25: </span> }</pre>
          <pre>
            <span class="lnum"> 26: </span> }</pre>
          <pre>
            <span class="lnum"> 27: </span> }</pre>
          <pre>
            <span class="lnum"> 28: </span> }</pre>
        </div>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=72a12c83-fd99-4611-a85f-ebdbac32f8f9" />
      </body>
      <title>Entity framework association problem</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,72a12c83-fd99-4611-a85f-ebdbac32f8f9.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,72a12c83-fd99-4611-a85f-ebdbac32f8f9.aspx</link>
      <pubDate>Mon, 17 Aug 2009 21:19:41 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28" href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28"&gt;http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/74dac8d1-6fa7-4d23-a740-738f9c707d28&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;“&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;This exception says that you are deleting a relationship but not the entity association
with that relationship.&amp;nbsp; Sometimes that's OK, but if your relationship is a 1-to-many
(rather than 0..1-to-many) that means the entities on the many side cannot exist independent
of the entity on the one side.&amp;nbsp; In your case, you are deleting the relationship
between a Link and a WebPage, but the Link cannot exist on its own independent of
the WebPage.&lt;br&gt;
Configuring a cascade delete doesn't make it so that deleting the relationship will
delete the entity--what it does is make it so that deleting the entity on one side
of a relationship will cause the entity on the other side to be deleted.&amp;nbsp; So
that doesn't fix the issue in this case.&lt;br&gt;
The fix in this case would be to change the line at the end of FromBusinessObject
from 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Links.Remove(entity);&lt;br&gt;
to&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; context.DeleteObject(entity);&lt;br&gt;
Of course that also means you will need to pass the context to the FromBusinessObject
method or something like that...&lt;br&gt;
This change will cause the link entity to be deleted which implicitly deletes any
relationships it participates in rather than just deleting the relationship between
the page and the link.&lt;/em&gt; 
&lt;p&gt;
&lt;em&gt;&lt;/em&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;“&lt;/em&gt;
&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnContextCreated()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.SavingChanges += &lt;span class="kwrd"&gt;new&lt;/span&gt; EventHandler(onSavingChanges);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; onSavingChanges(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ObjectStateEntry
entry &lt;span class="kwrd"&gt;in&lt;/span&gt; ((ObjectContext)sender).ObjectStateManager.GetObjectStateEntries(EntityState.Deleted))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (entry.IsRelationship)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; AssociationType asso = (AssociationType)entry.EntitySet.ElementType;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (asso.RelationshipEndMembers[0].RelationshipMultiplicity
== RelationshipMultiplicity.One &amp;amp;&amp;amp; asso.RelationshipEndMembers[1].RelationshipMultiplicity
== RelationshipMultiplicity.Many)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; o = entry.OriginalValues[1];&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; ob = ((ObjectContext)sender).GetObjectByKey((EntityKey)o);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; ((ObjectContext)sender).DeleteObject(ob);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt; &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (asso.RelationshipEndMembers[1].RelationshipMultiplicity
== RelationshipMultiplicity.One &amp;amp;&amp;amp; asso.RelationshipEndMembers[0].RelationshipMultiplicity
== RelationshipMultiplicity.Many)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; o = entry.OriginalValues[0];&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; ob = ((ObjectContext)sender).GetObjectByKey((EntityKey)o);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; ((ObjectContext)sender).DeleteObject(ob);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=72a12c83-fd99-4611-a85f-ebdbac32f8f9" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,72a12c83-fd99-4611-a85f-ebdbac32f8f9.aspx</comments>
      <category>DotNet;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=ca3a7dc6-1eb4-402c-a27a-b55156d68700</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,ca3a7dc6-1eb4-402c-a27a-b55156d68700.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,ca3a7dc6-1eb4-402c-a27a-b55156d68700.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ca3a7dc6-1eb4-402c-a27a-b55156d68700</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98" href="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98">http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98</a>
        </p>
        <p>
If you want to access the sharing on Windows Server 2008 computer from Windows XP
and Windows 2000, you have to perform the following stesps: 
</p>
        <p>
          <strong>1. </strong>
          <strong>Change the settings in Network and Sharing Center</strong>
        </p>
        <p>
Please navigate to Control Panel &gt;&gt;&gt; Network and Sharing Center, and ensure: 
</p>
        <p>
1. Fire Sharing: <strong>On</strong>; 
</p>
        <p>
2. Public folder sharing: <strong>Turn on</strong> sharing so anyone with network
access can open files (or <strong>Turn on</strong> sharing so anyone with network
access can open, change, and create files); 
</p>
        <p>
3. Password protected sharing: <strong>Turn off password protected sharing</strong></p>
        <p>
          <strong>2. </strong>
          <strong>Change the security settings in gpedit.msc</strong>
        </p>
        <p>
Please navigate to gpedit.msc &gt;&gt;&gt; Computer Configuration &gt;&gt;&gt; Security
Settings &gt;&gt;&gt; Security Options 
</p>
        <p>
Please change Network access: Sharing and security model for local account from “Classic-local
users authenticate as themselves” to “Guest only-local users authenticate as Guest” 
</p>
        <p>
  
</p>
        <p>
          <strong>
            <font color="#ff0000">(This will make your other websites stop working if
they are using Classic-local users authenticate.)</font>
          </strong>
          <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=ca3a7dc6-1eb4-402c-a27a-b55156d68700" />
        </p>
      </body>
      <title>Enable anonymous sharing in Windows Server 2008</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,ca3a7dc6-1eb4-402c-a27a-b55156d68700.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,ca3a7dc6-1eb4-402c-a27a-b55156d68700.aspx</link>
      <pubDate>Sun, 09 Aug 2009 21:05:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98" href="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98"&gt;http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/c50706c1-9406-4735-b468-07a75147fb98&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you want to access the sharing on Windows Server 2008 computer from Windows XP
and Windows 2000, you have to perform the following stesps: 
&lt;p&gt;
&lt;strong&gt;1. &lt;/strong&gt;&lt;strong&gt;Change the settings in Network and Sharing Center&lt;/strong&gt; 
&lt;p&gt;
Please navigate to Control Panel &amp;gt;&amp;gt;&amp;gt; Network and Sharing Center, and ensure: 
&lt;p&gt;
1. Fire Sharing: &lt;strong&gt;On&lt;/strong&gt;; 
&lt;p&gt;
2. Public folder sharing: &lt;strong&gt;Turn on&lt;/strong&gt; sharing so anyone with network
access can open files (or &lt;strong&gt;Turn on&lt;/strong&gt; sharing so anyone with network
access can open, change, and create files); 
&lt;p&gt;
3. Password protected sharing: &lt;strong&gt;Turn off password protected sharing&lt;/strong&gt; 
&lt;p&gt;
&lt;strong&gt;2. &lt;/strong&gt;&lt;strong&gt;Change the security settings in gpedit.msc&lt;/strong&gt; 
&lt;p&gt;
Please navigate to gpedit.msc &amp;gt;&amp;gt;&amp;gt; Computer Configuration &amp;gt;&amp;gt;&amp;gt; Security
Settings &amp;gt;&amp;gt;&amp;gt; Security Options 
&lt;p&gt;
Please change Network access: Sharing and security model for local account from “Classic-local
users authenticate as themselves” to “Guest only-local users authenticate as Guest” 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
&lt;strong&gt;&lt;font color="#ff0000"&gt;(This will make your other websites stop working if
they are using Classic-local users authenticate.)&lt;/font&gt;&lt;/strong&gt;&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=ca3a7dc6-1eb4-402c-a27a-b55156d68700" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,ca3a7dc6-1eb4-402c-a27a-b55156d68700.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=9c51f3c8-3e16-44cb-97d4-acf272c16911</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,9c51f3c8-3e16-44cb-97d4-acf272c16911.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,9c51f3c8-3e16-44cb-97d4-acf272c16911.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9c51f3c8-3e16-44cb-97d4-acf272c16911</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Timer Job
</p>
        <p>
          <a title="http://msdn.microsoft.com/en-us/library/cc406686.aspx" href="http://msdn.microsoft.com/en-us/library/cc406686.aspx">http://msdn.microsoft.com/en-us/library/cc406686.aspx</a> (Code)
</p>
        <p>
          <a title="http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders" href="http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders">http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders</a> (Designer)
</p>
        <p>
          <a title="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271" href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271">http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271</a> (Hierarchical
Object Store)
</p>
        <p>
          <a title="http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx" href="http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx">http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=9c51f3c8-3e16-44cb-97d4-acf272c16911" />
      </body>
      <title>SharePoint</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,9c51f3c8-3e16-44cb-97d4-acf272c16911.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,9c51f3c8-3e16-44cb-97d4-acf272c16911.aspx</link>
      <pubDate>Thu, 08 Jan 2009 21:02:49 GMT</pubDate>
      <description>&lt;p&gt;
Timer Job
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://msdn.microsoft.com/en-us/library/cc406686.aspx" href="http://msdn.microsoft.com/en-us/library/cc406686.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc406686.aspx&lt;/a&gt; (Code)
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders" href="http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders"&gt;http://sharepointmagazine.net/technical/development/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders&lt;/a&gt; (Designer)
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271" href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271"&gt;http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271&lt;/a&gt; (Hierarchical
Object Store)
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx" href="http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx"&gt;http://office.microsoft.com/en-us/sharepointtechnology/HA101544311033.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=9c51f3c8-3e16-44cb-97d4-acf272c16911" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,9c51f3c8-3e16-44cb-97d4-acf272c16911.aspx</comments>
      <category>DotNet/ SharePoint;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=57811738-591d-4293-9754-4fcedd5ecdfd</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,57811738-591d-4293-9754-4fcedd5ecdfd.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,57811738-591d-4293-9754-4fcedd5ecdfd.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=57811738-591d-4293-9754-4fcedd5ecdfd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
How to Debug: <a title="http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx" href="http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx">http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx</a></p>
        <p>
System.Diagnostics.Debugger.Break();
</p>
        <p>
Walk Through <a title="http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx" href="http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx">http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx</a></p>
        <p>
Add custom action to both install and commit
</p>
        <p>
How to get installation path
</p>
        <p>
string strAssemplyPath = Context.Parameters["assemblypath"].ToString(); 
</p>
        <p>
string strAppPath = strAssemplyPath.Substring(0, strAssemplyPath.LastIndexOf("\\")); <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=57811738-591d-4293-9754-4fcedd5ecdfd" /></p>
      </body>
      <title>Installer Class in Setup Project</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,57811738-591d-4293-9754-4fcedd5ecdfd.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,57811738-591d-4293-9754-4fcedd5ecdfd.aspx</link>
      <pubDate>Fri, 12 Dec 2008 21:46:27 GMT</pubDate>
      <description>&lt;p&gt;
How to Debug: &lt;a title="http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx" href="http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx"&gt;http://weblogs.asp.net/joshrobinson/archive/2004/12/20/327381.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
System.Diagnostics.Debugger.Break();
&lt;/p&gt;
&lt;p&gt;
Walk Through &lt;a title="http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx" href="http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Add custom action to both install and commit
&lt;/p&gt;
&lt;p&gt;
How to get installation path
&lt;/p&gt;
&lt;p&gt;
string strAssemplyPath = Context.Parameters["assemblypath"].ToString(); 
&lt;p&gt;
string strAppPath = strAssemplyPath.Substring(0, strAssemplyPath.LastIndexOf("\\")); &lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=57811738-591d-4293-9754-4fcedd5ecdfd" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,57811738-591d-4293-9754-4fcedd5ecdfd.aspx</comments>
      <category>DotNet;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=3f492bcf-67c9-408b-9693-7484edca61be</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,3f492bcf-67c9-408b-9693-7484edca61be.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,3f492bcf-67c9-408b-9693-7484edca61be.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3f492bcf-67c9-408b-9693-7484edca61be</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ultimate版的序列号：<br />
6F2D7-2PCG6-YQQTB-FWK9V-932CC 
</p>
        <p>
 
</p>
        <p>
Vista guests require the E1000 virtual NIC. Edit your vmx file and change/add the
line ethernet0.virtualDev = "e1000".
</p>
        <p>
          <a title="http://bbs.vmware.cn/viewthread.php?tid=9365" href="http://bbs.vmware.cn/viewthread.php?tid=9365">http://bbs.vmware.cn/viewthread.php?tid=9365</a>
        </p>
        <p>
          <a title="http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm" href="http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm">http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=3f492bcf-67c9-408b-9693-7484edca61be" />
      </body>
      <title>Install Vista guest in VMWare</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,3f492bcf-67c9-408b-9693-7484edca61be.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,3f492bcf-67c9-408b-9693-7484edca61be.aspx</link>
      <pubDate>Thu, 11 Dec 2008 15:57:22 GMT</pubDate>
      <description>&lt;p&gt;
Ultimate版的序列号：&lt;br&gt;
6F2D7-2PCG6-YQQTB-FWK9V-932CC 
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Vista guests require the E1000 virtual NIC. Edit your vmx file and change/add the
line ethernet0.virtualDev = "e1000".
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://bbs.vmware.cn/viewthread.php?tid=9365" href="http://bbs.vmware.cn/viewthread.php?tid=9365"&gt;http://bbs.vmware.cn/viewthread.php?tid=9365&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm" href="http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm"&gt;http://www.realtime-vista.com/installation/2006/12/vmware_and_vista_troubles.htm&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=3f492bcf-67c9-408b-9693-7484edca61be" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,3f492bcf-67c9-408b-9693-7484edca61be.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=46a6e29d-b54c-4a54-ba0b-e90d0a676d01</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=46a6e29d-b54c-4a54-ba0b-e90d0a676d01</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Build and Deploy .Net COM Assembly
</p>
        <p>
          <a title="http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/" href="http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/">http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/</a>
        </p>
        <p>
Differences of regasm.exe and regsvr32.exe
</p>
        <p>
          <a title="http://forums.asp.net/t/1019678.aspx" href="http://forums.asp.net/t/1019678.aspx">http://forums.asp.net/t/1019678.aspx</a>
        </p>
        <p>
          <a title="http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx" href="http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx">http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx</a>
        </p>
        <p>
          <em>"regasm.exe is used to create COM Callable Wrapper (CCW) around .NET assemblies.
.NET managed assemblies(EXEs, DLLs) are different from COM DLLs (which are unmanaged,
ie. they interact with the OS directly). So to register an unmanaged DLL you use regsvr32.exe. </em>
        </p>
        <p>
          <em>But if you have a managed .NET assembly and want you COM components to use it
as if it were a COM assembly, then you need to use regasm.exe."</em>
        </p>
        <p>
          <em>Get started with .Net Setup Project</em>
        </p>
        <p>
          <a title="http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/" href="http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/">http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=46a6e29d-b54c-4a54-ba0b-e90d0a676d01" />
      </body>
      <title>Deploy com dll</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx</link>
      <pubDate>Wed, 26 Nov 2008 15:40:18 GMT</pubDate>
      <description>&lt;p&gt;
Build and Deploy .Net COM Assembly
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/" href="http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/"&gt;http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Differences of regasm.exe and regsvr32.exe
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://forums.asp.net/t/1019678.aspx" href="http://forums.asp.net/t/1019678.aspx"&gt;http://forums.asp.net/t/1019678.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx" href="http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx"&gt;http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;"regasm.exe is used to create COM Callable Wrapper (CCW) around .NET assemblies.
.NET managed assemblies(EXEs, DLLs) are different from COM DLLs (which are unmanaged,
ie. they interact with the OS directly). So to register an unmanaged DLL you use regsvr32.exe. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;But if you have a managed .NET assembly and want you COM components to use it
as if it were a COM assembly, then you need to use regasm.exe."&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Get started with .Net Setup Project&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/" href="http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/"&gt;http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=46a6e29d-b54c-4a54-ba0b-e90d0a676d01" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx</comments>
      <category>DotNet;SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=1276b884-7927-4463-862d-b2582782590c</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,1276b884-7927-4463-862d-b2582782590c.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,1276b884-7927-4463-862d-b2582782590c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1276b884-7927-4463-862d-b2582782590c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/" href="http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/">http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/</a>
        </p>
        <p>
          <a title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;SiteID=1" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;SiteID=1">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;SiteID=1</a> (Might
work)
</p>
        <pre class="csharpcode">#include <span class="str">"stdafx.h"</span><span class="rem">//
includes &lt;tchar.h&gt;</span> #include &lt;windows.h&gt; #include &lt;shobjidl.h&gt; <span class="rem">//
ShellLink</span> #include &lt;shlobj.h&gt; <span class="rem">// IShellLinkDataList
(build on Vista use shobjidl.h)</span> #include &lt;objbase.h&gt; <span class="rem">//
CoInitialize, CoInitializeEx, CoUninitialize</span><span class="kwrd">int</span> _tmain(<span class="kwrd">int</span> argc,
_TCHAR* argv[]) { HRESULT result; WCHAR wbuf[MAX_PATH]; IShellLink* link; IPersistFile*
file; <span class="kwrd">char</span> szFile[MAX_PATH]; <span class="kwrd">char</span> szProgramMenuFolder[MAX_PATH]; <span class="rem">//
SHOULD use CoInitializeEx, but compiler can't find it.</span> result = CoInitialize(NULL); <span class="rem">//
For Ex: 2nd param: COINIT_APARTMENTTHREADED</span><span class="rem">// Create IShellLink
object</span> result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
IID_IShellLink, (<span class="kwrd">void</span>**)&amp;link); <span class="kwrd">if</span> (result
!= S_OK) { CoUninitialize(); <span class="kwrd">return</span> -1; } <span class="rem">//
Retreive the IPersistFile</span> result = link-&gt;QueryInterface(IID_IPersistFile,
(<span class="kwrd">void</span>**)&amp;file); <span class="kwrd">if</span> (result
!= S_OK) { link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -2;
} <span class="rem">// SHOULD get from registry.</span> strcpy(szProgramMenuFolder, <span class="str">"C:\\ProgramData\\Microsoft\\Windows\\Start
Menu\\Programs\\"); // DEBUG strcpy(szFile, szProgramMenuFolder); // SHOULD use your
folder and shortcut name. strcat(szFile, "</span>Program Shortcut Folder\\Shortcut.lnk"); <span class="rem">//
Convert the filename</span> MultiByteToWideChar(CP_ACP, 0, szFile, -1, wbuf, <span class="kwrd">sizeof</span>(wbuf)-1); <span class="rem">//
Load the link data from the file</span> result = file-&gt;Load(wbuf, STGM_READ); <span class="kwrd">if</span> (result
!= S_OK) { file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -3;
} <span class="rem">// Look for IShellLinkDataList interface</span> IShellLinkDataList*
pdl; result = link-&gt;QueryInterface(IID_IShellLinkDataList, (<span class="kwrd">void</span>**)&amp;pdl); <span class="kwrd">if</span> (result
!= S_OK) { file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -4; <span class="rem">//
Where did IShellLinkDataList go?</span> } DWORD dwFlags = 0; result = pdl-&gt;GetFlags(&amp;dwFlags); <span class="kwrd">if</span> (result
!= S_OK) { pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -5;
} <span class="rem">// Only set SLDF_RUNAS_USER if it's not set, otherwise</span><span class="rem">//
SetFlags returns an error.</span><span class="kwrd">if</span> ((SLDF_RUNAS_USER &amp;
dwFlags) != SLDF_RUNAS_USER) { result = pdl-&gt;SetFlags(SLDF_RUNAS_USER | dwFlags); <span class="kwrd">if</span> (result
!= S_OK) { pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -6;
} } <span class="kwrd">else</span> { pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release();
CoUninitialize(); <span class="kwrd">return</span> 0; } result = file-&gt;Save(NULL, <span class="kwrd">true</span>); <span class="kwrd">if</span> (result
!= S_OK) { pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -8;
} result = file-&gt;SaveCompleted(NULL); <span class="kwrd">if</span> (result != S_OK)
{ pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> -9;
} pdl-&gt;Release(); file-&gt;Release(); link-&gt;Release(); CoUninitialize(); <span class="kwrd">return</span> ERROR_SUCCESS;
} </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=1276b884-7927-4463-862d-b2582782590c" />
      </body>
      <title>How To: Tell Vista's UAC What Privelege Level Your App Requires</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,1276b884-7927-4463-862d-b2582782590c.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,1276b884-7927-4463-862d-b2582782590c.aspx</link>
      <pubDate>Wed, 10 Sep 2008 18:36:58 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/" href="http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/"&gt;http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;amp;SiteID=1" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1439749&amp;amp;SiteID=1&lt;/a&gt; (Might
work)
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;#include &lt;span class="str"&gt;"stdafx.h"&lt;/span&gt; &lt;span class="rem"&gt;//
includes &amp;lt;tchar.h&amp;gt;&lt;/span&gt; #include &amp;lt;windows.h&amp;gt; #include &amp;lt;shobjidl.h&amp;gt; &lt;span class="rem"&gt;//
ShellLink&lt;/span&gt; #include &amp;lt;shlobj.h&amp;gt; &lt;span class="rem"&gt;// IShellLinkDataList
(build on Vista use shobjidl.h)&lt;/span&gt; #include &amp;lt;objbase.h&amp;gt; &lt;span class="rem"&gt;//
CoInitialize, CoInitializeEx, CoUninitialize&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; _tmain(&lt;span class="kwrd"&gt;int&lt;/span&gt; argc,
_TCHAR* argv[]) { HRESULT result; WCHAR wbuf[MAX_PATH]; IShellLink* link; IPersistFile*
file; &lt;span class="kwrd"&gt;char&lt;/span&gt; szFile[MAX_PATH]; &lt;span class="kwrd"&gt;char&lt;/span&gt; szProgramMenuFolder[MAX_PATH]; &lt;span class="rem"&gt;//
SHOULD use CoInitializeEx, but compiler can't find it.&lt;/span&gt; result = CoInitialize(NULL); &lt;span class="rem"&gt;//
For Ex: 2nd param: COINIT_APARTMENTTHREADED&lt;/span&gt; &lt;span class="rem"&gt;// Create IShellLink
object&lt;/span&gt; result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
IID_IShellLink, (&lt;span class="kwrd"&gt;void&lt;/span&gt;**)&amp;amp;link); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -1; } &lt;span class="rem"&gt;//
Retreive the IPersistFile&lt;/span&gt; result = link-&amp;gt;QueryInterface(IID_IPersistFile,
(&lt;span class="kwrd"&gt;void&lt;/span&gt;**)&amp;amp;file); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -2;
} &lt;span class="rem"&gt;// SHOULD get from registry.&lt;/span&gt; strcpy(szProgramMenuFolder, &lt;span class="str"&gt;"C:\\ProgramData\\Microsoft\\Windows\\Start
Menu\\Programs\\"); // DEBUG strcpy(szFile, szProgramMenuFolder); // SHOULD use your
folder and shortcut name. strcat(szFile, "&lt;/span&gt;Program Shortcut Folder\\Shortcut.lnk"); &lt;span class="rem"&gt;//
Convert the filename&lt;/span&gt; MultiByteToWideChar(CP_ACP, 0, szFile, -1, wbuf, &lt;span class="kwrd"&gt;sizeof&lt;/span&gt;(wbuf)-1); &lt;span class="rem"&gt;//
Load the link data from the file&lt;/span&gt; result = file-&amp;gt;Load(wbuf, STGM_READ); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -3;
} &lt;span class="rem"&gt;// Look for IShellLinkDataList interface&lt;/span&gt; IShellLinkDataList*
pdl; result = link-&amp;gt;QueryInterface(IID_IShellLinkDataList, (&lt;span class="kwrd"&gt;void&lt;/span&gt;**)&amp;amp;pdl); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -4; &lt;span class="rem"&gt;//
Where did IShellLinkDataList go?&lt;/span&gt; } DWORD dwFlags = 0; result = pdl-&amp;gt;GetFlags(&amp;amp;dwFlags); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -5;
} &lt;span class="rem"&gt;// Only set SLDF_RUNAS_USER if it's not set, otherwise&lt;/span&gt; &lt;span class="rem"&gt;//
SetFlags returns an error.&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; ((SLDF_RUNAS_USER &amp;amp;
dwFlags) != SLDF_RUNAS_USER) { result = pdl-&amp;gt;SetFlags(SLDF_RUNAS_USER | dwFlags); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -6;
} } &lt;span class="kwrd"&gt;else&lt;/span&gt; { pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release();
CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; 0; } result = file-&amp;gt;Save(NULL, &lt;span class="kwrd"&gt;true&lt;/span&gt;); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result
!= S_OK) { pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -8;
} result = file-&amp;gt;SaveCompleted(NULL); &lt;span class="kwrd"&gt;if&lt;/span&gt; (result != S_OK)
{ pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; -9;
} pdl-&amp;gt;Release(); file-&amp;gt;Release(); link-&amp;gt;Release(); CoUninitialize(); &lt;span class="kwrd"&gt;return&lt;/span&gt; ERROR_SUCCESS;
} &lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=1276b884-7927-4463-862d-b2582782590c" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,1276b884-7927-4463-862d-b2582782590c.aspx</comments>
      <category>SDR;Tricks</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=a9c45644-3b8b-4e6d-8903-411020c4454a</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,a9c45644-3b8b-4e6d-8903-411020c4454a.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,a9c45644-3b8b-4e6d-8903-411020c4454a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a9c45644-3b8b-4e6d-8903-411020c4454a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Click Once 
</p>
        <p>
ClickOnce Deployment Overview  <a href="http://msdn.microsoft.com/en-us/library/142dbbz4(VS.80).aspx">http://msdn.microsoft.com/en-us/library/142dbbz4(VS.80).aspx</a></p>
        <p>
Walkthrough: Deploying a ClickOnce Application Manually <a title="http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx" href="http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx">http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx</a></p>
        <p>
Inno Setup <a title="http://www.jrsoftware.org/isinfo.php" href="http://www.jrsoftware.org/isinfo.php">http://www.jrsoftware.org/isinfo.php</a></p>
        <p>
Install Shield <a title="http://www.acresso.com/default.htm" href="http://www.acresso.com/default.htm">http://www.acresso.com/default.htm</a></p>
        <p>
 
</p>
        <p>
          <strong>
            <u>
              <font color="#ff0000">DIY</font>
            </u>
          </strong>
        </p>
        <p>
          <a title="http://www.pin5i.com/showtopic-16184.html" href="http://www.pin5i.com/showtopic-16184.html">http://www.pin5i.com/showtopic-16184.html</a>
        </p>
        <p>
          <a title="http://topic.csdn.net/t/20041222/16/3667425.html" href="http://topic.csdn.net/t/20041222/16/3667425.html">http://topic.csdn.net/t/20041222/16/3667425.html</a>
        </p>
        <p>
          <a title="http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx" href="http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx">http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx</a>
        </p>
        <p>
          <a title="http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm" href="http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm">http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm</a>
        </p>
        <p>
          <a title="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx" href="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx">http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx</a>
        </p>
        <p>
          <a title="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx" href="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx">http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx</a>
        </p>
        <p>
          <a title="http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html" href="http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html">http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=a9c45644-3b8b-4e6d-8903-411020c4454a" />
      </body>
      <title>Setup and Installation</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,a9c45644-3b8b-4e6d-8903-411020c4454a.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,a9c45644-3b8b-4e6d-8903-411020c4454a.aspx</link>
      <pubDate>Mon, 04 Aug 2008 16:22:38 GMT</pubDate>
      <description>&lt;p&gt;
Click Once 
&lt;/p&gt;
&lt;p&gt;
ClickOnce Deployment Overview&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/library/142dbbz4(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/142dbbz4(VS.80).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Walkthrough: Deploying a ClickOnce Application Manually &lt;a title="http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx" href="http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/xc3tc5xx(vs.80).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Inno Setup &lt;a title="http://www.jrsoftware.org/isinfo.php" href="http://www.jrsoftware.org/isinfo.php"&gt;http://www.jrsoftware.org/isinfo.php&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Install Shield &lt;a title="http://www.acresso.com/default.htm" href="http://www.acresso.com/default.htm"&gt;http://www.acresso.com/default.htm&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;u&gt;&lt;font color="#ff0000"&gt;DIY&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.pin5i.com/showtopic-16184.html" href="http://www.pin5i.com/showtopic-16184.html"&gt;http://www.pin5i.com/showtopic-16184.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://topic.csdn.net/t/20041222/16/3667425.html" href="http://topic.csdn.net/t/20041222/16/3667425.html"&gt;http://topic.csdn.net/t/20041222/16/3667425.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx" href="http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx"&gt;http://www.c-sharpcorner.com/UploadFile/subcom/003202008114211AM/0.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm" href="http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm"&gt;http://www.zdnetasia.com/techguide/webdev/0,39044903,39251815,00.htm&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx" href="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx"&gt;http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx" href="http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx"&gt;http://www.codeproject.com/KB/webservices/Soap_Extension_Progress.aspx?msg=2417461#xx2417461xx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html" href="http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html"&gt;http://www.cnblogs.com/jenry/archive/2006/08/15/477302.html&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=a9c45644-3b8b-4e6d-8903-411020c4454a" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,a9c45644-3b8b-4e6d-8903-411020c4454a.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=dc671e9e-3803-4fcf-8a2e-4780e377953a</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,dc671e9e-3803-4fcf-8a2e-4780e377953a.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,dc671e9e-3803-4fcf-8a2e-4780e377953a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dc671e9e-3803-4fcf-8a2e-4780e377953a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030" href="http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030">http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030</a> 
(Hotfix Cleanup Utility)
</p>
        <p>
          <a title="http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx" href="http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx">http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=dc671e9e-3803-4fcf-8a2e-4780e377953a" />
      </body>
      <title>Installation of VS208 SP1</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,dc671e9e-3803-4fcf-8a2e-4780e377953a.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,dc671e9e-3803-4fcf-8a2e-4780e377953a.aspx</link>
      <pubDate>Tue, 27 May 2008 17:47:41 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030" href="http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030"&gt;http://code.msdn.microsoft.com/RemoveKB944899/Release/ProjectReleases.aspx?ReleaseId=1030&lt;/a&gt;&amp;nbsp;
(Hotfix Cleanup Utility)
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx" href="http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx"&gt;http://blogs.msdn.com/heaths/archive/2008/05/16/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=dc671e9e-3803-4fcf-8a2e-4780e377953a" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,dc671e9e-3803-4fcf-8a2e-4780e377953a.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=343eb9c1-0964-446c-90e6-e9dc882b91dd</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,343eb9c1-0964-446c-90e6-e9dc882b91dd.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,343eb9c1-0964-446c-90e6-e9dc882b91dd.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=343eb9c1-0964-446c-90e6-e9dc882b91dd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <pre class="csharpcode">
          <span class="rem"> ///
&lt;summary&gt;</span>
          <span class="rem">/// Information about the currently executing
assembly, this is used to determine</span>
          <span class="rem">/// our version, etc.</span>
          <span class="rem">///
&lt;/summary&gt;</span>
          <span class="kwrd">private</span> System.Reflection.Assembly
m_assemblyInfo; <span class="kwrd">public</span><span class="kwrd">string</span> version
{ get { <span class="kwrd">string</span> ourVersion = <span class="kwrd">string</span>.Empty; <span class="rem">//if
running the deployed application, you can get the version</span><span class="rem">//
from the ApplicationDeployment information. If you try</span><span class="rem">//
to access this when you are running in Visual Studio, it will not work.</span><span class="kwrd">if</span> (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
ourVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); <span class="kwrd">else</span><span class="kwrd">if</span> (m_assemblyInfo
!= <span class="kwrd">null</span>) ourVersion = m_assemblyInfo.GetName().Version.ToString(); <span class="kwrd">return</span> ourVersion;
} } </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=343eb9c1-0964-446c-90e6-e9dc882b91dd" />
      </body>
      <title>How to get the deployment version?</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,343eb9c1-0964-446c-90e6-e9dc882b91dd.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,343eb9c1-0964-446c-90e6-e9dc882b91dd.aspx</link>
      <pubDate>Thu, 22 May 2008 20:14:17 GMT</pubDate>
      <description>&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt; /// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Information about the currently executing assembly, this is used to determine&lt;/span&gt; &lt;span class="rem"&gt;///
our version, etc.&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; System.Reflection.Assembly
m_assemblyInfo; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; version
{ get { &lt;span class="kwrd"&gt;string&lt;/span&gt; ourVersion = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty; &lt;span class="rem"&gt;//if
running the deployed application, you can get the version&lt;/span&gt; &lt;span class="rem"&gt;//
from the ApplicationDeployment information. If you try&lt;/span&gt; &lt;span class="rem"&gt;//
to access this when you are running in Visual Studio, it will not work.&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
ourVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (m_assemblyInfo
!= &lt;span class="kwrd"&gt;null&lt;/span&gt;) ourVersion = m_assemblyInfo.GetName().Version.ToString(); &lt;span class="kwrd"&gt;return&lt;/span&gt; ourVersion;
} } &lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=343eb9c1-0964-446c-90e6-e9dc882b91dd" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,343eb9c1-0964-446c-90e6-e9dc882b91dd.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=785dc2bd-fbc4-43ce-8b01-727548dbf204</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,785dc2bd-fbc4-43ce-8b01-727548dbf204.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,785dc2bd-fbc4-43ce-8b01-727548dbf204.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=785dc2bd-fbc4-43ce-8b01-727548dbf204</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;docType=kc&amp;externalId=c2005119&amp;sliceId=&amp;dialogID=2998976&amp;stateId=1%200%203000588" href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;docType=kc&amp;externalId=c2005119&amp;sliceId=&amp;dialogID=2998976&amp;stateId=1%200%203000588">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;docType=kc&amp;externalId=c2005119&amp;sliceId=&amp;dialogID=2998976&amp;stateId=1%200%203000588</a>
        </p>
        <p>
 
</p>
        <p>
Use the 'Underlay following section' formatting option to achieve this. 
</p>
        <p>
1. Create an additional Page Header section: 
</p>
        <p>
· Right-click the gray area to the left of the Page Header section 
</p>
        <p>
- Select 'Insert section below' 
</p>
        <p>
This inserts a second Page Header, so you now have a Page Header - a and a Page Header
- b. 
</p>
        <p>
2. Re-size the Page Header - a section so it is the height of the page. 
</p>
        <p>
3. Insert the bitmap image (a .BMP file) of the pre-printed form or logo for the watermark
into the Page Header -a section. 
</p>
        <p>
4. Go to Format | Section to open the Section Expert window, and select the Page Header
- a section. 
</p>
        <p>
5. Select the 'Underlay following section' option. 
</p>
        <p>
6. Close the Section Expert. 
</p>
        <p>
The bitmap image in Page Header - a now appears beneath all the sections that come
after it, up to the Page Footer. 
</p>
        <p>
The Page Headers and Page Footers cannot exceed the vertical size of the report. 
</p>
        <p>
NOTE: ===== 
</p>
        <p>
Ensure that you suppress the Page Footer of the report because the Page Header cannot
underlay the Page Footer.
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=785dc2bd-fbc4-43ce-8b01-727548dbf204" />
      </body>
      <title>Add watermark to Crystal Report</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,785dc2bd-fbc4-43ce-8b01-727548dbf204.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,785dc2bd-fbc4-43ce-8b01-727548dbf204.aspx</link>
      <pubDate>Tue, 26 Jun 2007 20:38:41 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;amp;docType=kc&amp;amp;externalId=c2005119&amp;amp;sliceId=&amp;amp;dialogID=2998976&amp;amp;stateId=1%200%203000588" href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;amp;docType=kc&amp;amp;externalId=c2005119&amp;amp;sliceId=&amp;amp;dialogID=2998976&amp;amp;stateId=1%200%203000588"&gt;http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&amp;amp;docType=kc&amp;amp;externalId=c2005119&amp;amp;sliceId=&amp;amp;dialogID=2998976&amp;amp;stateId=1%200%203000588&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Use the 'Underlay following section' formatting option to achieve this. 
&lt;p&gt;
1. Create an additional Page Header section: 
&lt;p&gt;
· Right-click the gray area to the left of the Page Header section 
&lt;p&gt;
- Select 'Insert section below' 
&lt;p&gt;
This inserts a second Page Header, so you now have a Page Header - a and a Page Header
- b. 
&lt;p&gt;
2. Re-size the Page Header - a section so it is the height of the page. 
&lt;p&gt;
3. Insert the bitmap image (a .BMP file) of the pre-printed form or logo for the watermark
into the Page Header -a section. 
&lt;p&gt;
4. Go to Format | Section to open the Section Expert window, and select the Page Header
- a section. 
&lt;p&gt;
5. Select the 'Underlay following section' option. 
&lt;p&gt;
6. Close the Section Expert. 
&lt;p&gt;
The bitmap image in Page Header - a now appears beneath all the sections that come
after it, up to the Page Footer. 
&lt;p&gt;
The Page Headers and Page Footers cannot exceed the vertical size of the report. 
&lt;p&gt;
NOTE: ===== 
&lt;p&gt;
Ensure that you suppress the Page Footer of the report because the Page Header cannot
underlay the Page Footer.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=785dc2bd-fbc4-43ce-8b01-727548dbf204" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,785dc2bd-fbc4-43ce-8b01-727548dbf204.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
&lt;!----connection string for SQL 2005 Express -----------&gt;<br />
&lt;!-- &lt;add key="DBConnStr" value="Provider=SQLOLEDB;Data Source=(local)\SQLExpress;
Initial Catalog= SMARTBRIDGE; Integrated Security=SSPI;"/&gt; --&gt;<br />
&lt;!-- &lt;add key="DBConnStrMaster" value="Provider=SQLOLEDB;Data Source=(local)\SQLExpress;
Initial Catalog= master; Integrated Security=SSPI;"/&gt; --&gt;
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af" />
      </body>
      <title>OLEDB Connection string for MSME of Smart Bridge SA</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af.aspx</link>
      <pubDate>Wed, 18 Apr 2007 17:51:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;lt;!----connection string for SQL 2005 Express -----------&amp;gt;&lt;br&gt;
&amp;lt;!-- &amp;lt;add key="DBConnStr" value="Provider=SQLOLEDB;Data Source=(local)\SQLExpress;
Initial Catalog= SMARTBRIDGE; Integrated Security=SSPI;"/&amp;gt; --&amp;gt;&lt;br&gt;
&amp;lt;!-- &amp;lt;add key="DBConnStrMaster" value="Provider=SQLOLEDB;Data Source=(local)\SQLExpress;
Initial Catalog= master; Integrated Security=SSPI;"/&amp;gt; --&amp;gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,9fd4a8e9-cab4-4a6c-a098-2572c7cbf7af.aspx</comments>
      <category>SDR</category>
    </item>
    <item>
      <trackback:ping>http://blog.ilovedoudou.com/Trackback.aspx?guid=7c1bcaaf-c8e2-402a-b07a-e5450a955649</trackback:ping>
      <pingback:server>http://blog.ilovedoudou.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.ilovedoudou.com/PermaLink,guid,7c1bcaaf-c8e2-402a-b07a-e5450a955649.aspx</pingback:target>
      <dc:creator>Kevin Mocha</dc:creator>
      <wfw:comment>http://blog.ilovedoudou.com/CommentView,guid,7c1bcaaf-c8e2-402a-b07a-e5450a955649.aspx</wfw:comment>
      <wfw:commentRss>http://blog.ilovedoudou.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7c1bcaaf-c8e2-402a-b07a-e5450a955649</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
iTextsharp tutorial: <a href="http://itextsharp.sourceforge.net/tutorial/index.html">http://itextsharp.sourceforge.net/tutorial/index.html</a></p>
        <p>
iText Java tutorial: <a href="http://itextdocs.lowagie.com/tutorial/">http://itextdocs.lowagie.com/tutorial/</a></p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=7c1bcaaf-c8e2-402a-b07a-e5450a955649" />
      </body>
      <title>iText Resources</title>
      <guid isPermaLink="false">http://blog.ilovedoudou.com/PermaLink,guid,7c1bcaaf-c8e2-402a-b07a-e5450a955649.aspx</guid>
      <link>http://blog.ilovedoudou.com/PermaLink,guid,7c1bcaaf-c8e2-402a-b07a-e5450a955649.aspx</link>
      <pubDate>Fri, 30 Mar 2007 21:41:16 GMT</pubDate>
      <description>&lt;p&gt;
iTextsharp tutorial: &lt;a href="http://itextsharp.sourceforge.net/tutorial/index.html"&gt;http://itextsharp.sourceforge.net/tutorial/index.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
iText Java tutorial: &lt;a href="http://itextdocs.lowagie.com/tutorial/"&gt;http://itextdocs.lowagie.com/tutorial/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=7c1bcaaf-c8e2-402a-b07a-e5450a955649" /&gt;</description>
      <comments>http://blog.ilovedoudou.com/CommentView,guid,7c1bcaaf-c8e2-402a-b07a-e5450a955649.aspx</comments>
      <category>SDR</category>
    </item>
  </channel>
</rss>