Basic Authentication, WebService

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Basic Authentication, WebService

    I did the following to add http basic authentication for calling a
    webservice:

    chz11086.HelloAuthTestService service = new
    chz11086.HelloAuthTestService();
    service.Credentials = new System.Net.NetworkCredential("oliver",
    "oli");


    service.Url="http://chz11086:10001/xmlbus/HelloAuthTest/HelloAuthTestService/HelloAuthTestPort/";
    String retValue = service.hello("Oli from .NET");

    But it fails. I've added an interceptor which dumps the whole soap request
    and http headers. I'm missing the http header Authorization: BASIC: ......

    What am I doing wrong?
    Can I add an http header manually?
    oliver.wulff@zurich.ch Guest

  2. Similar Questions and Discussions

    1. Basic authentication re-direct
      Hello, I have basic authentication turned on for a directory. Is it possible to re-direct a failed login to another page? -- Thanks in...
    2. sso/basic authentication
      We are interested in using basic authentication (with https) to implement Single Sign On (SSO) with Internet Explorer clients. Does anyone have...
    3. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    4. Basic Access Authentication
      I found this article http://www.dotnet247.com/247reference/msgs/22/113795.aspx, but unfortunatly it no longer exists here, so I'm re-opening it. ...
    5. Basic Authentication Logout
      I have an app with basic authentication turned on. I want to have a logout button. What code do I need to supply in my asp.net to logoff the user...
  3. #2

    Default Antwort: Re: Basic Authentication, WebService

    Hi
    my webservice is not running in IIS. To check if the authorization http
    header has been added, the message is sent to a tcp monitor which
    delegates the request to my webservice. Unfortunately, this header hasn't
    been added by my .NET client. I've done the following:
    String url = "http://chz11086:10001/xmlbus/berechtigung/Berechtigung_1_0Service/Berechtigung_1_0Porthttp://localhost:53205/xmlbus/berechtigung/Berechtigung_1_0Service/Berechtigung_1_0Port/";
    chz110861.Berechtigung_1_0Service service = new
    chz110861.Berechtigung_1_0Service();

    service.PreAuthenticate = true;
    NetworkCredential myCred = new NetworkCredential("cha3629","oli");

    CredentialCache myCache = new CredentialCache();
    myCache.Add(new Uri(service.Url), "Basic", myCred);
    service.Credentials = myCache;

    service.Url = url;
    service.ping();
    MessageBox.Show("Succeeded");
    oliver.wulff@zurich.ch Guest

  4. #3

    Default Antwort: Re: Basic Authentication, WebService

    No further ideas?
    I've found similar requests in other newsgroups about this issue but there
    was no reply. They used the same code as I do.
    Is there a bug?
    oliver.wulff@zurich.ch Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139