Archive for December, 2006

App_offline.htm file in ASP.NET 2.0

Posted on December 31, 2006. Filed under: ASP.NET, Tips and Tricks |

So what is the real usage of the “App_offline.htm” file in ASP.NET 2.0? Well, primarily it is used to let the user know that your ASP.NET application is offline (you know by the name of the file itself…don’t you?). Okay…so how do you configure your ASP.NET application to use this page when going offline?
Here is [...]

Read Full Post | Make a Comment ( None so far )

Don’t start your user defined stored procs with SP_

Posted on December 31, 2006. Filed under: Database, Tips and Tricks |

There is a common practice with some development teams that they prefix any user defined stored procs with “sp_”. It’s a bad practice in a way that it was a recipe for disaster when you strike the bulb.
What I mean is that, the system stored procs in SQL Server are named starting with “sp_”. Now, [...]

Read Full Post | Make a Comment ( None so far )

Programmatically start a process as a different user

Posted on December 31, 2006. Filed under: .NET Framework, Code Samples, Tips and Tricks, VB.NET |

Here is a way you can programmatically launch a process as a different user. To use this code you should create a new module or add it to your existing project.
Function ConvertToSecureString(ByVal str As String)
Dim password As New SecureString
For Each c As Char In str.ToCharArray
password.AppendChar(c)
Next
Return password
End Function

Sub Main()
dim [...]

Read Full Post | Make a Comment ( 1 so far )

Resizing images on the server side (ASP.NET)

Posted on December 31, 2006. Filed under: ASP.NET, Tips and Tricks |

Let’s say, you have images (blob) stored in your database. Now you want to resize and generate a thumbnail out of it before you can send it back on the Response stream to be displayed on the page. Here is a way to resize the original image.

Read the image (blob) into a byte array

byte[] image = null;while [...]

Read Full Post | Make a Comment ( 2 so far )

Avoiding ThreadAbortException with Response.Redirect

Posted on December 30, 2006. Filed under: ASP.NET |

Once we got hooked up with the Server.Transfer() method we tend to use Response.Redirect() less and less these days. But there are circumstances where you want to avoid Server.Transfer() to let the client know about the location and so instead we use Response.Redirect(). 
When you try to redirect from a page with Response.Redirect(“url”) at times you end [...]

Read Full Post | Make a Comment ( 1 so far )

Microsoft released .NET Framework 3.0

Posted on December 30, 2006. Filed under: .NET Framework, News |

Microsoft released the .NET Framework 3.0, which contains the final release of the Windows Presentation Foundation. The main code base has remained the same at its core .NET 3.0 is the same framework as .NET 2.0. The addition of new features such Windows Communication Foundation (WCF), Windows Presentations Foundation (WPF), Windows Workflow Foundation (WWF), [...]

Read Full Post | Make a Comment ( 2 so far )

Hello!…Windows Developers

Posted on December 30, 2006. Filed under: Misc |

Finally I’ve decided to keep a separate blog to write to the Windows Developer community. I keep my own blog at http://askars.net for everything except Windows Developer stuffs. All these days I was planning to keep a separate blog and finally it came thru right at this time.
Here, I’ll try to post everything related to [...]

Read Full Post | Make a Comment ( None so far )

  •  

    December 2006
    M T W T F S S
        Jan »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Del.icio.us

  • Subscribe

    Subscribe in NewsGator Online

    Subscribe in Rojo

    Add WinDev to Newsburst from CNET News.com

    Add to My AOL

    Add to netvibes

    Subscribe in Bloglines

    Subscribe in NewsAlloy

    Add WinDev to ODEO

    Subscribe in podnova

    Add to Pageflakes

  • Spams Blocked

Liked it here?
Why not try sites on the blogroll...