A summary of the experience of ASP.net on some IIS issues
Many developers are bothered by problems with IIS and the installation of the ASPNET, and hereby do the following small
Summary, please communicate more!
IIS has broken the Fix method!!!!!!!
General IIS can not run ASP.net, try the following four methods, 99% valid:
1. The order of the. NET installation should be to install IIS first, then install Vs.net, if the order is reversed,
Or if IIS is reinstalled, you need to reinstall IIS using Aspnet_regiis.exe-i
Mapping (mainly used for extention matching of files such as ASPX, ASMX). In
c:/windows/microsoft.net/framework/v1.0.3705 directory, run under
Side of the command: aspnet_regiis.exe-i
2. Reset the password for the ASPNET and find Machine.config in the following directory
Item:%systemroot%/microsoft.net/framework/v1.0.3705/config
(systemroot is your installation directory), add/repair in <processModel> logo
Change: Username and password3. If not, reload IIS, and then follow the side
Act 1 to operate 4. If your machine is a domain controller, you can refer to Q315158:
asp.net does not Work withaspnet account on Domain
Controller:http://support.microsoft.com/default.aspx?
scid=kb; En-us; q315158& and you talk about the steps of the operation:
1. In administrative tools->active Directory Users and
Create a user named Aspuser in computers to add the user to the user group
(By default, in user group)
2. In Administrative tools->local security settings->local
Policy->userright assignment, double-click Log on as a in the right column batch
Job entry, click Add in the pop-up window, select or enter the Aspuser account you just created
Number, OK. (Reboot machine required)
3. Ensure that the Aspuser account has the appropriate file, directory access rights 4. In the following directory
Machine.config file found in:%Systemroot%
/microsoft.net/framework/v1.0.3705/config (systemroot is You
installation directory), add/Modify in <processModel> Logo:
Username= "Domainname/aspuser" password= "ASPUSERpassword" its
ASPUSERpassword is just established aspuser password, domainname is your domain name
Finally, reset the machine! Look, it's supposed to be OK!
An error occurred accessing the ASP page under IIS:
Failed to access the IIS metabase
"The process account that is used to run ASP.net must have read access to the IIS metabase (such as IISSERVERNAMEW3SVC). For information about how to modify metabase permissions, see httpsupport.microsoft.comkbid=267904. ”
The reason may be that IIS is installed after the. NET framework is installed, causing IIS to not set up users for ASP.net.
Solution: 1, run cwindowsmicrosoft.netframeworkversion under the
Aspnet_regiis-i
2, or download the Metaacl.vbs script and run
cscript Metaacl.vbs
Modify Permissions Manually
--metaacl.vbs file
Set Args = WScript. Arguments
If Args.count < 1 Then
WScript.Echo "Usage:metaacl <metabase path> [username] [Permissions | /d] "
WScript.Echo "-no username'll show all ACLs on metabase path"
WScript.Echo "-Username with no permissions'll show permissions for that user"
WScript.Echo "or group"
WScript.Echo "-Username with permissions'll set those permissions for"
WScript.Echo "User or group"
WScript.Echo "-Permissions is a string of the following charcaters ' rwsued '"
WScript.Echo "R-read"
WScript.Echo "W-write"
WScript.Echo "S-restricted Write"
WScript.Echo "U-unsecure Properties Read"
WScript.Echo "E-enumerate Keys"
WScript.Echo "D-write DACL (permissions)"
WScript.Echo "-D = delete this user or group from the ACL"
WScript.Echo ""
WScript.Echo "Example:metaacl" "Iis://localhost/w3svc" "Mydomain/joebob RW"
WScript. Quit
End If
Metapath = Args (0)
If Args.count = 1 Then
Dumpacl (Metapath)
WScript. Quit
End If
Username = Args (1)
If Args.count = 2 Then
Dumpuserace Metapath, username
WScript. Quit
End If
If Args (2) = "/d" then
Deleteuserace Metapath, username
End If
Bitmask = Createmask (Args (2))
Addmetaace Metapath, username, bitmask
WScript. Quit
Sub addmetaace (path, user, mask)
On Error Resume Next
Set obj = GetObject (path)
If Err.Number <> 0 Then
WScript.Echo Err.Number
WScript.Echo Path
End If
Set objacl = obj. AdminACL
If Err.Number <> 0 Then
WScript.Echo "Error Reading property:" + Err.Number + "" + Err.Description
WScript.Echo Path
WScript. Quit
End If
Set objDAcl = Objacl.discretionaryacl
For each objace in objDAcl
If objACE.Trustee = user Then
Objdacl.removeace (objACE)
Set Ace = CreateObject ("AccessControlEntry")
Ace.trustee = user
Ace.accessmask = Mask
Objdacl.addace (ACE)
Objacl.discretionaryacl = objDAcl
Obj. AdminACL = objACL
Obj. SetInfo
WScript.Echo "ACE for" & user & "changed."
WScript. Quit
End If
Next
' The user wasn ' t in the DACL, add them now
Set Ace = CreateObject ("AccessControlEntry")
Ace.trustee = user
Ace.accessmask = Mask
Objdacl.addace (ACE)
Objacl.discretionaryacl = objDAcl
Obj. AdminACL = objACL
If Err.Number <> 0 Then
WScript.Echo "Error setting ACL:" + Err.Number + "," + Err.Description
End If
Obj. SetInfo
If Err.Number <> 0 Then
WScript.Echo "Error Setting Info:" + err.number + "," + Err.Description
End If
WScript.Echo "ACE for" & user & "added."
WScript. Quit
End Sub
Function Createmask (Strmask)
Mask = 0
NumChars = Len (strmask)
For i = 1 to NumChars
char = Mid (Strmask, I, 1)
Select Case Char
Case "R" mask = mask + &h1
Case "W" mask = mask + &h2
Case "S" mask = mask + &h20
Case "U" mask = mask + &h80
Case "E" mask = mask + &h8
Case "D" mask = mask + &h40000
End Select
Next
Createmask = Mask
End Function
Sub deleteuserace (path, user)
Set obj = GetObject (path)
If Err.Number <> 0 Then
WScript.Echo Err.Number
WScript.Echo Path
End If
Set objacl = obj. AdminACL
If Err.Number <> 0 Then
If Err.Number = 438 Then ' Object doesn ' t support this property or method
WScript.Echo ' AdminACL property does ' not ' exist on ' this object '
WScript. Quit
Else
WScript.Echo "Error:" + Err.Number + "" + Err.Description
WScript.Echo Path
WScript. Quit
End If
End If
Set objDAcl = Objacl.discretionaryacl
For each objace in objDAcl
If objACE.Trustee = user Then
Objdacl.removeace (objACE)
Objacl.discretionaryacl = objDAcl
Obj. AdminACL = objACL
Obj. SetInfo
WScript.Echo "ACE for" & User & "deleted."
WScript. Quit
End If
Next
WScript.Echo "No ACE for" & user & "found."
WScript. Quit
End Sub
Sub dumpuserace (path, user)
On Error Resume Next
Set obj = GetObject (path)
If Err.Number <> 0 Then
WScript.Echo Err.Number
WScript.Echo Path
End If
Set objacl = obj. AdminACL
If Err.Number <> 0 Then
If Err.Number = 438 Then ' Object doesn ' t support this property or method
WScript.Echo ' AdminACL property does ' not ' exist on ' this object '
WScript. Quit
Else
WScript.Echo "Error:" + Err.Number + "" + Err.Description
WScript.Echo Path
WScript. Quit
End If
End If
Set objDAcl = Objacl.discretionaryacl
For each objace in objDAcl
If objACE.Trustee = user Then
Mask = getmaskstring (objACE.AccessMask)
WScript.Echo objACE.Trustee
WScript.Echo "Access:" & Mask
WScript.Echo "Type:" & CStr (objACE.AceType)
WScript.Echo "AceFlags:" & CStr (Objace.aceflags)
WScript.Echo "Flags:" & CStr (Objace.flags)
WScript.Echo "ObjectType:" & Objace.objecttype
WScript.Echo "InheritedObjectType:" & Objace.inheritedobjecttype
WScript. Quit
End If
Next
WScript.Echo "No ACE in ACLs for" & user
WScript. Quit
End Sub
Sub Dumpacl (PATH)
On Error Resume Next
Set obj = GetObject (path)
If Err.Number <> 0 Then
WScript.Echo Err.Number
WScript.Echo Path
ReportError ()
End If
Set objacl = obj. AdminACL
If Err.Number <> 0 Then
If Err.Number = 438 Then ' Object doesn ' t support this property or method
WScript.Echo ' AdminACL property does ' not ' exist on ' this object '
WScript. Quit
Else
WScript.Echo "Error:" + Err.Number + "" + Err.Description
WScript.Echo Path
WScript. Quit
End If
End If
Set objDAcl = Objacl.discretionaryacl
For each objace in objDAcl
Mask = getmaskstring (objACE.AccessMask)
WScript.Echo objACE.Trustee
WScript.Echo "Access:" & Mask
Next
End Sub
Function getmaskstring (Mask)
if (mask and &h1) <> 0 Then
Maskstr = "R"
Else
Maskstr = ""
End If
if (mask and &H2) <> 0 Then
Maskstr = maskstr + "W"
Else
Maskstr = Maskstr + ""
End If
if (mask and &H20) <> 0 Then
Maskstr = maskstr + "S"
Else
Maskstr = Maskstr + ""
End If
if (mask and &h80) <> 0 Then
Maskstr = maskstr + "U"
Else
Maskstr = Maskstr + ""
End If
if (mask and &h8) <> 0 Then
Maskstr = maskstr + "E"
Else
Maskstr = Maskstr + ""
End If
if (mask and &h40000) <> 0 Then
Maskstr = maskstr + "D"
Else
Maskstr = Maskstr + ""
End If
getmaskstring = Maskstr
End Function