.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to register .net Framework to IIS

Posted By: Mahesh     Posted Date: June 21, 2012    Points:5   Category :ASP.Net
How to register .net Framework to IIS

Author: Mahesh             
Posted Date: June 21, 2012     Points: 20   

Dim sCommand As String
Dim sAppPoolCommand As String
Dim sWinDir As String
sWinDir = System.Environment.ExpandEnvironmentVariables("%windir%")

sAppPoolCommand = sWinDir & "\system32\inetsrv\AppCmd add apppool /name:WebSite /managedRuntimeVersion:v2.0 /managedPipelineMode:Integrated /enable32BitAppOnWin64:True"

sCommand = sWinDir & "\system32\inetsrv\AppCmd ADD SITE /name:WebSite /id:1001 /bindings:http/*:81: /physicalPath:""" & msWebSitePhysicalDir & """" & _
" /ApplicationDefaults.applicationPool:WebSite"

Shell(sWinDir & "\system32\inetsrv\APPCMD stop site ""Default Web Site""", AppWinStyle.Hide, True)

Shell(sAppPoolCommand, AppWinStyle.Hide, True)

Shell(sCommand, AppWinStyle.Hide, True)

Shell(sWinDir & "\system32\inetsrv\AppCmd set config /section:directoryBrowse /enabled:true", AppWinStyle.Hide, True)

Shell(sWinDir & "\system32\inetsrv\AppCmd start site ""WebSite""", AppWinStyle.Hide, True)

%windir%\system32\inetsrv\AppCmd set apppool /apppool.name:WebSite /managedRuntimeVersion:v4.0

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend