B
Blasting Cap
I've got a web service that had been functioning up until I moved it to
a new server a while back.
It basically is a screen scrape that grabs off html off a UPS or Fedex
web page.
All of a sudden, I'm getting a 401 Unauthorized message when I try to
run it. So is another application that references this same web service.
When I moved IIS (2000 to server 2003), I copied & thought I had all the
websites set up exactly the same way. However, this web service has not
functioned and has repeatedly given this same error. The code that
actually gives the error is:
Case "UPSC"
sURL =
"http://wwwapps.ups.com/etracking/tr...TMLVersion=4.0&sort_by=status&InquiryNumber1="
& sBol(i) &
"&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&track=Track"
MyPage.Text = MyPage.Text +
oReadHTMPage.readHtmlPage(sURL, "UPSC", sBol(i), sTemp(i)con
The context of the error message is:
System.Net.WebException was unhandled by user code
Message="The request failed with HTTP status 401: Unauthorized."
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at RemSQL.com.remlink.www.Tracker.UPS(String Nr)
at RemSQL.RemSQL.readHtmlPage(String url, String sCarr, String
sPro, String sPro1)
at test.POInquiry.BillofLading() in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1426
at test.POInquiry.ShowTracking() in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1497
at test.POInquiry.Tracking_Select(Object Sender, EventArgs E) in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1481
at
System.Web.UI.WebControls.BaseDataList.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object
source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source,
EventArgs args)
at System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object
source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source,
EventArgs args)
at
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument)
at
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The reference.vb file that gets called eventually is:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.myserver.com/trackingstatus/UPS",
RequestNamespace:="http://www.myserver.com/trackingstatus",
ResponseNamespace:="http://www.myserver.com/trackingstatus",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
Public Function UPS(ByVal Nr As String) As Object
Dim results() As Object = Me.Invoke("UPS", New Object() {Nr})
Return CType(results(0),Object)
End Function
I've gone thru and changed the Anonymous access to enable it, both at
the folder level for the tracking status, as well as to temporarily
enabling anonymous access on the server (it needs to be NT Challenge
Response to access it).
How can I tell what entity is requesting authentication?
BC
a new server a while back.
It basically is a screen scrape that grabs off html off a UPS or Fedex
web page.
All of a sudden, I'm getting a 401 Unauthorized message when I try to
run it. So is another application that references this same web service.
When I moved IIS (2000 to server 2003), I copied & thought I had all the
websites set up exactly the same way. However, this web service has not
functioned and has repeatedly given this same error. The code that
actually gives the error is:
Case "UPSC"
sURL =
"http://wwwapps.ups.com/etracking/tr...TMLVersion=4.0&sort_by=status&InquiryNumber1="
& sBol(i) &
"&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&track=Track"
MyPage.Text = MyPage.Text +
oReadHTMPage.readHtmlPage(sURL, "UPSC", sBol(i), sTemp(i)con
The context of the error message is:
System.Net.WebException was unhandled by user code
Message="The request failed with HTTP status 401: Unauthorized."
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at RemSQL.com.remlink.www.Tracker.UPS(String Nr)
at RemSQL.RemSQL.readHtmlPage(String url, String sCarr, String
sPro, String sPro1)
at test.POInquiry.BillofLading() in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1426
at test.POInquiry.ShowTracking() in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1497
at test.POInquiry.Tracking_Select(Object Sender, EventArgs E) in
C:\Inetpub\wwwroot\test\Sales\POInquiry.aspx.vb:line 1481
at
System.Web.UI.WebControls.BaseDataList.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object
source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source,
EventArgs args)
at System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object
source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source,
EventArgs args)
at
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument)
at
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The reference.vb file that gets called eventually is:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.myserver.com/trackingstatus/UPS",
RequestNamespace:="http://www.myserver.com/trackingstatus",
ResponseNamespace:="http://www.myserver.com/trackingstatus",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
Public Function UPS(ByVal Nr As String) As Object
Dim results() As Object = Me.Invoke("UPS", New Object() {Nr})
Return CType(results(0),Object)
End Function
I've gone thru and changed the Anonymous access to enable it, both at
the folder level for the tracking status, as well as to temporarily
enabling anonymous access on the server (it needs to be NT Challenge
Response to access it).
How can I tell what entity is requesting authentication?
BC