Search
  
 
Mitchel Sellers' DotNetNuke, .NET, and Other Topics BlogMinimize
 
 
Subscribe To Blog Updates by E-Mail

Current Articles | Categories | Search | Syndication

Articles from .NET 2.0
   
 Visual Studio Code Snippets
By Mitchel Sellers on Sunday, March 02, 2008 @ 2:14 PM
 
  247 Views :: 0 Comments :: :: ASP.NET, Announcements, .NET 1.1, .NET 2.0, .NET 3.5, C#
 
 

Recently I have been asked by multiple people what rapid design tools I use, or what types of code generation tools do I use.  Many people are surprised when I tell them that for the most part I don't use any rapid generation tools.  I do use a few home grown tools, such as my Info Class Generator, which is available on this site.  However, that is as far as I go with automated code generators.  However, one thing that I have started using more and more frequently are Code Snippets within Visual Studio.

I have found that creating a few helpful Code Snippets has allowed me to quickly and easily format my code, and build my needed structures in almost no time.  In this blog article I will share two of my most commonly used Code Snippets, if there is a demand I will post future code snippets here as well.

 
 View Full Article... 
   
 ASP.NET Global Error Handler 1.0 Released (FREE!)
By Mitchel Sellers on Sunday, August 19, 2007 @ 5:23 PM
 
  371 Views :: 4 Comments :: :: DotNetNuke, MitchelSellers.com, ASP.NET, Announcements, .NET 2.0
 
 

I just released my ASP.NET Global Error Handler HttpModule that can be used to capture application level errors and send e-mail notifications to a specified individual.  For more information and to download this item please click on the following link. Click here to visit the ASP.NET Global Error Handler Download Page

 
   
 Migration of Existing Site to 3Essentials
By Mitchel Sellers on Friday, July 27, 2007 @ 3:32 AM
 
  801 Views :: 9 Comments :: :: Tutorials, ASP.NET, .NET 1.1, .NET 2.0
 
 

Recently there have been numerous discussions on the DotNetNuke.com Forums regarding hosting providers and who one should go with and who they should switch to because they are unhappy with their current provider. During all of these discussions I have always recommended the company that I use for hosting 3Essentials. Since making this recommendation I have been receiving numerous e-mails regarding the process to actually migrate a live site over to 3Essentials so I thought I would write a short blog article that explains the basics of moving a website over to 3Essentials, in actuality these instructions SHOULD work for most providers, however ther might be some differences.

 
 View Full Article... 
   
 Upgrading DNN 3.x to DNN 4.x
By Mitchel Sellers on Thursday, June 28, 2007 @ 8:04 AM
 
  5835 Views :: 28 Comments :: :: DotNetNuke, Tutorials, .NET 1.1, .NET 2.0
 
 

Recently I have noticed an increased number of questions regarding the upgrade process from DNN 3.x to DNN 4.x and overall I do not think there is very much good documentation available on how to actually complete the upgrade. Therefore with this article I will walk you through the process of upgrading a 3.x site to 4.x, I will try to cover as many of the "gotchas" as possible, but please remember as with all of my other tutorials PLEASE use these at your own risk!

 
 View Full Article... 
   
 Preventing Site Loading Delays due to ASP.NET Startup (Including DotNetNuke)
By Mitchel Sellers on Wednesday, June 13, 2007 @ 7:14 AM
 
  2008 Views :: 15 Comments :: :: DotNetNuke, Tutorials, ASP.NET, .NET 2.0
 
 

Reducing the delay time upon first requests to a DotNetNuke or other ASP.NET website is something that I see asked quite often.  This delay is due to the ASP.NET Worker Process compling a website, this articles will discuss the solutions available to prevent this delay from occuring.   I personally find that the simplest solution is the best; the even better part is that it is free! First of all before I talk about the different solutions available let me first explain the issue and why it happens.

Depending on your specific setup and hosting environment this initial load time can be quite lengthy. I have noticed initial load times of anywhere from 4-5 seconds to over 25 depending on the server configuration and load. What is actually happening is that your DNN site is being compiled after the ASP.NET worker process has restarted. The worker process can restart for many reasons, however the most troubling one is due to site traffic. By default IIS will shut down the ASP.NET worker process after 20 minutes of inactivity meaning that the next request will restart the worker process and cause the compilation to occur.

Solutions

