Slides Available for TFS Overview

by Chad Green 20. February 2010 04:08

As promised, I have published the slides from my TFS Overview presentation to the Louisville .NET Meetup group. 

I want to thank Ed Blankenship for providing me with a bunch of the slides I used.

Tags:

TFS | Community | Speaking

Taking an ASP.NET Web Application Offline

by Chad Green 4. April 2009 14:40

Simple Answer

There are times you need to take an ASP.NET web application offline.  In general, the way to do so is place an App_Offline.htm file into the root of the web application.  The ASP.NET application looks for that with every request, if it see it then it will display that page vice the requested page.

My Problem

The one problem I have with this is that due to security at work, I need a system administrator to touch the web servers outside of the development network (even as the project lead, I’m not allowed to touch the production server).  Last week we had issues with the system due to some maintenance done on the database.  I wasn’t able to get a hold of the DBA to fix that problem and the on-call web administrator was not acting promptly enough to upload an App_Offline page I provided them.

So, for about five hours people were getting errors as soon as they logged into the system.  And wouldn’t you know this was a weekend that a lot of people decided to try to get things done.  Normally, almost nobody goes into the system during the weekend.

My Solution

With the events of last weekend, I decided that I needed to find a way to take the application offline for such problems without having to get the system administrator involved.  I did a lot of searching around the web and almost everything simply talked about the App_Offline solution.  The idea I came up with was to use a flag in the HTTP Application State to indicate whether the application was offline or not.  Then I would have the Application_BeginRequest event look at that, if the application was offline then direct to a page that told the user that the application was offline.  I describe this solution in detail below.

I would assume that you would add this solution to an existing web application, but for the purpose of this blog entry, I have created a new ASP.NET Web Application that I have called “ApplicationOfflineExample.”

ApplicationStateHelper Class

The first thing you will want to do with your application is add the ApplicationStateHelper class described below.  The purpose of this class is to provide helper methods for accessing the variables stored in the HTTP Application State.  The code for this class is as such:

Public NotInheritable Class ApplicationStateHelper  ''' <summary>  ''' Gets or sets a value indicating whether the application is offline.  ''' </summary>  ''' <value><c>True</c> if the application is offline; otherwise, <c>False</c>.</value>  ''' <revisions>  '''   <revision date="4/4/2009" author="CEG" version="1.00.00.000">Initial Development</revision>  ''' </revisions>  Public Shared Property ApplicationOffline() As Boolean    Get      If IsNothing(HttpContext.Current.Application.Item("ApplicationOffline")) = True _OrElse TypeOf HttpContext.Current.Application.Item("ApplicationOffline") Is Boolean = False Then        HttpContext.Current.Application.Add("ApplicationOffline", False)      End If      Return DirectCast(HttpContext.Current.Application.Item("ApplicationOffline"), Boolean)    End Get    Set(ByVal value As Boolean)      If IsNothing(HttpContext.Current.Application.Item("ApplicationOffline")) Then        HttpContext.Current.Application.Add("ApplicationOffline", value)      Else        HttpContext.Current.Application.Item("ApplicationOffline") = value      End If    End Set  End Property  ''' <summary>  ''' Gets or sets the application offline message.  ''' </summary>  ''' <value>The application offline message.</value>  ''' <revisions>  '''   <revision date="4/4/2009" author="Chad Green" version="1.00.00.000">Initial Development</revision>  ''' </revisions>  Public Shared Property ApplicationOfflineMessage() As String    Get      If IsNothing(HttpContext.Current.Application.Item("ApplicationOfflineMessage")) = True _OrElse TypeOf HttpContext.Current.Application.Item("ApplicationOfflineMessage") Is String = False Then        HttpContext.Current.Application.Add("ApplicationOfflineMessage", _"Application offline.  Try again later.")      End If      Return DirectCast(HttpContext.Current.Application.Item("ApplicationOfflineMessage"), String)    End Get    Set(ByVal value As String)      If IsNothing(HttpContext.Current.Application.Item("ApplicationOfflineMessage")) Then        HttpContext.Current.Application.Add("ApplicationOfflineMessage", value)      Else        HttpContext.Current.Application.Item("ApplicationOfflineMessage") = value      End If    End Set  End PropertyEnd Class

As you can see, we have two shared (static) property values.  The first one, ApplicationOffline, is a flag that indicates whether the application is offline or not.  The second, ApplicationOfflineMessage, stores the message that will be displayed to users when the application is offline.  The properties values are shared in order to provide quicker and easier access to the values throughout the web application.

