Welcome to the Axosoft Community, Sign in | Register | Help
in Search

PLEASE HELP WITH WIERD ERROR!!!

Last post 02-11-2008, 9:40 AM by matt. 3 replies.
Sort Posts: Previous Next
  •  03-03-2006, 6:11 PM 6256

    PLEASE HELP WITH WIERD ERROR!!!
    Im trying to develop an webApp that has the AXOSOFT SDK installed on seperate server, not the one im developing on. I created an application and every time i try to run it, it gives me the error:


    The request failed with HTTP status 401: Unauthorized.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

    Source Error:


    Line 134: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://axosoft.com/ontime/webservices/GetAllDefectsWithNames", RequestNamespace="http://axosoft.com/ontime/webservices/", ResponseNamespace="http://axosoft.com/ontime/webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    Line 135: public System.Data.DataSet GetAllDefectsWithNames(System.Guid securityToken) {
    Line 136: object[] results = this.Invoke("GetAllDefectsWithNames", new object[] {
    Line 137: securityToken});
    Line 138: return ((System.Data.DataSet)(results[0]));


    Source File: c:\inetpub\wwwroot\ontime2005sdkwebsamples\web references\defectservice\reference.cs Line: 136

    Stack Trace:


    [WebException: The request failed with HTTP status 401: Unauthorized.]
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    OnTimeSDKWebSamples.DefectService.DefectHandler.GetAllDefectsWithNames(Guid securityToken) in c:\inetpub\wwwroot\ontime2005sdkwebsamples\web references\defectservice\reference.cs:136
    OnTimeSDKWebSamples.DefectList.showDefectsButton_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\OnTime2005SDKWebSamples\DefectList.aspx.cs:53
    System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    System.Web.UI.Page.ProcessRequestMain() +1292




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
  •  03-08-2006, 7:44 AM 6257 in reply to 6256

    RE: PLEASE HELP WITH WIERD ERROR!!!
    This is most likely a permissions issue in IIS.  Can you try browsing to the SDK web site (http://yourcomputer/ontime2005sdk) and see if you get an error?
    Dragan Marceta
    www.Axosoft.com
  •  02-07-2008, 12:50 PM 14945 in reply to 6256

    • matt is not online. Last active: 05-30-2008, 7:50 AM matt
    • Not Ranked
      Male
    • Joined on 10-11-2007
    • Mequon, WI
    • Posts 2
    • Points 10
    Re: PLEASE HELP WITH WIERD ERROR!!!
    I had a similar error.  I found out that the problem was the lack of anonymous authentication on the web server.  I had set up windows authentication only so that the OnTime Web client would recognize Active Directory users.  For the OnTimeSDK virtual directory, I changed the authentication to anonymous authentication and the problem dissappeared.
    Filed under:
  •  02-11-2008, 9:40 AM 14977 in reply to 14945

    • matt is not online. Last active: 05-30-2008, 7:50 AM matt
    • Not Ranked
      Male
    • Joined on 10-11-2007
    • Mequon, WI
    • Posts 2
    • Points 10
    "401. Unauthorized" Workaround

    Well, the problem had only disappeared for a short time.  If you manually send the credentials from the client code, this seems to work okay.  Every time you instantiate a handler object, if you specify the credentials, the web server is happy.  Like this:

    
    

    using (OnTimeCustomerService.CustomerHandler onTimeServiceHandler = new OnTimeCustomerService.CustomerHandler())

    {

    onTimeServiceHandler.Credentials = System.Net.CredentialCache.DefaultCredentials;

       // ... perform actions.
    }
    
View as RSS news feed in XML

© 2002 - 2007, Axosoft, LLC. All Rights Reserved. | Privacy
Bug Tracking | Defect Tracking Videos | Help Desk Software