<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WebService Authentication in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/webservice-authentication/m-p/6248637#M1383318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the solution.&lt;/P&gt;&lt;P&gt;In Visual C# 2008 Express Edition, was necessary to override the method System.Net.WebRequest GetWebRequest, and inform the username and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jut insert this code in the partial class!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected override System.Net.WebRequest GetWebRequest(Uri uri)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)base.GetWebRequest(uri);&lt;/P&gt;&lt;P&gt;  request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new System.Text.ASCIIEncoding().GetBytes("USERNAME" + ":" + "PASSWORD")));&lt;/P&gt;&lt;P&gt;  return request;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2009 17:56:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-28T17:56:41Z</dc:date>
    <item>
      <title>WebService Authentication</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webservice-authentication/m-p/6248636#M1383317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a WebService on SAP ECC 6, and would like to use it on my .NET program. (C# CSHARP language).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, How can I inform the user and password? How can I authenticate on SAP ECC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WebReference.zwservice zwservice = new WebReference.zwservice();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WebReference.zwsmethodo zwsmethodo = new WebReference.zwsmethodo();&lt;/P&gt;&lt;P&gt;zwsmethodo.I_ENTRADA = "1";&lt;/P&gt;&lt;P&gt;WebReference.zwsmethodoResponse zresp = zwservice.zwsmethodo(zwsmethodo);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Console.WriteLine("Resp ", zresp.E_NOME);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 18:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webservice-authentication/m-p/6248636#M1383317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T18:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: WebService Authentication</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webservice-authentication/m-p/6248637#M1383318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the solution.&lt;/P&gt;&lt;P&gt;In Visual C# 2008 Express Edition, was necessary to override the method System.Net.WebRequest GetWebRequest, and inform the username and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jut insert this code in the partial class!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected override System.Net.WebRequest GetWebRequest(Uri uri)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)base.GetWebRequest(uri);&lt;/P&gt;&lt;P&gt;  request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new System.Text.ASCIIEncoding().GetBytes("USERNAME" + ":" + "PASSWORD")));&lt;/P&gt;&lt;P&gt;  return request;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 17:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webservice-authentication/m-p/6248637#M1383318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T17:56:41Z</dc:date>
    </item>
  </channel>
</rss>

