<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title>Blog</title>
		<link>http://www.dind.com/blog/aspnet-20/</link>
		<description></description>
		<language>en-us</language>
		<pubDate>Fri, 18 May 2012 19:27:35 PDT</pubDate>
		<lastBuildDate>Fri, 18 May 2012 19:27:35 PDT</lastBuildDate>
		<generator>SiteCrafting.com GearBox 1.1 (beta)</generator>
		
		<item>
			<title>MS SQL Server 2005 text and ntext</title>
			<link>http://www.sitecrafting.com/blog/ms-sql-server-2005-ntext-1/</link>
			<description>How I discovered that text, ntext, and image data types have been deprecated and replaced by varchar(max), ntext(max), and varbinary(max).Recently, I needed to perform a query to update a number of links for the Pierce Count Library website. I thought I could use a simple REPLACE() string function, unfortunately, this turned out not to be the case. In order to update text and ntext datatypes using a query you're limited to a few functions, in my case I would be forced to use SUBSTRING() or UPDATETEXT().My original plan was to update all links in a field using a query like this:UPDATE web_pages SET web_pages.article1 = REPLACE( web_pages.article1, &quot;http://bad_link//&quot;, &quot;http://&quot;)Of course, when I tried this, I got an error that ntext datatypes are not allowed for the REPLACE function. So, I went online and begin searching for a function similar to REPLACE() that would work with ntext, that's when I found the msdn page for working with text, ntext, and image data types. I could have figured out a way to use SUBSTRING() or UPDATETEXT(), but  I determined that it would be much quicker to just look for the records that contained the bad links and update them manually.Later, I decided to do some research on the subject, because I just couldn't believe that there wasn't a way to use simple string functions with text and ntext. That's when I came across an informit article about Date, Math and Text Functions in SQL Server 2000 that explains how string functions don't work with text and ntext. Undaunted, I continued researching some more and that's when I found out that text, ntext, and image data types have been depracated for SQL 2005 and replaced by varchar(max), ntext(max), and varbinary(max). In fact, in future releases text, ntext, and image will no longer be supported. View the list at Deprecated Database Engine Features in SQL Server 2005.If I had only known. I would have designed all the fields to use nvarchar(max) instead of ntext. This would have solved a couple of problems for me. The first problem is that ntext data types can't be used in GROUP BY clauses and the second I would have been able to update the bad links a whole lot quicker by being able to use string functions. And if there was a need, I would have been able to use string functions in select statements to manipulate the text.</description>
			<pubDate>Fri, 27 Oct 2006 11:25:00 PDT</pubDate>
		</item>
			
		<item>
			<title>How To Full-Text Search</title>
			<link>http://www.sitecrafting.com/blog/to-full-search/</link>
			<description>Here's a quick how-to on implementing Full-Text Searching using Microsoft SQL Server 2005. Originally, I planned on just using LIKE statements in the WHERE clause of an sql query, however, this would not be possible since, as I posted earlier in MS SQL Server 2005 text and ntext, that string functions do not work on text and ntext data types.That's when I remembered Joe's blog entry about Cross Table Content Search, which he also mentioned in the office a couple of times before his entry. After that, I've been wanting to implement the Cross Table Content Search, and did not get the opportunity until developing the search page for the Pierce County Library. So, I delved into applying Cross Table Content Search and began researching ways to do that for Microsoft Server 2005. There are basically three parts, adding full-text to the database, creating a stored procedure, and creating a dataset to use that stored procedure.Add Full-Text IndexingThe very first step is ensuring that full-text indexing has been enabled for the database. The instructions I read online mentioned that this should be enabled when a new database is created, but I found this not to be the case for both our local testing server and the live server.These are steps to use when using SQL Server Management Studio for Microsoft Server 2005.Enable Full-text. The link is a how to, please note that the &quot;Use full-text indexing&quot; is a check-box near the top.Enable A Table for Full Text Indexing. Following these will cause a wizard to start. The first part is selecting which fields from the table should be indexed.The second part is creating a catalog or using an existing catalog. You can give a new catalog any name you wish and all the indexed fields will be added to this catalog.There's also options for creating a job that runs to update the catalog at a certain date and time, but this can be ignored if you chose to update the catalog automatically.After the wizard completes, right-click the table and then click Full-Text Indexing-&amp;gt;Start Full Population.The article Understanding SQL Server Full-text Indexing explains the wizard for SQL Server 200. Please look under the heading Enabling Full Text Indexing.Continue to enable each table that you wish to have Full-Text Indexing.Create a Stored ProcedureInitially, I intended to simply create a query in an asp.net 2.0 dataset and use a parameter for the search term. However, I quickly learned that queries and views can't use parameters when using the FREETEXT() and CONTAINS() predicates. Meaning Select * from kewl_gadgets Where CONTAINS(description, @search_terms) would fail. However, the parameter will work for a stored procedure.Here's a sample stored procedure:USE [kewlDatabase]GO/****** Object:&amp;nbsp; StoredProcedure [dbo].[spKewlSearch]&amp;nbsp;&amp;nbsp;&amp;nbsp; Script Date: 11/01/2006 17:18:14 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Ken Foubert-- Create date: 11/1/2006-- Description:&amp;nbsp;&amp;nbsp;&amp;nbsp; Full Text Search on kewl gadgets content-- =============================================CREATE PROCEDURE [dbo].[spKewlSearch]( @searchWords AS nvarchar(255) ) AS&amp;nbsp;&amp;nbsp;  SELECT kewl_gadgets.name, kewl_gadgets.item_no, kewl_gadgets.costFROM kewl_gadets LEFT OUTER JOIN kewl_gadget_features ON kewl_gadgets.gadget_number = kewl_gadgent_features.gadget_numberWHERE CONTAINS( (kewl_gadgets.name, kewl_gadgets.description), @searchWords) OR CONTAINS(kewl_gadget_features.*, @searchWords) returnThere are two ways to tell which fields that CONTAINS() should look at.List field names from a table that should be searched on. This list needs to have parenthesis and the fields need to be full-text indexed, ie (kewl_gadgets.name, kewl_gadgets.description) Use table_name.* to tell CONTAINS()&amp;nbsp; to do a search on all the fields that have been full-text indexed.Create a CONTAINS() predicate for each table you wish to search on.NOTE: When passing the @searchTerm values, please make sure that the words have quotes around them when using the CONTAINS(). @searchTerm = &quot;kewl radios&quot;. You can parse out the search term to be @searchTerm = &quot;kewl&quot; and &quot;radios&quot; or @searchTerm = &quot;kewl&quot; near &quot;radios&quot;, etc.This stored procedure is good for simple searches. You have an option of also using FREETEXT() which looks for words that are similar to the search terms by using a thesaurus.To learn more click CONTAINS or FREETEXT.In addition, with Full-text indexing you can get results that return a relevancy number by using CONTAINSTABLE or FREETEXTTABLE. For additional information take a look at Full-Text Search Developer InfoCenter.Create DatasetThe final step is to create a dataset or data adapter to use the stored procedure. I will not go into detail on how to do this. I leave that up to you.</description>
			<pubDate>Fri, 03 Nov 2006 10:51:00 PST</pubDate>
		</item>
			
		<item>
			<title>ASP.NET 2.0 Tips - Shared Functions</title>
			<link>http://www.sitecrafting.com/blog/aspnet-20-tips-shared-functions/</link>
			<description>When developing a recent project for ASP.NET, there was a need to migrate a large number of generic functions that were created in PHP into the .net web project. For .net 1.0, you were able to add a code page that could be used for creating a bunch of functions. However, in .net 2.0, you still had the ability to add a code page, but it had to be a class. This meant placing all of our migrated functions as methods inside a class. To use a generic function, such as generateNewPassword(), you would have to first create a new object for the class and then call the method.Example:Dim objGenericFunctions as new GenericFunctions()blnPasswordSent = generateNewPassword(firstName, lastName, email)There are a couple of problems with this technique. First, since .net 2.0 encourages object-oriented programming, you could either create objGenericFunctions() once and pass the object as a parameter to other classes. But this requires extra code management, especially when there are classes that call other classes that might need to use some of those Generic Functions from objGenericFunctions. Or you could create a new objGenericfunctions whenever you need it, but this means creating a number of objects for the GenericFunctions class, which seems to be a waste of system resources. In developing classes for PHP 5.0, you could declare a class function as static. Which allowed you to use that method without having to create a new object. After some googling, I learned that VB.net also has a similar declaration, but they call it shared. So, by declaring a class function as shared, there's no need to create a new object each time.Example:blnPasswordSent = GenericFunctions.generateNewPassword(firstName, lastName, email)Here's a sample class with a shared function:Imports Microsoft.VisualBasicImports System.WebPublic Class GenericFunctions&amp;nbsp;&amp;nbsp; Public Shared Function isDateInRange(ByVal dateStart As DateTime, ByVal dateEnd As DateTime, ByVal dateCompare As DateTime) As Boolean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim blnInRange As Boolean = False&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim intStartDiff As Integer = 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim intEndDiff As Integer = 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intStartDiff = Date.Compare(dateStart, dateCompare)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intEndDiff = Date.Compare(dateCompare, dateEnd)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If intStartDiff &amp;lt;= 0 And intEndDiff &amp;lt;= 0 Then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blnInRange = True&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return blnInRange&amp;nbsp;&amp;nbsp;&amp;nbsp; End FunctionEnd ClassWe can take this one step for further by adding a namespace declaration to the class. By using a namespace, we can now add Imports GenericFunctions to the top of a code page and access those methods without having to type GenericFunctions first.Sample of Namespace declaration:Imports Microsoft.VisualBasicImports System.WebNamespace GenericFunctions&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Class GenericFunctions&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Place all the functions here...&amp;nbsp;&amp;nbsp;&amp;nbsp; End ClassEnd NamespaceExample of using the Imports statement:Default.aspx.vb - Code BehindImports GenericFunctionsPartial Class Default&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits System.Web.UI.Page&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs) Handles Me.Load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'No longer need to start with GenericFunctions&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blnPasswordSent =generateNewPassword(firstName, lastName, email)&amp;nbsp;&amp;nbsp;&amp;nbsp; End SubEnd Class</description>
			<pubDate>Mon, 04 Jun 2007 11:31:00 PDT</pubDate>
		</item>
			
		<item>
			<title>ASP.net 2.0 Gridview vs. Custom Coding</title>
			<link>http://www.sitecrafting.com/blog/aspnet-20-gridview-vs-custom/</link>
			<description>I recently decided to try the Gridview control in asp.net 2.0. I read some documentation and decided that it would be very easy to implement. I started by following a step-by-step tutorial on creating a table using the Gridview control, which uses the SqlDataSource control. This step-by-step tutorial included details on how to add paging, column sorting, updating a record, and deleting a record. The tutorial can be found here. I was actually excited when I got this to work and how easy it was to do. It would only take a few minutes to create a simple, paged, sortable table where a user can delete and update records right on the page. Please note that simple is the operative word here.The next step was to start modifying the table's appearance to be similar to our standard table layout and colors and using images for the edit, delete, save, and cancel buttons. I first decided to tackle adding images to the&amp;nbsp; buttons. The default grid has a simple hyperlink button titled &quot;Edit&quot; and &quot;Delete&quot; and if you selected to &quot;Edit&quot; a record, those links were replaced by &quot;Update&quot; and &quot;Cancel.&quot; As I began looking into ways to change this, I soon learned it's not that simple. In order to use my images, I needed to add a new column to the Grid for a command field. This command field allowed me to select images for &quot;Edit&quot;, &quot;Delete&quot;, &quot;Update&quot;, and &quot;Cancel&quot; but it took me some time reading online tutorials and searching the Microsoft Visual Studio 2005 Documentation in order to figure out how to do it.I then updated the look and feel of the gridview to match our standard layout. That turned out to be pretty simple, since all I did was select a standard theme that's available to the gridview that was fairly close. I also wanted to hide the column that displayed the id number for each record, since a user has no need for it. Unfortunately, the Gridview needs that column in order to perform the delete and edit operations. I thought about updating the styling of cells under the id column to have a width of 0, but I didn't to want spend any more time on it. Next, I like how you could press the &quot;Edit&quot; icon or text and then that row would be converted to a simple form. So, I wanted to do the same thing for adding a new record. Ooops, that's not so easy either. It turns out that the Gridview does not have anything built in for adding a new record. After googling, there turned out to be a number of methods to simulate that behavior. Since I was in a hurry, I decided to go with the easiest one to implement, which is basically displaying a simple add form instead of the table. To see how this was done, please refer to this article. Unfortunately, this was not what I wanted.Now, the next thing I wanted to do was add a simple javascript to confirm that the user wants to delete the record. How hard could that be? Well, it's not exactly hard, I mean none of it is hard, just time consuming. In order to add javascript, I would need to convert the Gridview columns into templates in order to add the OnClientClick attribute to the delete icon button. Unfortunately, by converting to templates, that meant turning off the EnableSortingAndPagingCallbacks for the Gridview. Which meant I would have to do some more research on how to manually sort and page the Gridview. I decided that if a person clicked the delete, then the item will get deleted, no questions asked.What I learned was the more I features I wanted to add to the Gridview, the more research and coding that was required. In comparison, I decided to programatically write a table similar to Gridivew. I was able to add code for paging, column sorting, button to edit and delete a row, and a row for adding a new record. I was also able to add javascript to confirm a deletion. The edit button worked exactly the same as the Gridview, if you pressed edit, then that row would be converted to a simple form, with icon buttons for saving and cancelling. In addition, I was able to move the paging controls anywhere I wanted and to style it in any way. I also added a previous and next buttons, along with listing all the page numbers. At first glance, I couldn't find a way to this in the Gridview control.When comparing these two methods, Gridview vs Custom Coding, I spent twice as long creating the Gridview than I did using the custom coding method. However, this has more to do with the steep learning curve for the Gridview, especially when you need certain features, so I figure coding time could eventually be about the same, and would actually be a lot faster if the table is simple. The one advantage of Custom Coding, is that you can tailor your table to look and behave&amp;nbsp; exactly as you wish, especially if you wish to incorporate a lot of javascript. Hope this helps in determining when to use the Gridview or any other control.</description>
			<pubDate>Mon, 23 Jul 2007 17:29:00 PDT</pubDate>
		</item>
			
		<item>
			<title>Getting the Client?s IP Address</title>
			<link>http://www.sitecrafting.com/blog/getting-clients-ip-address/</link>
			<description>There are a number of reasons why you may want to capture a  web user's IP address. You may want to only allow certain IP addresses to view  your website, to allow only one vote per IP address, track unique clicks on  links and buttons, a location of web users on Google Maps using MASHUP, and whatever else you can think of.Below are a couple of examples to get the client's IP address in PHP and ASP.net, along with a couple of things to watch for.PHP Examples You could use the following to get the client's IP address &amp;lt;? $client_ip = $_SERVER[&quot;REMOTE_ADDR&quot;];// MAC Xserve may also have this server variable$client_ip = $_SERVER[&quot;PC-Remote-Addr&quot;];  ?&amp;gt;  To confirm which one to use, try looking at all the server variables by using print_r( $_SERVER). Another one to look for is $_SERVER[&quot;HTTP_PC_REMOTE_ADDR). It depends on upon on the server, IIS has a different set of names, apache has it's own set, etc.  ASP.net Examples Here are a couple of different methods in VB.net&amp;lt;% dim strClientIp AS string = &quot;&quot;  strClientIp = Me.Request.UserHostAddress  ' or use sever variables, just like the PHP examplesstrClientIp = Me.Request.ServerVariables(&quot;LOCAL_ADDR&quot;) %&amp;gt; If you're trying to capture the client IP inside of a class, use HttpContext. &amp;lt;% Public Class Client  Public IPAddress AS string  Sub New()   Me.IPAddress = HttpContext.Current.Request.UserHostAddress   End Sub  End Class %&amp;gt; What to watch for:  If the client's computer is inside of a network, the IP address will usually be the IP address of the router/firewall that connects to the Internet. Which could be a problem if your allowing one anonymous vote per IP address. If there are 20 computers within a network, then they could only have a total of one vote.Other server variables to look out for:The server variable HTTP_X_FORWARDED_FOR can also be used to find the client's IP address. Sometimes, this variable will have the computer's IP address inside of the network, which may be a worthless LAN address. However, this header can be easily faked and can also be a comma-separated list of IP addresses.  Another thing to watch for is how the router/firewall sends Internet traffic to the web server that is trying to capture the client's IP address. It's possible that the router/firewall has been setup to replace the REMOTE_ADDR or LOCAL_ADDR header values with a hard coded IP address. Setting the DMZ configuration for a router or running some code on the firewall can do this. For an example, download the Web Interface 4.0 troubleshooting guide and refer to the code on page 43.The last item is one that caught me. For a client's intranet site, I was attempting to validate an intranet user by capturing their IP address and validating it to a list of valid IP addresses. However, when browsing from the internet, from several computers at different locations, the IP address kept coming up as a LAN address, such as 10.0.1.15. This was because of the way the client's IT department setup the DMZ configuration.</description>
			<pubDate>Thu, 09 Aug 2007 16:14:00 PDT</pubDate>
		</item>
			
		<item>
			<title>Got API?</title>
			<link>http://www.sitecrafting.com/blog/got-api/</link>
			<description>gotAPI.com is one of the most useful online resources I've come across, primarily because it places resources spread all over the internet into one simple site. I've been using this for quite some time, and have for the most part I have taken its usefulness for granted. Then it occurred to me that I might not be the only one that could find this tool useful (I know, it was a big 'DUH!' moment). So now I will share this gem with others...gotAPI acts as a portal to almost any API/language reference available on the internet. Wondering what that PHP string function is that splits a string into an array? Pour yourself a nice tall glass of gotAPI and find it in seconds. Or if JavaScript is more your thing, browse the DOM to find the function or property you need. The advantage is that it can all be accessed from here, no need to remember countless URLs or stumble through a poorly designed site to find the documentation page. Simply hit up the site and you're set.Customization is another advantage, with the tabbed interface allowing you to pull up multiple reference pages (all searchable with an expandable tree view to your left). Load up all the API's related to your current project finding an obscure function is now seconds away. Fantastic!The fact that I am still excited about this site after months of using it should tell you just how nifty it is. So stop wasting time reading blogs and go check it out!Link: gotAPI.com</description>
			<pubDate>Mon, 31 Mar 2008 11:40:00 PDT</pubDate>
		</item>
			
		<item>
			<title>Write .NET Applications in PHP</title>
			<link>http://www.sitecrafting.com/blog/write-applications-in-php/</link>
			<description>That's right, you heard me! It's all thanks to a fantastic project called Phalanger, which adds a super-fast execution environment for a very large portion of the PHP scripting language. Certainly this was only a matter of time, combining one of the most popular open-source languages of the web with one of the most powerful enterprise-grade frameworks.One of the coolest things about Phalanger is the way it allows you to decide how to implement PHP syntax. There is almost no barrier to entry, as it is designed to implement PHP the same way it is handled natively, but also allows you to use PHP syntax in an ASP.NET application just as though PHP was simply another option among VB.NET and C#.I'll admit I have yet to take a crack at it, but having worked with both .NET and LAMP technologies I can't help but imagine the possiblities. SiteCrafting in particular could benefit from this tremendously, allowing our PHP devs to easily port PHP-based solutions into some of our existing .NET projects. It also means essentially all of our developers could make contributions to a .NET project if the need arose.I should warn Phalanger is still in it's beta phase, and has not yet fully implemented the entire PHP language and common libraries. Though it may not be enterprise-ready yet, I see good things ahead.Link: PhalangerLink: Tutorials</description>
			<pubDate>Mon, 16 Jun 2008 08:56:00 PDT</pubDate>
		</item>
			
		<item>
			<title>ASP.net 2.0 and .htm or .html files</title>
			<link>http://www.sitecrafting.com/blog/aspnet-20-or-files/</link>
			<description>We have a CMS that generates static html files and some of those pages redirect to a different web page. When that occurs the static page has a combination of meta-refresh, javascript, and a paragraph with a link to the redirected page to handle all possible scenarios. Unfortunately, this combination poses some issues, such as a blank page being displayed while the redirection is occurring, if the page is slow loading the user will see the paragraph text, and once the redirection is completed, the back-button will not work in IE. To avoid these issues, here are a couple of solutions for handling those redirects, the first is to have ASP.net serve .htm files, the second is to install ISAPI Rewrite version 2 or 3.Solution One - IIS Mapping and BeginRequestThe first solution involves saving all the static pages that need to be redirected to an application level variable and using Global.asax to handle requests. Here's a basic explanation of a request; The request goes to the Server, IIS determines how to handle the request based upon the path and file name. If it's an htm or html file request, IIS will serve that page itself, if it's an .aspx file, IIS forwards the request to ASP.net. In order for ASP.net to handle htm or html pages, we need to change the mappings for the website. The article How To Enable HTM Server Side Include Parsing in IIS explains how to update mappings for htm and html.For a more in-depth article on the ASP.NET Application Life cycle, please read this article, ASP.NET Application Life Cycle Overview for IIS 5.0 and 6.0.Here's an example Global.asax file that saves redirected pages to an application level variable and checks each request to see if it's an .htm static page and if it should be redirected. The two important sub-routines is Application_Start and Application_BeginRequest. Application_Start is called whenever the web site is restarted and Application_BeginRequest is called whenever a request is forwarded from IIS to ASP.netProsYou can write code that is tailored for a user's session, so when a request for an htm or html page is made, you can check session variables, such as the user being logged in or not.  ConsPossible performance hit, since ASP.net is now handling .htm or .html pages.  Solution Two - ISAPI RewriteThe other option is to use ISAPI Rewrite 2 or ISAPI Rewrite 3. In this example, I'm using ISAPI Rewrite 2.7. In order to use it, you will need to purchase and install the software on your server. After installing the software, simply create an httpd.ini file in the root directory of your website and add your RewriteRules. It's also important to note that the request process is now slightly different. The ISAPI Rewrite handles all requests first, then the request is forwarded to IIS, which forwards any .aspx requests to ASP.net. You also won't need to update the mappings for htm or html that was done in solution one.  httpd.ini example[ISAPI_Rewrite]# ISAPI_Rewrite Version 2.7# RewriteRule ^{request path} {new path} [I,R]# ^ = Start of url path, excludes the http and the domain# I = case insensitive# R = Redirect, code of 302, temporarily moved# PAGE REDIRECTS STARTRewriteRule ^/kens_web_page.htm /kens_place/default.htm [I,R]RewriteRule ^/kens_web_page.htm /kens_place/default.htm [I,R]# PAGE REDIRECTS ENDThe final step is to update the example Global.asax file to write to the httpd.ini file with the latest page redirects. In the second version of Global.asax, the new subroutine updateISAPIRedirections() was added and you can optionally remove the Application_BeginRequest() altogether, since ISAPI Rewrite will be handling all incoming requests.  ProsPossibly faster than the Global.asax solution and it's easy to use.  ConsWill need to purchase and install ISAPI Rewrite. You can't perform session state checks for a user.</description>
			<pubDate>Mon, 01 Dec 2008 08:26:00 PST</pubDate>
		</item>
			
		<item>
			<title>Visual Studio 2005 and Crystal Reports</title>
			<link>http://www.sitecrafting.com/blog/visual-studio-2005-crystal-reports/</link>
			<description>When you install Visual Studio 2005 Professional on your development computer, you get everything you need for adding Crystal Reports to your ASP.net 2.0 project or web site. However, your web server does not have Visual Studio 2005 Professional installed on it, which it shouldn't, which means your nice new reports will not work. What should you do?Here's a possible scenario. Let's say that you already have a ASP.net project created and you added some pretty reports using Crystal Reports. You uploaded the web page that is embedded with the CrystalReportViewer object, the crystal report file, MyReport.rpt, and updated the web.config file on the web server to include the assemblies for Crystal Reports. However, when you try to view the report or any page on the website, you get an error message. Thanks to this forum post, Where are Crystal Reports merge modules for VS2005?, here's what you can do. Download Crystal Reports for Visual Studio 2005 - Service Pack 1 and install it on the web server. Voila! Your Crystal Report should now be working.Here a couple of links for downloading the file.Crystal Reports Runtime PackagesIf you're using Visual Studio 2005 and the web server is an x86, download &quot;Crystal Reports for .NET Framework 2.0 x86 Redistributable Package (32 bit)&quot;Business Objects Downloads for Crystal Reports and XcelsiusClick &quot;Get Crystal Reports, Crystal Reports Server, and Xcelsius downloads&quot;. On the next page search for Software Product = Crystal Reports, Product Version = .NET, and Software Type = *.</description>
			<pubDate>Fri, 02 Jan 2009 10:43:00 PST</pubDate>
		</item>
			
		<item>
			<title>Mapping folders to Asp.net</title>
			<link>http://www.sitecrafting.com/blog/mapping-folders-to-aspnet/</link>
			<description>If you need to have an extensionless URL map to ASP.net 2.0, here are three options.     Add a Wildcard mapping in Internet Information Services for your website  3rd party software, such as ISAPI 2.7 or higher  Redirect 404 errors to 404.aspx and use Global.asax to capture the URL that caused the 404 error   Example:Have http://www.mywebsite.com/calendar/ map to http://www.mywebsite.com/calendar.aspxAdd Wildcard mappingWildcard mapping will result in all requests being forwarded to asp.net. Which includes.html, .htm, .css, .js, images, etc. This will result in a performance hit.Start IISRight click on the Website, &quot;Default Web Site&quot; is a common nameClick PropertiesClick Home DirectoryClick ConfigurationOn Mappings tab click Add Executable = link to the asp.net dll. Example: c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dllExtension = .*Limit to: GET, POST3rd party software, such ISAPIYou can install ISAPI and add a regular expression to redirect the url. The regular expression below will perform the redirect for the example at the top of this article.ISAPI 2.7RewriteRule ^/calendar/ calendar.aspx [I,R]404 ErrorsUpdate IIS to redirect 404 errors to 404.aspx. Update the Global.asax file of your website. Add code to Application_BeginRequest that will capture the URL that caused the 404 error. Global.asax sampleRead&amp;nbsp;Serve extensionless URL without using ISAPI handler or wildcard mapping for a good explanation of this method.Hopefully this helps!    </description>
			<pubDate>Mon, 02 Mar 2009 11:30:00 PST</pubDate>
		</item>
			
		<item>
			<title>Disable UAC Windows 7</title>
			<link>http://www.sitecrafting.com/blog/disable-uac-windows-7/</link>
			<description>I was annoyed after a upgrade to Windows 7 on a workstation machine, in order to do anything , you have to &quot;approve the action&quot; because of the UAC (User Account Control) settings are turned on by default.   Just as painful is finding where the UI &quot;checkbox&quot; is to turn it on and off.   Needless to say I ended up having to play around with the command line to turn the UAC Off and On.   To save you the trouble here it is.Disable UAC  C:WindowsSystem32cmd.exe /k %windir%System32 eg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 0 /f  Enable UAC  C:WindowsSystem32cmd.exe /k %windir%System32 eg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 1 /f  After you enable or disable UAC, you will have to reboot your computer for the changes to take effect.  Presto! No more annoying &quot;approve the action&quot; requests from Windows 7 or Vista.</description>
			<pubDate>Tue, 02 Mar 2010 11:48:00 PST</pubDate>
		</item>
			
	</channel>
</rss>
		
