Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Find out IIS version for current application Asp.net

Sep 30 2011 4:37AM by Kirti M.Darji   

Today I just learned from Rick strahl Blog we can get IIS Version using Server variable like

        if (HttpContext.Current != null && HttpContext.Current.Request != null)
        {
            string osversion = HttpContext.Current.Request.ServerVariables["SERVER_SOFTWARE"];
            if (!string.IsNullOrEmpty(osversion))
            {
                //Microsoft-IIS/7.5
                int dashlenth = osversion.LastIndexOf("/");
                if (dashlenth > 0)
                {
                    decimal iisVersion = 0M;
                    if (Decimal.TryParse(osversion.Substring(dashlenth + 1), out iisVersion))
                        return iisVersion;
                }
            }
        }

Thank You

Read More..   [1 clicks]

Published under: Microsoft .NET Tips ·  ·  ·  · 


Kirti M.Darji
10 · 16% · 5010
5
 
0
Knew
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

Your Comment


Sign Up or Login to post a comment.

"Find out IIS version for current application Asp.net" rated 5 out of 5 by 5 readers
Find out IIS version for current application Asp.net , 5.0 out of 5 based on 5 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]