Error 401 Uploading File with Site Server HTTP Post Sample (248053)
The information in this article applies to:
- Microsoft Site Server 3.0
This article was previously published under Q248053 SYMPTOMS
If you upload files to a Computer running Site Server using the HTTP Post Sample (http://computer/SiteServer/Publishing/uploadnd.asp) the following error will appear:
HTTP Error 401
401.1 Unauthorized: Logon Failed
This error indicates that the credentials passed to the server do not match the credentials required to log on to the server.
Please contact the Web server's administrator to verify that you have permission to access the requested resource.
CAUSE
This error occurs after the installation of Site Server SP2 or SP3.
The updated version of "Cpshost.dll" does not pass user credentials to the script "Repost.asp". These are needed to work if the upload sample scripts are configured for nonanonymous upload (default).
RESOLUTION
To correct this Problem follow these steps: - Backup the script "Inetpub\scripts\repost.asp"
- Edit "Inetpub\scripts\repost.asp", so that it looks like the following code:
<% Response.Buffer = TRUE %>
<!--#include virtual="/SiteServer/Publishing/pasetup.inc"-->
<HTML>
<TITLE>
Repost Example
</TITLE>
<BODY>
<H1><CENTER>
Welcome<BR>
Here is your upload status:<BR>
</CENTER></H1>
<HR>
Destination: <B><% Response.Write Request.Form("TargetURL") %></B><BR>
<HR><BR>
<%
For I = 1 To Request.Form("FileName").Count
Response.Write "Successfully uploaded file: <B>" _
& Request.Form("FileName")(I) _
& Request.Form("FileExtention")(I) &"</B><BR>"
Response.Write "Physical path: <B>" & Request.Form("FilePath")(I) & "</B><BR>"
Response.Write "Size: <B>" & Request.Form("FileSize")(I) & "</B> bytes<P>"
Next
%>
<BR><HR>
<A HREF="<% =PublishingURL %>/deploymentd.asp">Back to main Publishing page</A><BR>
</BODY>
</HTML>
- Save the script as "Inetpub\scripts\repost.asp"
MORE INFORMATIONREFERENCES
For additional information, see the following article or articles in the
Microsoft Knowledge Base: 179566 How to Do Anonymous Uploads
Modification Type: | Major | Last Reviewed: | 8/28/2002 |
---|
Keywords: | kbprb KB248053 |
---|
|