Site Administration Web Page

In order to be able to set the offline status of the web application, I have added a web page, SiteAdministration.aspx, that provides the necessary capability.  The page contains several elements, including an indication as to the application’s offline status, a text box to specify the message displayed when the application is offline, and a button to switch the application offline status.  I have also added a Return Home link to make using this demo easier.

<html xmlns="http://www.w3.org/1999/xhtml" >  <head id="Head1" runat="server">    <title>Site Administration</title>  </head>  <body>    <form id="frmSiteAdministration" runat="server">      <p>The purpose of this page is to provide administration of the site.</p>      <hr />      <h1>Site Status</h1>      <p>The site is currently <asp:Label ID="lblSiteStatus"runat="server"Text="Online"Font-Bold="true"ForeColor="Black" />.</p>            <p>Offline Message: <asp:TextBox ID="txtOfflineMessage"runat="server"TextMode="MultiLine"Rows="5"Width="300" /></p>      <p><asp:Button ID="btnChangeSiteStatus" runat="server" Text="Take Site Offline" /></p>      <hr />      <p><a href="Default.aspx">Return Home</a></p>    </form>  </body></html>

In the code behind we have the following procedures.

Private Sub PrepareSiteStatusSection()    If ApplicationStateHelper.ApplicationOffline Then        lblSiteStatus.Text = "Offline"        lblSiteStatus.ForeColor = Drawing.Color.Red        btnChangeSiteStatus.Text = "Bring Site Back Online"    Else        lblSiteStatus.Text = "Online"        lblSiteStatus.ForeColor = Drawing.Color.Black        btnChangeSiteStatus.Text = "Take Site Offline"    End If    txtOfflineMessage.Text = ApplicationStateHelper.ApplicationOfflineMessageEnd Sub

The PrepareSiteStatusSection takes the application offline status information and populates the appropriate details on the page.  This method is used later when updating the page.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load    If Not Page.IsPostBack Then        PrepareSiteStatusSection()    End IfEnd Sub

Then we have the Page_Load method.  The only thing we are doing here is calling the PrepareSiteStatusSection method to populate Site Status section of the page.

Private Sub btnChangeSiteStatus_Click(ByVal sender As Object, _ByVal e As System.EventArgs) Handles btnChangeSiteStatus.Click  ApplicationStateHelper.ApplicationOffline = Not ApplicationStateHelper.ApplicationOffline  ApplicationStateHelper.ApplicationOfflineMessage = txtOfflineMessage.Text  PrepareSiteStatusSection()End Sub

Finally we have the button click event handler code that will either take the application offline or back online.

Application Offline Web Page

Next, we add a web page that will be used to inform users that the application is offline.

<html xmlns="http://www.w3.org/1999/xhtml" >  <head id="Head1" runat="server">    <title>Application Offline</title>  </head>  <body>    <form id="frmApplicationOffline" runat="server">      <asp:Label ID="lblOfflineMessage" runat="server" />    </form>  </body></html>

As you can see, this page is very simple and just includes a label that we’ll populate in the page’s load event seen below.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  If Not Page.IsPostBack Then    lblOfflineMessage.Text = ApplicationStateHelper.ApplicationOfflineMessage  End IfEnd Sub

Global Application Class

Finally, we need to modify the Application_BeginRequest method in the Global Application Class (Global.asax).  If your application does not have such, make sure to add it now.  Then you want to add the If clause shown below to the Application_BeginRequest method.

Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)  If Request.Path <> "/SiteAdministration.aspx" AndAlso _Request.Path <> "/ApplicationOffline.aspx" Then    If ApplicationStateHelper.ApplicationOffline Then      Response.Redirect("ApplicationOffline.aspx")    End If  End IfEnd Sub

First thing we do is ensure that the application is not serving up the SiteAdminsitration or ApplicationOffline pages.  Obviously we want those to continue to work.  Next we are looking at the ApplicationOffline variable from the ApplicationStateHelper.  If it is set to the True, then we redirect to the ApplicationOffline page.

Results

Now, if you run the application everything will work.  Once you go to the Site Administration page and click the Take Site Offline button, users will no longer be able to access the application web pages other than the Site Administration page (which you would use some type of authorization method to only allow authorized users to the page).

The only caveat I have found so far is that if your application gets restarted for any reason, the offline flag will return to false allowing users to access the whole application.

