Microsoft KB Archive/922780

= Error message when a CGI program that is written by using the .NET Framework 2 makes Web service calls: &quot;System.ArgumentException: Illegal characters in path&quot; =

Article ID: 922780

Article Last Modified on 8/5/2006

-

APPLIES TO


 * Microsoft .NET Framework 2.0

-





SYMPTOMS
Consider the following scenario. A Common Gateway Interface (CGI) program is written by using the Microsoft .NET Framework 2. The CGI program is running on Microsoft Internet Information Services (IIS) 6.0. When the CGI program makes Web service calls, the CGI program fails. Additionally, you receive the following exception error message:

System.ArgumentException: Illegal characters in path



CAUSE
This problem occurs because IIS 6.0 starts CGI processes with the \\?\ path prefix to prevent path canonicalization attacks. Certain components of the .NET Framework 2 cannot handle such paths correctly.



WORKAROUND
To work around this problem, follow these steps:
 * 1) Click Start, click Run, type inetmgr, and then click OK.
 * 2) In the left pane, expand the , and then expand Web Sites.
 * 3) Right-click the Web site that hosts the CGI program, and then click Properties.
 * 4) Click the Home Directory tab, and then click Configuration.
 * 5) Click the Mappings tab, and then click Add.
 * 6) Click Browse, locate and then double-click the CGI program executable file.

Note After the path appears in the Executable box, click in the Executable box to initialize the path.
 * 1) In the Extension box, type .exe, and then click OK three times.

Keywords: kbtshoot kbprb KB922780

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.