Now there are many different solutions to this issue I have recently noticed 4 distinct common recommendations. The first recommendation is a very simple fix, however, for those of us in shared hosting environments we cannot perform the needed changes. If you have access to administer IIS you can change the recycling properties of the ASP.NET worker process for your specific application pool. I have heard of many users changing the value from 20 minutes to be 6-8 hours to ensure that the process does not end until extreme cases of inactivity.

The second method to resolve this issue is the one that I personally use for all of my websites DotnetNuke or ASP.NET. This method relies on using an external service to “request” a page of your site every __ minute. DotNetNuke even provides a .aspx page that you can use for this purpose to limit the bandwidth used by these “keep alive” processes; keepalive.aspx. http://www.host-tracker.com provides a free service to monitor your website the added benefit is that they will track your overall site uptime as well. I use them for this website and they are directed to http://www.mitchelsellers.com/keepalive.aspx for monitoring. This should do a good job to keep your site active as long as the monitoring location sends requests every 10-15 minutes.

The other two options are site isolated elements that I have not yet tested and these involve placing various pieces of code into your application to have it call itself just before the worker process is shutdown. This can be done via an HTTP Module or via the ASP.NET Website Heartbeat event monitoring. I personally have not used these methods as I do not want to modify the DNN core, or the core of any of my ASP.NET applications. However, if you search for these topics online you will find many examples.

Conclusion

I hope this has provided some helpful information regarding the delays experienced when requesting the first page for an ASP.NET website.

 
   
 Calling Javascript After AJAX Request Completed
By IowaComputerGurus Host on Sunday, April 22, 2007 @ 8:02 PM
 
  895 Views :: 0 Comments :: :: DotNetNuke, ASP.NET, .NET 2.0
 
 

I found the following article to be very helpful when I was looking for a method to call a specific javascript function right after an AJAX request.  blog.jeromeparadis.com/archive/2007/03/01/1501.aspx

For my readers that are using DotNetNuke to build AJAX enabled applications you must perform one additional task in your code-behind file to ensure that you have a script manager referenced for use on the front end of your application. To accomplish this you must simply place the below call in the page load event and ensure that it is called at least on the first load of any page that needs access to the script manager.

DotNetNuke.Framework.AJAX.RegisterScriptManager();

 
   
 Validating a GUID Value with Regular Expressions
By Mitchel Sellers on Sunday, April 22, 2007 @ 4:05 PM
 
  554 Views :: 0 Comments :: :: .NET 1.1, .NET 2.0, General Tech
 
 

I am sure that most readers of this site have at one point or another noticed my RegularExpression articles.  Well this past week I was looking for a very specific regular expression and thought I would share it with you.  The following regular expresion is used to validate a GUID value for user input.  You can use this to ensure that product keys and other GUID values that you are using are in the proper format. 

^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$

 
   
 Logging ASP.NET Application Restarts
By Mitchel Sellers on Thursday, March 15, 2007 @ 1:00 AM
 
  1039 Views :: 3 Comments :: :: DotNetNuke, ASP.NET, .NET 1.1, .NET 2.0
 
 

Like many ASP.NET programmers I utilize a third party hosting company to host all of my sites. We have all ran into situations where we have been loosing sessions and other oddities and it would be very helpful to find out exactly what caused the application to restart. Well thanks to this post on DotNetNuke.com by Frankt I have found a way to track this information. In this entry I will provide you with code that can obtain this information

 
 View Full Article... 
   
 Sending E-mail .NET 1.1 and 2.0 - Including Sending Login Information
By Mitchel Sellers on Wednesday, February 28, 2007 @ 7:00 PM
 
  3065 Views :: 8 Comments :: :: Tutorials, Windows Applications, ASP.NET, .NET 1.1, .NET 2.0
 
 
This posting is an overview document that provides examples of sending SMTP e-mail from .NET 1.1 and .NET 2.0. It covers the differences between each of the .NET versions as well as the methods needed to send SMTP messages using an authenticated SMTP server. Please see the full posting for detailed information!
 
 View Full Article... 
   
 Changing passwords in ASP.NET 2.0 applications from the database
By Mitchel Sellers on Sunday, February 11, 2007 @ 7:00 PM
 
  1093 Views :: 9 Comments :: :: DotNetNuke, ASP.NET, .NET 2.0
 
 