Download Example Solution Here

 

kick it on DotNetKicks.com

Tags:

Using Windows Live Writer with BlogEngine.net

by Chad Green 2. February 2009 00:42

Using the built-in blog entry tools in BlogEngine.net works just fine, but I have come to like Windows Live Writer better.  It just seems to make things just a little bit easier.  Here are some very simple instructions on how to get Windows Live Writer working for BlogEngine.net.

After you have downloaded Windows Live Writer, you will find it the Windows Live menu.  The first time you open it you will be presented with the dialog below prompting you to configure it.  Click the Next button.

WindowsLiveWriter_1

Next you’ll be asked to specify which blog service you use.  As you can see, Live Writer is automatically configured for Windows Live Spaces and SharePoint blogs.  For BlogEngine.NET, you will want to select the “Other blog service” and click the Next button.

WindowsLiveWriter_2

Now, you will need to provide your account information for your blog.

WindowsLiveWriter_3

After clicking the Next button, Windows Live Writer will go out and ensure it can connect to your blog and make all the settings needed to post to the blog.

WindowsLiveWriter_4

It takes about a minute for Windows Live Writer to configure itself.  Once it has you will be asked to provide a nickname for the blog.  This is used within Windows Live Writer to distinguish between the different blogs you have setup.

WindowsLiveWriter_5 

One other option you are given on the is screen is to send notifications of blog updates to your Windows Live profile.  This is another way of advertising your blog.

Clicking the Finish button will take you to the application and you can now create blog entries.

One of the great features of using Windows Live Writer is that it picks up your theme and shows you exactly how the post will look like.

The only issue I have found so far is that the “Set publish date” feature doesn’t seem to work.  If you need to specifically set the publish date, do so in the BlogEngine.net interface after having BlogEngine.net publish the entry.

UPDATE:  Received a twit from Brandon Turner (one of the Windows Live Writer developers) that the publish date problem should be fixed in BlogEngine.NET 1.5.

kick it on DotNetKicks.com

Tags:

Extension Library Project Released

by Chad Green 24. November 2008 06:07

I’m a big fan of extension methods and I have been using them for since .NET 3.5 was released.  One of the things I have been thinking about doing for quite some time is to publish my library of extension methods I have built.  Today I’m proud to announce the initial release of my Extension Library project on CodePlex.

This library includes useful extensions to the following types:

  • DataRow

  • DataSet

  • DateTime

  • IDataReader

  • Integer

  • ListControl

  • Object

  • String

  • WebControl

One of things I wanted, which is part of the reasons why it took me so long to get this project published, is full documentation.  You can download that here:  ExtensionLibrary.dll (31.00 kb)

kick it on DotNetKicks.com

Tags:

Rules to Enable When Using Code Analysis

by Chad Green 22. November 2008 23:26

One of the hardest parts of using the Visual Studio Code Analysis tool (or FXCop) is trying to figure out which rules to worry about.  Last year David Kean published the What rules do Microsoft have turned on internally? article.  This article provide some really good insight and let us know that Microsoft is realistic when it writes its own code.

According to the article, there are several reasons why rules would be turned off:

  • Applicability.  Not every rule is applicable to every project, for example, the Design rules might be turned off if you are writing a Windows Application
  • Noise rate.  Some rules have a low signal-to-noise ratio.  While we try remove as much noise as possible from a rule, some rules, due to limitations in our analysis engine, still remain to be too noisy to be run regularly over large code bases.  For example, some of the performance rules lack real context to make a good judge to whether a particular issue will really affect the performance of an application.
  • Time.  We have to ship eventually - attempting to fix every single violation, for every single binary is just not feasible nor advisable.  Therefore we make calls to turn off some rules that may lack value and do not impact the security of the product.

Since Visual Studio 2005 came out, I have been working on determining which rules to turn off.  Initially, I would keep everything on and then turn off a rule when I was getting violations that I simply didn’t want to worry about (for one reason or another).

Because of the way how things went this summer at work, I ended up having time to really go through and evaluate all of the rules.  The list below is the list of rules I have determined should be used when performing code analysis.  One other thing I did was also determine whether I wanted to consider a rule as an error or a warning.  The idea was to ensure that there are some rules that have a higher level or importance and the project shouldn’t even compile until those rules pass.

Design

ID

Rule Name

Violation Treatment

CA1001

Types that own disposable fields should be disposable

Error

