Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IIS 7 and Enabling ASP.Net Extensions...

4 views
Skip to first unread message

maw...@rcn.com

unread,
Nov 24, 2009, 3:10:48 PM11/24/09
to
On Windows Server 2003 we had a cheesy little widget to determine if
Asp.Net extensions were installed and enabled. It would just dump txt
files based on the state of ASP. If a certain file exists our install
wrapper would handle and warn accordingly.

Here's the code for that...

Dim objFSO, AspMissing, AspDisabled, AspOther, fileRoot, fileText

Dim aWebSvcExtRestrictionList
Dim extension, sExt, Found

On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set fileRoot = objFSO.GetSpecialFolder(2)

If Right(fileRoot, 1) <> "\" Then
fileRoot = fileRoot & "\"
End If

AspMissing = fileRoot & "AspMissing.txt"
AspDisabled = fileRoot & "AspDisabled.txt"
AspOther = fileRoot & "AspOther.txt"

aWebSvcExtRestrictionList = Array()

Set IISWebServiceObj = GetObject("IIS://localhost/W3SVC")

' Store original value:
aWebSvcExtRestrictionList =
IISWebServiceObj.WebSvcExtRestrictionList

Found = 0
For extension = 0 To UBound
(IISWebServiceObj.WebSvcExtRestrictionList)
sExt = IISWebServiceObj.Get("WebSvcExtRestrictionList")
(extension)
If (0 < (InStr(sExt, "Microsoft.NET\Framework
\v2.0.50727\aspnet_isapi.dll"))) Then
Found = 1
If ("0" = Left(sExt, 1)) Then
'Create AspDisabled .txt file
Set fileText = objFSO.CreateTextFile(AspDisabled,
True)
ElseIf ("1" = Left(sExt, 1)) Then
'Clean Up....
'Delete AspDisabled .txt file if exists
If objFSO.FileExists(AspDisabled) Then
objFSO.DeleteFile AspDisabled
End If
'Delete AspOther .txt file
If objFSO.FileExists(AspOther) Then
objFS.DeleteFile AspOther
End If
'Delete AspMissing .txt file
If objFSO.FileExists(AspMissing) Then
objFSO.DeleteFile AspMissing
End If
Else
'Create AspOther .txt file
Set fileText = objFSO.CreateTextFile(AspOther, True)
End If
End If
Next

If Found = 0 Then
'Create AspMissing .txt file
Set fileText = objFSO.CreateTextFile(AspMissing, True)
Else
'Delete AspMissing .txt file if exists
If objFSO.FileExists(AspMissing) Then
objFS.DeleteFile AspMissing
End If
End If

End

(Very cheesy I know, but it was a quick solution for us)

I'm wondering if I have to worry about any of this in IIS 7. How can
I go about checking asp extensions are installed/registered and
enabled in IIS 7? Will what I have work on that platform as well?

Any help appreciated!

Pablo A. Allois

unread,
Dec 1, 2009, 9:57:57 AM12/1/09
to
If you install iis6 scripts compatibility feature in the role web server ...
probably you will not have any problem.

But test it first.


Saludos!

<maw...@rcn.com> wrote in message
news:df8f1888-0310-4784...@o31g2000vbi.googlegroups.com...

maw...@rcn.com

unread,
Dec 3, 2009, 11:22:45 AM12/3/09
to
On Dec 1, 9:57 am, "Pablo A. Allois" <pablo-lis...@allois.com.ar>
wrote:

> If you install iis6 scripts compatibility feature in the role web server ...
> probably you will not have any problem.
>
> But test it first.
>
> Saludos!
>
> <mawa...@rcn.com> wrote in message
> > Any help appreciated!- Hide quoted text -
>
> - Show quoted text -

OK, here's where I get confused....

With our app on a Win 2K8 64 bit server, we were getting an error that
was remedied by adding/installing the Application Development Features
Web Server service. It specifically needed: ASP.NET, .NET
Extensibililty, ISAPIExtensions, and ISAPIFilters.

Also, we need Classic Pipeline Mode on the Application Pool, so the
tester went in and set the Default App Pool to Classic Mode. This was
done before the above mentioned component installations.

I thought I remember reading that there is an ASP.NET Default
Application Pool that defaults to Classic Mode. My question is, if
this had been used instead ot tweaking that setting on the Default App
Pool, would there still be a need to install the ASP.NET IIS sub-
components (Application Development Features)?

Any further information is GREATLY APPRECIATED!!!

David Wang

unread,
Dec 15, 2009, 7:14:46 AM12/15/09
to
Application Features determine the capability of the IIS Web Server.
If you need it to execute ASP.Net pages, you needed to install the
ASP.Net Feature (and related dependencies) in order for IIS to be able
to process ASP.Net pages.

Pipeline Mode refers to the integration level of ASP.Net into the IIS
request pipeline. Classic means "like IIS6" while Integrated means
"like IIS7".

The level of integration of ASP.Net in the request pipeline does not
affect IIS's ability to process ASP.Net pages.

In other words, if your application depends on ability to process
ASP.Net, then you MUST install the ASP.Net Feature for IIs to be able
to process ASP.Net. When ASP.Net feature is installed, you get to
choose if ASP.Net integration is "Classic" or "Integrated". Choosing
"Classic" or "Integrated" integration has no meaning without ASP.Net
feature being installed because IIS cannot alter between the two
behaviors.


//David
http://blogs.msdn.com/David.Wang
//

> Any further information is GREATLY APPRECIATED!!!- Hide quoted text -

0 new messages