CodeProject.TV

Exciting times ahead with Code Project!

beta-bg_large_thumbnail

For those that don’t know, Code Project is a fantastic place to find all the resources and expertise you need for developing software and websites.

The community that support the site are always on hand to answer your questions no matter how complex or simple they are. The articles that many top developers write are truly inspirational.

Today Code Project cut the red tape on a project they have been working on. The project comes in the form of CodeProject.TV

CodeProject.TV is a technical training marketplace that enables training providers and individual educators to share their knowledge through short, high-quality videos. The site was built because we all know people are bad at commitments and have no spare time. So it’s short 5-10 mins training videos for less than the price of a coffee. No subscriptions, no need to buy full courses. Just take what you need, when you need it.

The site offers 100′s of videos from some amazing partners who are covering ASP.NET, Java, HTML5, Ruby on Rails and tons more. Members of the site can post their own video’s and the best thing is, you can earn money from it!

If you don’t find the course or reference material you are after, keep checking back as more will be added as time goes on!

I was very fortunate to have been involved in the initial beta testing and preview of the site and love it. Please head on over and take a look. Better still become a Code Project member and try your hand at being your own author!

Visit: CodeProject.TV

Metro and Modern themes for WPF, Silverlight and WinRT

I really quite like the “metro” / “cosmopolitan” themes for WPF, Silverlight, WPF7/8 and RT.

Below is some links to places where you can get good themes from for your WPF and Silverlight applications.

Themes

WPF

http://mui.codeplex.com/

http://mahapps.com/MahApps.Metro/

http://cosmopolitanwpf.codeplex.com/

http://elysium.codeplex.com/

Silverlight (Silverlight 4 /5)

http://www.microsoft.com/en-us/download/details.aspx?id=14590

Note: Silverlight cosmopolitan is all you really need.

If you are using 3rd party products like Telerik or Infragistics, these controls support “Metro” themes. Both are very good.

Icons

Lastly, no control or template is complete without buttons and images. Syncfusion offer an amazing product that allows you to generate Metro inspired icons for your buttons and UI for free.

Check out Metro Studio :  http://www.syncfusion.com/downloads/metrostudio

Check out other Icons from:

http://modernuiicons.com/

Charts

http://modernuicharts.codeplex.com/

Windows 8 Samples from Microsoft

Saw this whilst looking into windows 8 development.

Lots of great examples!

http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-Samples

Error adding net.tcp protocol to IIS 7.5

While doing some work with Silverlight and WCF tcp duplex bindings I came across a very frustrating problem when trying to configure my IIS.

I am using Windows 8, .net 4 and IIS 7.5 although this problem also happens to windows server 2008 r2.

If you try to add a new net.tcp protocol, via the IIS manager,  for a port that is in the “allowed” ranges for Silverlight applications (the range allowed is 4502 to 4534, so watch those firewalls) I got:

Object not set to an instance of an object

Annoying error. So below are some things to try:

  • Ensure the Net.Tcp Listener Adapter windows service is running
  • Ensure netTcp is listed as an enabled protocol for your website (In IIS Manager, go to Advanced settings for your site)
  • Ensure netTcp is listed as an enabled protocol for application (directory) that is hosting your services (In IIS Manager, go to the directory hosting your services and select Advanced Settings)
  • Ensure your IIS site has a binding for net.tcp, with the correct port number listed.
  • Ensure you have installed the correct http activation and non http activation on your windows programs and features under .net 3.5 and WCF.

none of this worked and I had this setup correctly.

The only thing to try is via the command line.

  1. Open your command prompt (I did this under administrator).
  2. Navigate to the “%windir%\system32\inetsrv” directory.
  3. Type appcmd set site /site.name: “Default Web Site” /+bindings.[protocol='net.tcp',bindingInformation='4502:*']

This now added the correct port in the correct place. Why did the error occur, I don’t know. I don’t care now as this works fine. If anyone knows why then drop me a line :)

Some excellent links to other sites that helped my in fixing this!

http://forums.iis.net/t/1160443.aspx/1

http://msdn.microsoft.com/en-us/library/ms788757.aspx

And a good link on Silverlight and TCP communications:

http://blog.john-thiriet.com/en/topics/wcf-en/

WCF. There is already a listener on IP endpoint 0.0.0.0:x

Today I had an interesting problem. I ported a .net WCF service that was working fine on .net 4 to .net 4.5. I started getting “There is already a listener on IP endpoint 0.0.0.0:x” where x was the port for my net.tcp service.

My service is a net.tcp service with port sharing and named binding configurations.

After looking around I had to try and identify where this issue was coming from. I knew that there was no other program or service on that port however VS 2012 thought there was.

I ran the following in the command line window before running the service:

netstat -noa | find “x” (x being the port number)

i.e. netstat -noa | find “900″

commandprompt_netstat

You will see that if there is another process running you will see some detail on the screen and the far right number is the PID (Process ID) that is occupying the port. If there is nothing then you do not have a problem with things on your port.

In my case there was no issue so I googled it a bit and came across this fantastic post on StackOverflow.

http://stackoverflow.com/a/12412783/863434

Half way down is the exact fix. If you use Named binding configurations your mex needs to be the same in configuration. Long story short, create a custom binding for Mex and that matches your TCP.NET binding configuration.

Anyway the answer was sterling and worth looking at even if the problem is not yours anyway. good work Dugas!.

Silverlight’s new home on Microsoft

To be honest, I am a keen advocate of Silverlight, WPF and xaml. I am very disappointed in MS move to “popularize” HTML 5 and JS.

However, in October 2012 MS removed the Silverlight.net site and broke all the links to resources and references to threads.

Now, I continue to monitor the future Silverlight and tonight I came across its new home.

http://www.microsoft.com/silverlight/

Actually looks rather appealing and although there is no “new” content (yet) to the site, it does add a hint that there is still uncertainty and if MS have a page that “markets” this technology then there could still be hope in some small way.

Prism for .Net 4.5 Released on 5th October 2012

The P&P team have released compiled .net 4.5 assemblies for Prism. This is only a compiled release against the .net 4.5 framework so no new features. It has also been compiled against updated dependencies for Unity 3.0 and Common Service Locator.

This is for desktop only so no Silverlight or Windows phone.

If you are using .net 4 you should still use the following binaries:
Here

If you are using .net 4 and Silverlight 5 you should use the following binaries:
Here

If you are using .net 4.5 and use WPF then you should use the following binaries in zip form:
Here

Added to the 4.5 files, you will need to download them, and unblock the files. To remove the “Mark of the Web” you right click the file and left click on properties. Next click on “Unblock”:

Open the file and you will see the following files.

  • Microsoft.Practices.Prism.dll
  • Microsoft.Practices.Prism.UnityExtensions.dll
  • Microsoft.Practices.Prism.Interactivity.dll
  • Microsoft.Practices.Prism.MefExtensions.dll
Follow

Get every new post delivered to your Inbox.