Adding Meta Tags to the Head in ASP.NET 2.0

Wednesday, August 26, 2009

You can easily create a HtmlMeta object and add it to the Controls collection in the HtmlHead class exposed via Page.Header. Here's a few samples:




HtmlMeta metaKeyWords = new HtmlMeta();
metaKeyWords.Name = "keywords";
metaKeyWords.Content = "keywords goes here";
this.Header.Controls.Add(metaKeyWords);




HtmlMeta metaDesription = new HtmlMeta();
metaDesription.Name = "description";
metaDesription.Content = "description goes here";
this.Header.Controls.Add(metaDesription);

Read more...

Failed to access IIS metabase problem

Tuesday, August 25, 2009

Cause:
When you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly.

Solution:
Repair (Uninstall if repair does not work for you) .NET Framework 2.0
Simply run the following from command line to reset the IIS registry settings for aspnet user. Usually framework directory for .Net Framework 2.0 resides under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i

Read more...

  © Blogger templates Newspaper by Ourblogtemplates.com 2008

Back to TOP