Problem with HTTP adapter , security in IIS and biztalk.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS Server Security > Problem with HTTP adapter , security in IIS and biztalk.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Problem with HTTP adapter , security in IIS and biztalk.  
Luis Esteban Valencia


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-13-05 11:02 PM

1. I installed Biztalk Server when It asked me to create human services
site I went to IIS and created a new site on port 99. THen I continued with
installation after install I see that the new website has 2 new virtual
directorys called HwsMessages and HwsService. I noted that HwsMessages has
the dll file that I am trying to use on my lab called BTSHTTPReceive.

2. I created the biztalk solution with 2 schemas , one property schema, one
map, 3 send ports , 1 group send port, 1 receive port.
The receive port is HTTP configured to this.
Virtual Directory plus Isapi Extension:
/HWSMessages/BTSHTTPReceive.dll
Public Adress:
http://localhost:99/HWSMessages/BTSHttpReceive.dll

3. Then I created a new c# website in the port 99 called HTTPSender, I added
some textboxes and the button has the following code.

private void btnSubmit_Click(object sender, System.EventArgs e)

{

string requestLocation =
"http://localhost:99/HwsMessages/BTSHTTPReceive.dll";

status.Text = "";

XmlDocument xmlDocument = new XmlDocument();

xmlDocument.PreserveWhitespace = true;

XmlNode tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element,
"Activity", "http://que.activity");

xmlDocument.AppendChild(tempXmlNode);

tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Attribute, "type", "");

tempXmlNode.Value = type.SelectedItem.Text;

xmlDocument.DocumentElement.Attributes.Append( (XmlAttribute)tempXmlNode);

tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Location", "");

tempXmlNode.InnerText = location.Text;

xmlDocument.DocumentElement.AppendChild(tempXmlNode);

tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Timestamp", "");

DateTime now = DateTime.Now;

tempXmlNode.InnerText = now.ToString("s");

xmlDocument.DocumentElement.AppendChild(tempXmlNode);

tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Notes", "");

tempXmlNode.InnerText = notes.Text;

xmlDocument.DocumentElement.AppendChild(tempXmlNode);

try

{

HttpWebRequest request = (HttpWebRequest)
HttpWebRequest.Create(requestLocation);

request.Method = "POST";

ASCIIEncoding encoding = new ASCIIEncoding();

byte[] requestData = encoding.GetBytes(xmlDocument.OuterXml);

request.ContentType="application/x-www-form-urlencoded";

request.ContentLength = xmlDocument.OuterXml.Length;

status.Text += "Submitting activity message";

Stream requestStream = request.GetRequestStream();

requestStream.Write(requestData,0,requestData.Length);

requestStream.Flush();

requestStream.Close();

HttpWebResponse response = (HttpWebResponse) request.GetResponse();

StreamReader responseData = new StreamReader( response.GetResponseStream());

status.Text = System.Web.HttpUtility.HtmlEncode( responseData.ReadToEnd()) +
"
";

}

catch (WebException wex)

{

status.Text = "Unable to complete web request. Web Exception error: " +
wex.Message;

}

}



After submitting I got this Error.

Unable to complete web request. Web Exception error: Error en el servidor
remoto: (401) No autorizado


IIS has the following security on the new website I created.

Anonymous Authentication and Integrated windows authentication are enabled.

On the virtual folder called HwsMessages that has the dll.

Windows authentication enabled.

On the new web application called HTTPSENDER that I just wrote

Anonymous Authentication and Integrated windows authentication are enabled.



AS this Didnt work I followed the steps on the books.

It literally says

HTTP Receive Location
That's all the code we need to write. Everything else in our solution is a
matter of configuration. First, we need to put the HTTP receive adapter out
there somewhere. To make things easy, I've put it in the same folder as
HTTPSender, but this is not necessary. In fact, in a real system in which
messages are going from dispersed sources to a central handler, this would
not be the case. Wherever you decide to put the handler, you simply copy
BTSHTTPReceive.dll from the HttpReceive folder under the BizTalk
installation to the target location. Using the Component Services
application in the Windows Control Panel's Administrative Tools folder,
configure the HTTPSender application (or the Web application you create, if
you elect to put the HTTP handler assembly in another location) to use the
identity of a member of the BizTalk Users group to ensure that the handler
will have access to the MessageBox

I did exactly the same except and also changed the receivelocation and the
code for the URL in the submit button.

Now I got a different error.

Unable to complete web request. Web Exception error: Error en el servidor
remoto: (405) Método no permitido.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:19 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register