CA1003

Use generic event handler instances

Error

CA1004

Generic methods should provide type parameter

Warning

CA1006

Do not nest generic types in member signature

Warning

CA1008

Enums should have zero value

Error

CA1009

Declare event handlers correctly

Error

CA1010

Collections should implement generic interface

Warning

CA1011

Consider passing base types as parameter

Warning

CA1012

Abstract types should not have constructors

Error

CA1014

Mark assemblies with CLSCompliantAttribute attribute

Error

CA1017

Mark assemblies with ComVisibleAttribute

Error

CA1018

Mark attributes with the AttributeUsageAttribute attribute

Warning

CA1019

Define accessors for attribute arguments

Warning

CA1023

Indexers should not be multidimensional

Warning

CA1024

Use properties where appropriate

Warning

CA1025

Replace repetitive arguments with params array

Warning

CA1026

Default parameters should not be used

Error

CA1027

Mark enums with FlagsAttribute

Warning

CA1028

Enum storage should be Int32

Warning

CA1030

Use events where appropriate

Warning

CA1032

Implement standard exception constructions

Error

CA1034

Nested types should not be visible

Error

CA1036

Override methods on comparable types

Warning

CA1038

Enumerators should be strongly typed

Warning

CA1039

Lists are strongly typed

Warning

CA1040

Avoid empty interfaces

Warning

CA1041

Provide ObsoleteAttribute message

Error

CA1043

Use integral or string argument for indexers

Warning

CA1044

Properties should not be write only

Warning

CA1047

Do not declare protected members in sealed types

Error

CA1049

Types that own native resources should be disposable

Warning

CA1050

Declare types in namespaces

Warning

CA1051

Do not declare visible instance fields

Error

CA1052

Static holder types should be sealed

Error

CA1053

Static holders should not have constructors

Error

CA1054

URI parameters should not be strings

Warning

CA1055

URI return values should not be strings

Warning

CA1056

URI properties should not be strings

Warning

CA1057

String URI overloads call System.Uri overloads

Warning

CA1058

Types should not extend certain base types

Error

CA1059

Members should not expose certain concrete types

Warning

CA1062

Validate arguments of public methods

Warning

CA1063

Implement IDisposable correctly

Error

CA1064

Exceptions should be public

Warning

CA1065

Do not raise exceptions in unexpected locations

Error

Globalization

ID

Rule Name

Violation Treatment

CA1301

Avoid duplicate accelerators

Error

CA1302

Do not hardcode local specific strings

Warning

CA1308

Normalize strings to uppercase

Warning

CA2101

Specify marshaling for P/Invoke string arguments

Error

Interoperability

ID

Rule Name

Violation Treatment

CA1400

P/Invoke should not be visible

Error

CA1401

P/Invokes should not be visible

Error

CA1402

Avoid overloads in COM visible interfaces

Error

CA1403

Auto layout types should not be COM visible

Error

CA1404

Call GetLastError immediately after P/Invoke

Warning

CA1405

COM visible type base types should be COM visible

Error

CA1406

Avoid Int64 arguments for Visual Basic 6 clients

Warning

CA1408

Do not use AutoDual ClassInterfaceType

Error

CA1413

Avoid non-public fields in COM visible value types

Warning

Maintainability

ID

Rule Name

Violation Treatment

CA1500

Variable names should not match field names

Error

CA1501

Avoid excessive inheritance

Warning

CA1502

Avoid excessive complexity

Warning

CA1504

Review misleading field names

Error

CA1505

Avoid unmaintainable code

Warning

CA1506

Avoid excessive class coupling

Warning

Portability

ID

Rule Name

Violation Treatment

CA1900

Value type fields should be portable

Error

CA1901

P/Invoke declarations should be portable

Error

Reliability

ID

Rule Name

Violation Treatment

CA2001

Avoid calling problematic methods

Error

CA2002

Do not lock on objects with weak identity

Error

CA2003

Do not treat fibers as threads

Error

CA2004

Remove calls to GC.KeepAlive

Warning

CA2006

Use SafeHandle to encapsulate native resources

Error

Naming

ID

Rule Name

Violation Treatment

CA1700

Do not name enum values ‘Reserved’

Error

CA1701

Resource string compound words should be cased correctly

Warning

CA1702

Compound words should be cased correctly

Error

CA1703

Resource strings should be spelled correctly

Warning

CA1704

Identifiers should be spelled correctly

Warning

