This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit https://www.cyotek.com/blog for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Unable to update the EntitySet because it has a DefiningQuery and no element exists in the element to support the current operation.

c# sql server entity framework 3 Comments

After integrating the new forum code, I added basic subscription support. When replying to a topic and opting to subscribe to notifications, the following exception would be thrown:

Unable to update the EntitySet 'ThreadSubscriptions' because it has a DefiningQuery and no element exists in the element to support the current operation.

Read More

Converting BBCode into HTML using C#

c# bbcode html regular expression 0 Comments Downloads

Although the dynamic content in the Cyotek website is written using Markdown syntax using the MarkdownSharp library, we decided to use the more commonly used BBCode tags for the forums.

Some of the source code on this site is also preformatted using the CSharpFormat library, and we wanted to provide access to this via forum tags too.

Read More

Using XSLT to display an ASP.net sitemap without using tables

c# xslt sitemap transform xml webforms mvc asp.net 3 Comments

The quick and easy way of displaying an ASP.net site map (web.sitemap) in an ASP.net page is to use a TreeView control bound to a SiteMapDataSource component as shown in the following example:

<asp:SiteMapDataSource runat="server" ID="siteMapDataSource" EnableViewState="False"   ShowStartingNode="False" />
<asp:TreeView runat="server" ID="siteMapTreeView" DataSourceID="siteMapDataSource"  EnableClientScript="False" EnableViewState="False" ShowExpandCollapse="False"></asp:TreeView>
Read More

Error 80040154 when trying to use SourceSafe via interop on 64bit Windows

win64 80040154 {783cd4e4-9d54-11cf-b8ee-00608cc9a71f} interop com sourcesafe 9 Comments

We recently moved to Windows 7, and I decided to go with the 64bit version for my machine. One of the utilities we use is a small tool for adding folders to Visual SourceSafe (why we haven't moved to another SCC provider yet is another question!) via the SourceSafeTypeLib interop dll. However, I was most annoyed when it wouldn't work on my machine, the following exception message would be displayed:

Retrieving the COM class factory for component with CLSID {783CD4E4-9D54-11CF-B8EE-00608CC9A71F} failed due to the following error: 80040154.

Read More

Creating a GroupBox containing an image and a custom display rectangle

c# winforms groupbox displayrectangle 0 Comments Downloads

Add a new Component class to your project, and inherit this from the standard GroupBox.

    [ToolboxItem(true)]
    [DefaultEvent("Click"), DefaultProperty("Text")]
    public partial class GroupBox : System.Windows.Forms.GroupBox
Read More