At one time or another I think everyone has been locked out of a system and not been able to get back in. This can be especially troubling if you happen to be locked out of your administrator account. I have seen many people asking how to reset passwords for the host and admin accounts with DotNetNuke so I thought I would write up some simple instructions on how to change a password via the database for any ASP.NET 2.0 website.
 
 View Full Article... 
   
 Importance of the ASP.NET Membership "applicationName" Setting
By Mitchel Sellers on Monday, February 05, 2007 @ 1:00 AM
 
  700 Views :: 0 Comments :: :: DotNetNuke, ASP.NET, .NET 2.0
 
 

One configuration setting that seems to be overlooked frequently with ASP.NET 2.0’s membership provider is the applicationName setting.  This setting is very important if you ever want to move your application from one server to another or if you want to share users between multiple ASP.NET applications.

 

With ASP.NET membership provider stores all user information associated to a specific “Application Id” this application id is created based on the name of the application.  This allows one ASP.NET membership database to support multiple web applications with multiple sets of user identities.  If you omit the applicationName setting the ASP.NET runtime assigns a specific value for the application based on the current installation location/system.  If the application was moved to a different server this value would change.  Therefore, this value should really be set for each application!

 

One benefit of this setting is the ease of use to share user accounts between applications.  If you set the applicationName to the same value for multiple applications their membership providers will pull from the same user database allowing the users to use their same login credentials for both applications.  For more information on membership in ASP.NET 2.0 please see this MSDN Article http://msdn2.microsoft.com/en-gb/library/yh26yfzy.aspx.

 
   
 Using Regular Expressions (Part 2)
By Mitchel Sellers on Tuesday, December 12, 2006 @ 1:25 PM
 
  1065 Views :: 0 Comments :: :: Tutorials, Windows Applications, ASP.NET, .NET 1.1, .NET 2.0
 
 

This is the second part of my Regular Expression overview.  In the first article I discussed the basics of creating Regular Expressions and provided a link to test expression patterns using the .NET Framework RegEx classes.  In this article I will discuss the various actions that can be taken to match values in a string using regular expressions.  I will also discuss how you can implement a SQL CLR UDF to allow regular expression validation from your database to provide a strong level of input validation at the database level.

 
 View Full Article... 
   
 Using Regular Expressions (Part 1)
By Mitchel Sellers on Wednesday, November 29, 2006 @ 1:19 PM
 
  1268 Views :: 4 Comments :: :: Tutorials, Windows Applications, ASP.NET, .NET 1.1, .NET 2.0
 
 
I have created this two part article series to provide a quick and practical introduction to using regular expressions..  Regular expressions can be used for many things; however, they are typically used for input validation or to perform advanced searches on text in supporting applications.  This first article will explain how to create a regular expression pattern; the expression defines what is considered a match.  The second article will provide details on how to implement regular expressions in .NET applications.
 
 View Full Article... 
   
 Lightweight System Tray Application (NotifyIcon Based)
By Mitchel Sellers on Saturday, October 28, 2006 @ 11:06 AM
 
  2262 Views :: 2 Comments :: :: Tutorials, Windows Applications, .NET 2.0
 
 

Many developers have wanted to create an application that runs fully out of the system tray, maybe an application to help you automatically sort files, or something to monitor the clipboard. Many people have implemented these applications and many textbooks provide instruction on how to create an application such as this, however, none of the books I have found show you the most effective way to create the application.

 
 View Full Article... 
   
 Adding Custom Profile Fields
By Mitchel Sellers on Saturday, October 07, 2006 @ 10:56 AM
 
  1236 Views :: 0 Comments :: :: Tutorials, ASP.NET, .NET 2.0
 
 
ASP.NET 2.0 allows for a very robust user authorization/authentication system with little to no code. One of the added features of the ASP.NET Membership and Profile systems is the ability to have custom user profiles. The ASP.NET Profile system allows you to add additional user profile fields very quickly. I will discuss in this post the methods needed to add simple profile fields (Standard system types), however remember that you can use complex objects for profile fields as well.
 
 View Full Article... 
  
 Additional Pages Available (Page 1 of 2)  
   Previous Page :: Next Page 

 Add to Technorati Favorites
 Print   
 
  
 
ArchiveMinimize
 
 
 Print   
 
  
 
CategoriesMinimize
 
 
 Print   
 
  
 
DonateMinimize
 
 

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content. 

 Print