CA1707

Identifiers should not contain underscores

Error

CA1708

Identifiers should differ by more than case

Error

CA1709

Identifiers should be cased correctly

Warning

CA1710

Identifiers should have correct suffix

Error

CA1711

Identifiers should have incorrect suffix

Error

CA1712

Do not prefix enum values with type name

Error

CA1713

Events should not have before or after prefix

Error

CA1714

Flags enum should have plural names

Warning

CA1715

Identifiers should have correct prefix

Error

CA1716

Identifiers should not match keywords

Error

CA1717

Only FlagsAttribute enums should have plural names

Error

CA1719

Parameter names should not match member names

Error

CA1720

Identifiers should not contain type names

Error

CA1721

Property names should not match get methods

Error

CA1722

Identifiers should not have incorrect prefix

Error

CA1723

Use preferred terms

Error

CA1724

Type names should not match namespaces

Error

CA1725

Parameter names should match base declaration

Warning

Performance

ID

Rule Name

Violation Treatment

CA1800

Do not cast unnecessarily

Warning

CA1801

Avoid uninstantiated internal classes

Warning

CA1802

Use literals where appropriate

Warning

CA1804

Remove unused locals

Warning

CA1805

Do not initialize unnecessarily

Warning

CA1806

Do not ignore method results

Warning

CA1810

Initialize reference type static fields inline

Warning

CA1811

Avoid uncalled private code

Warning

CA1812

Avoid uninstantiated internal classes

Warning

CA1813

Avoid unsealed attributes

Warning

CA1814

Prefer jagged arrays over multidimensional

Warning

CA1815

Override equals and operator equals on value types

Warning

CA1819

Properties should not return arrays

Error

CA1820

Test for empty strings using string length

Warning

CA1821

Remove empty finalizers

Warning

CA1822

Mark members as static

Warning

CA1823

Avoid unused private fields

Warning

CA1824

Mark assemblies with NeutralResourcesLanguageAttribute

Warning

Security

ID

Rule Name

Violation Treatment

CA2102

Specify marshaling for P/Invoke string arguments

Error

CA2103

Review imperative security

Warning

CA2104

Do not declare read only mutable reference types

Warning

CA2105

Do not declare read only mutable reference types

Error

CA2106

Secure asserts

Warning

CA2107

Review deny and permit only usage

Warning

CA2108

Review declarative security on value types

Warning

CA2109

Review visible event handlers

Warning

CA2111

Pointers should not be visible

Warning

CA2112

Secured types should not expose fields

Warning

CA2114

Method security should be superset of type

Warning

CA2115

Call GC.KeepAlive when using native resources

Warning

CA2116

APTCA methods should only call APTCA methods

Warning

CA2117

APTCA types should only extend APTCA base types

Warning

CA2118

Review SuppressUnmanagedCodeSecurityAttribute usage

Warning

CA2119

Seal methods that satisfy private interfaces

Warning

CA2120

Secure serialization constructors

Error

CA2121

Static constructors should be private

Error

CA2122

Do not indirectly expose methods with link demands

Warning

CA2123

Override link demands should be identical to base

Error

CA2124

Wrap vulnerable finally clauses in outer try

Error

CA2126

Type link demands require inheritance demands

Error

CA2127

Security transparent assemblies should not contain security critical code

Error

CA2128

Security transparent code should not assert

Error

CA2129

Security transparent code should not reference non-public security critical members

Error

Usage

ID

Rule Name

Violation Treatment

CA1806

Do not ignore method results

Warning

CA2200

Rethrow to preserve stack details

Error

CA2201

Do not raise reserved exception types

Warning

CA2207

Do not ignore method results

Warning

CA2208

Instantiate argument exceptions correctly

Warning

CA2210

Assemblies should have valid strong names

Error

CA2211

Non-constant fields should not be visible

Warning

CA2212

Do not mark serviced components with WebMethod

Warning

CA2213

Disposable fields should be disposed

Warning

CA2214

Do not call overridable methods in constructors

Error

CA2216

Disosable fields should be disposed

Warning

CA2217

Disposable fields should be disposed

Error

CA2218

Override GetHashCode on override Equals

Error

CA2219

Do not raise exceptions in exception clauses

Error

CA2220

Finanizers should call base class finalizer

Error

CA2221

Finalizers should be protected

Error

CA2222

Do not decrease inherited member visibility

Error

CA2224

Override equals on overloading operator equals

Warning

