Sunday, September 24, 2006

Moving Blog

Hello,

I am moving this blog to my new personal website and will start posting much more frequently. Please view by blog at the new site. portal.iowacomputergurus.com/Mitchel

Wednesday, April 19, 2006

Back from vacation and looking for new topics

I'm back from vacation now and looking for some new reccomended topics to blog about. Please e-mail or post comments with suggestions!

Thursday, March 09, 2006

Creating Excel Files Via XML

Today I created a user sample and placed it out on the GotDotNet Forums, but I figured I'd post a bit more about the sample here on the blog.

This sample showed you how to create a full Excel workbook using XML only without any need for a local installation of Excel. I have found this solution very helpful with ASP.NET applications that need to create nicely formatted Excel documents. I do prefer this method over using HTML tables as they change the look and feel of the Excel document in addition they also prompt the users to save the document each and every time even when no changes have been made.

Below are links to download my sample from my host as well as from GDN.

Monday, March 06, 2006

ASP.NET 1.1 and FireFox

It has been a long time since I have made a post out here, so I think it is time that I restart these posting. If you have any recommendations or requests for topics please either post a comment or send me an e-mail. Now on with the actual post!!

As well all know browser compatibility is a major issue, trying to make you application work successfully in both IE and FireFox can be a very cumbersome task if you leave your ASP.NET application setup using the default setup. Out of the box ASP.NET will automatically determine if the client's browser is an up level or a down-level browser, however it incorrectly identified Mozilla's FireFox as a down-level browser when it should be an up level browser.

What does this difference mean? Well by FireFox being interpreted as a down-level browser ASP.NET thinks that it does not support, CSS, HTML 4.0, and JavaScript. All of which are actually supported by FireFox. This makes the rendered page to FireFox much larger in size (since it will render panels and other controls as tables instead of spans) and it makes it very hard for you to use CSS in a predictable manner.

The good news....it is a simple fix to alter the way that ASP.NET recognizes FireFox, simply add the below to you Web.Config file, somewhere between your opening and closing tags.



<browsercaps>
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))?">
browser=Gecko
<filter>
<case match="(Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))">
type=${type}
</case>
<case>
type=Mozilla
</case>
</filter>
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=0${major}
minorversion=0${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browsercaps>

Now, I know that looks daunting, but it simply is an addition that specifies the Browser Capabilities, hence the browserCaps XML tag. For more detailed information about the browserCaps Web.Config element, please see this MSDN article http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx

Tuesday, November 22, 2005

SSL

Enabling SSL on a web application seems to be a simple task, however there are always ways of complicating things and many wonderful "gotchas". Below are just a few of the things I have learned after implementing my most recent web application that requires transmission via https at all times.

First, to enable SSL for the entire application is very easy. In IIS you select the option that requires SSL. Now this sounds like you should be set to go, well not quite. With just this step your users will receive a HTTP 403,4 error if they try to access your site via HTTP. The easy way to resolve this issue is to place a custom error page for this specific error. On this page simply add a meta refresh tag to refresh the page and redirect it to the https location.

Sunday, October 23, 2005

ASP.NET Forms Authentication Pt 1

The more I have worked with ASP.NET myself and browsed the GDN forums I have came to realize that Forms Authentication although fairly simple is a very common item that raises many questions amonst developers, begginner and advanced. In this 2 step post I will explain some nice tips/tricks you can use to make ASP.NET Forms Authentication work for you and your application. Including the use of role based security.

Friday, October 21, 2005

Welcome!

Welcome to my blog. This is where I will share some of my knowledge on development practices etc.