Vous êtes sur la page 1sur 3

IIS problem

HTTP Error 403.14


The Web server is configured to not list the contents of this directory.
SUMMARY

After you install security update MS05-004, and then you browse or try to debug some ASP.NET
applications, you may experience errors. This article describes the different errors messages that
you may receive. It also provides resolutions for these problems.
SYMPTOMS

After you install security update MS05-004, and then you browse or try to debug a Microsoft
ASP.NET application where the URL contains a trailing backslash (\), you may receive one of
the following error messages:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have
been removed, had its name changed, or is temporarily unavailable. Please review the following
URL and make sure that it is spelled correctly.
Error while trying to run project: Unable to start debugging on the web server. Could not start
ASP.NET or ATL Server Debugging. Verify that the ASP.NET or ATL server is currently
installed on the server.
CAUSE

The problem occurs if the URL that is specified in the Microsoft Internet Information Services
(IIS) metabase contains a trailing backslash.
RESOLUTION

To resolve this problem, remove the trailing backslash in the IIS metabase for the URL that is
specified for the affected Web application. To do this, use one of the following methods.

Method 1: Use IIS Manager


1. Click Start, click Run, type cmd, and then click OK.
2. Locate the %systemroot%\system32\inetsrv directory.
3. At the command prompt, type inetmgr to open IIS Manager.
4. Right-click the Web site for the URL that you want to change, and then click Properties.
5. If the affected application is a virtual directory under the Web site, click the Directory
tab, and then remove the trailing backslash from the path that is specified in the Local
path text box.

If the affected application is in the root directory of the Web site, click the Home
Directory tab, and then remove the trailing backslash from the path that is specified in
the Local path text box.
6. Click Apply, and then click OK.

Method 2: Use a .vbs script


1. Use the following code sample tp create a .vbs script:
2.
3.
4. Option Explicit
5.
6. Dim objWebService, objWebSite
7. Dim objSite, objArgs, strServer
8. Dim WshNetwork
9.
10. Set objArgs = WScript.Arguments
11.
12. If objArgs.Length = 1 Then
13.
strServer = objArgs(0)
14. ElseIfobjArgs.Length = 0 Then
15.
Set WshNetwork = CreateObject("WScript.Network")
16.
strServer = WshNetwork.ComputerName
17. Else
18.
WScript.Echo "Usage: CScript ModifyVDir.vbs [servername]"
19.
WScript.Quit
20. End If
21. WScript.Echo "Connecting to " &strServer
22.
23. Set objWebService = GetObject("IIS://" &strServer& "/W3SVC")
24.
25. For Each objWebSite in objWebService
26.
Set objSite = GetObject(objWebSite.AdsPath)
27.
If objSite.Class = "IIsWebServer" Then
28.
WScript.EchoobjSite.AdsPath
29.
EnumVDirobjSite, 1
30.
End If
31. Next
32.
33. WScript.Echo "Done processing."
34.
35. Sub EnumVDir(objVDir, i)
36.
Dim objSubVDir, objDir
37.
Dim strNewPath
38.
39.
For Each objSubVDir in objVDir
40.
If objSubVDir.Class = "IIsWebVirtualDir" Then
41.
Set objDir = GetObject(objSubVDir.AdsPath)
42.
43.
If ((Right(objDir.Path, 1) = "\") and
(Right(objDir.Path, 2) <> ":\")) Then
44.
WScript.Echo Space(i*3) &objDir.AdsPath
45.
WScript.Echo Space(i*3) & "Path = "
&objDir.Path
46.

47.

strNewPath = Left(objDir.Path,

48.

WScript.Echo Space(i*3) & "New Path = "

Len(objDir.Path) - 1)
&strNewPath

49.
50.
51.
52.
53.
54.
55.
56.
Next
57. End Sub
58.

End If

objDir.Put "Path", strNewPath


objDir.SetInfo

EnumVDirobjDir, i + 1
End If

59. Run the .vbs script from the command line. To do this, follow these steps:
1. Click Start, click Run, type cmd, and then click OK.
2. At the command prompt, type cscript [file_name.vbs].
Note file_name is a placeholder for the name of your .vbs script.
3. To close the command prompt, type exit.

Vous aimerez peut-être aussi