CA2225

Operator overloads have named alternates

Error

CA2226

Operators should have symmetrical overloads

Error

CA2227

Collection properties should be read only

Error

CA2228

Do not ship unreleased resource formats

Error

CA2229

Implement serialization constructors

Error

CA2230

Use params for variable arguments

Error

CA2231

Operator overloads have named alternates

Warning

CA2233

Operations should not overflow

Warning

CA2234

Pass System.Uri objects instead of strings

Warning

CA2235

Mark all non-serializable fields

Error

CA2236

Call base class methods on ISerializable types

Error

CA2237

Mark ISerializable types with SerializableAttribute

Error

CA2238

Implement serialization methods correctly

Error

CA2239

Provide deserialization methods for optional fields

Warning

CA2240

Implement ISerializable correctly

Error

CA2242

Test for NaN correctly

Warning

CA2243

Attribute string literals should parse correctly

Warning

clip_image002

Tags:

Documenting Revisions in XML Documentation Comments

by Chad Green 22. November 2008 23:19

XML Documentation Comments are a great feature within .NET (although credit does go to Sun with their JavaDoc which XML comments are based off).  One thing that is missing is the ability to document the revisions to a code construct (types and type members).  As a class library matures and gets changed to meet changed/new requirements, it helps to know when and what was changed.

For the longest time I have been my own <revisions> tag with <revision> tags within.  The revision tag contains the following parameters:

date
The date the revision to the code construct was made.

author
Name of the author that made the revision.

version
The version of the assembly where the revision was made.

cc
Identifier of the change control item.

Example
”’ <summary>
”’ Returns the <see cref="Boolean">Boolean</see> value of the specified column.
”’ </summary>
”’ <param name="input">The <see cref="DataRow">DataRow</see> containing the desired data.</param>
”’ <param name="columnName">Name of the column to retrieve the desired data from.</param>
”’ <returns>The <see cref="Boolean">Boolean</see> value stored in the specified column.</returns>
”’ <remarks>If the specified column contains a null, the return value will be <c>False</c>.</remarks>
”’ <revisions>
”’   <revision date="11/2/2008" author="Chad Green" version="1.00.00.000">Initial Development</revision>
”’ </revisions>
<Extension()> Public Function GetBooleanValue(ByVal input As DataRow, _
                                                                  
ByVal columnName As String) As Boolean
  Return GetBooleanValue(input, columnName, False)
End Function

Documentation Generation
Once you start using this tag, you’ll need to update the main_sandcastle.xsl file to include the revision information in your documentation.  The location of this file will depend on the presentation style you’re using.  For example, if you the vs2005 style the file will be located at C:\Program Files (x86)\Sandcastle\Presentation\vs2005\transforms\.  First, you’ll need to add the following to the "body" xsl template:

<!– revisions –>
<
xsl:apply-templates select="/document/comments/revisions" />

 

Then, you’ll need to add the following xsl template:

<xsl:template match="revisions">
  <
xsl:call-template name="section">
    <
xsl:with-param name="toggleSwitch" select="‘revisons’"/>
    <
xsl:with-param name="title">Revisions</xsl:with-param>
    <
xsl:with-param name="content">
      <
div class="tableSection">
        <
table width="100%" cellspacing="2" cellpadding="5" frame="lhs">
          <
tr>
            <
th>Date</th>
            <
th>Author</th>
             <
th>Version</th>
             <
th>Description</th>
           </
tr>
           <
xsl:for-each select="revision">
            
<tr>
               <
td>
                 <
xsl:value-of select="@date" />
               </
td>
               <
td>
                 <
xsl:value-of select="@author" />
               </
td>
               <
td>
                 <
xsl:value-of select="@version" />
               </
td>
               <
td>
                 <
xsl:apply-templates />
               </
td>
             </
tr>
           </
xsl:for-each>
         </
table>
       </
div>
     </
xsl:with-param>
  
</xsl:call-template>
</
xsl:template>

 

 

Now when you generate your documentation, you will have something like this added to your documentation:

kick it on DotNetKicks.com

Tags:

Hotfix to Correct Visual Studio 2008 Performance Issues Released

by Chad Green 8. February 2008 13:11

As I mentioned the other day, Visual Studio 2008 was released with some pretty serious performance issues.  Well, within the last couple of hours Microsoft released the promised hotfix to correct the problems.  According to the Microsoft Connect site, this hotfix addresses the following issues:

HTML Source view performance

· Source editor freezes for a few seconds when typing in a page with a custom control that has more than two levels of sub-properties.
· “View Code” right-click context menu command takes a long time to appear with web application projects.
· Visual Studio has very slow behavior when opening large HTML documents.
· Visual Studio has responsiveness issues when working with big HTML files with certain markup.
· The Tab/Shift-Tab (Indent/Un-indent) operation is slow with large HTML selections.

Design view performance

· Slow typing in design view with certain page markup configurations.

HTML editing

· Quotes are not inserted after Class or CssClass attribute even when the option is enabled.
· Visual Studio crashes when ServiceReference element points back to the current web page.

JavaScript editing

· When opening a JavaScript file, colorization of the client script is sometimes delayed several seconds.
· JavaScript Intellisense does not work if an empty string property is encountered before the current line of editing.

Web Site build performance

· Build is very slow when Bin folder contains large number of assemblies and .refresh files with web-site projects.

I have download and installed the hotfix and did a couple of things.  Things seem to look good, but I will not be able to really test out fixes until I get on my work machine.  But, I wanted to go ahead and let everyone know about the hotfix's availability.

You can get the hotfix here:  https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10826

kick it on DotNetKicks.com

Tags:

IsNothing Not Included in VB.NET AutoComplete

by Chad Green 5. February 2008 11:44

One of the more annoying things I have found with Visual Studio 2008 is that the IsNothing command is not included in the VB.NET AutoComplete listbox.  Once you get use to the AutoComplete (doesn't really take long) you really hate it when something straight from the language is missing.

If you agree with me, go to Microsoft connect site and rate the feedback so they'll be more willing to work on the issue.  I submitted feedback to Microsoft via the Connect, so if you agree this should be fixed, please go to https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=327338 and rate it so Microsoft will be more willing to work on the issue.

kick it on DotNetKicks.com

Tags:

Visual Studio 2008 Performance Issues

by Chad Green 3. February 2008 18:31

As you can see, I’m using BlogEngine.NET to run this site. It’s a pretty cool application even if you don’t make any changes to it. As I found a couple of months ago, getting it installed on a web site hosted with GoDaddy was not as simple as it should be.

Well, now GoDaddy includes BlogEngine.NET with its offerings in the GoDaddy Hosting Connection. Simply click on a button to install the application and answer a couple of questions and GoDaddy fires off a process to install BlogEngine.NET on within hosting account.

But it appears that the install process forgot a very important step (at least when I did this). The App_Data folder is not given write permission which prevents you from making some setting changes. To correct this problem, do the following:

  1. Log into your GoDaddy account
  2. Under “My Products”, click “Hosting Account List”
  3. You’ll be redirected to the Manage Hosting page, click the Open Control Panel option for the appropriate domain.
  4. A new browser window will be opened to the GoDaddy Hosting Control Cneter.
  5. From the Content menu, select File Manger.
  6. Check the checkbox for the App_Data folder (which will enable the Permissions button).
  7. Click on the Permissions button
  8. Ensure that the Write option is checked

After that, everything should work just fine.

kick it on DotNetKicks.com

Tags:

Getting BlogEngine.NET Working with GoDaddy

by Chad Green 3. February 2008 11:01

As you can see, I’m using BlogEngine.NET to run this site. It’s a pretty cool application even if you don’t make any changes to it. As I found a couple of months ago, getting it installed on a web site hosted with GoDaddy was not as simple as it should be.

Well, now GoDaddy includes BlogEngine.NET with its offerings in the GoDaddy Hosting Connection. Simply click on a button to install the application and answer a couple of questions and GoDaddy fires off a process to install BlogEngine.NET on within hosting account.

But it appears that the install process forgot a very important step (at least when I did this). The App_Data folder is not given write permission which prevents you from making some setting changes. To correct this problem, do the following:

  1. Log into your GoDaddy account
  2. Under “My Products”, click “Hosting Account List”
  3. You’ll be redirected to the Manage Hosting page, click the Open Control Panel option for the appropriate domain.
  4. A new browser window will be opened to the GoDaddy Hosting Control Cneter.
  5. From the Content menu, select File Manger.
  6. Check the checkbox for the App_Data folder (which will enable the Permissions button).
  7. Click on the Permissions button
  8. Ensure that the Write option is checked

After that, everything should work just fine.

kick it on DotNetKicks.com

Tags:

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

TextBox

Tag cloud