I want to send a biztalk document to an aspx page, and I need to see some
sample code, because I just can't make it work. I have a port with transport
type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't
figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just a
simple one that takes whatever biztalk sends and saves it as an xml file on
the hard drive, with some pointers of what to check for, maybe some
exception handling? I am working with C#.NET, but VB.NET would be nice too,
either one.
Any help would be very much appreciated. I am not in the habit of
crossposting to more than one newsgroup, but I have been searching for a
long time, and I am getting nowhere.
Thanks,
Daniel. 6 1152
This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e)
{
// Create a Stream object to capture entire InputStream from browser.
Stream str = Request.InputStream;
// Find number of bytes in stream.
int strLen = (int)str.Length;
// Create a byte array to hold stream.
byte[] bArr = new byte[strLen];
// Read stream into byte array.
str.Read(bArr,0,strLen);
// Convert byte array to a text string.
String strmContents="";
for(int i = 0; i < strLen; i++)
{
strmContents = strmContents + (Char)bArr[i];
}
// write string into a file using filestream
string Filepath = "c:\\output.xml";
FileStream fs = new
FileStream(Filepath,FileMode.CreateNew,FileAccess. Write);
StreamWriter sw = new StreamWriter(fs);
sw.Write(strmContents);
sw.Flush();
sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl... I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with
transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just
can't figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it as an xml file
on the hard drive, with some pointers of what to check for, maybe some exception handling? I am working with C#.NET, but VB.NET would be nice
too, either one.
Any help would be very much appreciated. I am not in the habit of crossposting to more than one newsgroup, but I have been searching for a long time, and I am getting nowhere.
Thanks, Daniel.
Thanks for the sample code. I copied it into my aspx page, but it doesn't
work for me. My guess is that I need to do some header validation in the
aspx page too, I just don't know what, because I can find no documentation
about this. Biztalk puts my request in the retry Queue, saying there's no
processing server. I get the following error in the event log.
An error occurred in BizTalk Server.
Details:
------------------------------
[0x80004005] An error occurred during transmission:
Request information:
Proxy:
Proxy port:80
URL: http://myserver/mypage.aspx
Content-Type:text/plain; charset="utf-8"
User name:administrator
Client certificate:
Request body:559 Bytes
Timeout duration (seconds): 600
Error code:80004005
====== ERROR =====
The HTTP server returned an unexpected response: 500 Internal Server Error
The following response was received:
<html>
<head>
<title>Parser Error</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size:
..7em;color:black;}
p
{font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b
{font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 {
font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 {
font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9emDans Test
[0x0159] The server encountered a transport error while processing the
messaging port "mytest", which uses a transport component with a ProgID of
"BizTalk.SendHTTPX.1".
[0x012b] A transmission attempt failed.
"Prashant Kondle" <pk*****@cox.net> wrote in message
news:Gaaqb.5512$mb5.3344@fed1read02... This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e) { // Create a Stream object to capture entire InputStream from browser. Stream str = Request.InputStream;
// Find number of bytes in stream. int strLen = (int)str.Length;
// Create a byte array to hold stream. byte[] bArr = new byte[strLen];
// Read stream into byte array. str.Read(bArr,0,strLen);
// Convert byte array to a text string. String strmContents=""; for(int i = 0; i < strLen; i++) { strmContents = strmContents + (Char)bArr[i]; }
// write string into a file using filestream string Filepath = "c:\\output.xml"; FileStream fs = new FileStream(Filepath,FileMode.CreateNew,FileAccess. Write); StreamWriter sw = new StreamWriter(fs); sw.Write(strmContents); sw.Flush(); sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl... I want to send a biztalk document to an aspx page, and I need to see
some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it as an xml file on the hard drive, with some pointers of what to check for, maybe some exception handling? I am working with C#.NET, but VB.NET would be nice too, either one.
Any help would be very much appreciated. I am not in the habit of crossposting to more than one newsgroup, but I have been searching for a long time, and I am getting nowhere.
Thanks, Daniel.
can u send me the code where u actually post to the BizTalk HTTP receive
DLL..from your application..
the problem is with biztalk parsing..and not with http..u can try to change
the channel settings to pass-through.so no validation occurs..
u can also validate your XML in the editor..or use a sample XML from the
biztalk tutorial for testing..
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thanks for the sample code. I copied it into my aspx page, but it doesn't work for me. My guess is that I need to do some header validation in the aspx page too, I just don't know what, because I can find no documentation about this. Biztalk puts my request in the retry Queue, saying there's no processing server. I get the following error in the event log.
An error occurred in BizTalk Server.
Details: ------------------------------ [0x80004005] An error occurred during transmission: Request information:
Proxy: Proxy port:80 URL:http://myserver/mypage.aspx Content-Type:text/plain; charset="utf-8" User name:administrator Client certificate: Request body:559 Bytes Timeout duration (seconds): 600 Error code:80004005 ====== ERROR ===== The HTTP server returned an unexpected response: 500 Internal Server
Error The following response was received: <html> <head> <title>Parser Error</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9emDans Test [0x0159] The server encountered a transport error while processing the messaging port "mytest", which uses a transport component with a ProgID of "BizTalk.SendHTTPX.1".
[0x012b] A transmission attempt failed.
"Prashant Kondle" <pk*****@cox.net> wrote in message news:Gaaqb.5512$mb5.3344@fed1read02... This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e) { // Create a Stream object to capture entire InputStream from browser. Stream str = Request.InputStream;
// Find number of bytes in stream. int strLen = (int)str.Length;
// Create a byte array to hold stream. byte[] bArr = new byte[strLen];
// Read stream into byte array. str.Read(bArr,0,strLen);
// Convert byte array to a text string. String strmContents=""; for(int i = 0; i < strLen; i++) { strmContents = strmContents + (Char)bArr[i]; }
// write string into a file using filestream string Filepath = "c:\\output.xml"; FileStream fs = new FileStream(Filepath,FileMode.CreateNew,FileAccess. Write); StreamWriter sw = new StreamWriter(fs); sw.Write(strmContents); sw.Flush(); sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl... I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just
a simple one that takes whatever biztalk sends and saves it as an xml
file on the hard drive, with some pointers of what to check for, maybe some exception handling? I am working with C#.NET, but VB.NET would be nice too, either one.
Any help would be very much appreciated. I am not in the habit of crossposting to more than one newsgroup, but I have been searching for
a long time, and I am getting nowhere.
Thanks, Daniel.
I don't want to send anything TO Biztalk, I want to receive something FROM
Biztalk, so I don't need to use the Biztalk receive dll, because as far as I
understand it right now that dll is for receiving documents INTO biztalk. So
biztalk sends something using HTTP transport to an aspx page, and that aspx
page should then take the actual XML document out of the request, so I can
use the values to call another application.
I tried a sample ASP file in the Biztalk SDK, and that works. The problem,
however, is that this code does not work in .NET. The app I am calling is
MS-CRM, which only has an object model available in .NET, so I need
something that will work in .NET.
Code in a regular ASP page, that sits in my wwwroot, and gets called in my
port in Biztalk:
<%
' ASP Receive page which accepts XML and saves it to a file
On Error Resume Next
Dim EntityBody, PostedDocument, Stream, fso, f
' Get the post entity body
EntityBody = Request.BinaryRead (Request.TotalBytes )
' Convert to text
Set Stream = Server.CreateObject("AdoDB.Stream")
Stream.Type = 1 'adTypeBinary
stream.Open
Stream.Write EntityBody
Stream.Position = 0
Stream.Type = 2 'adTypeText
Stream.Charset = "us-ascii"
PostedDocument = Stream.ReadText
Stream.Close
Set Stream = Nothing
set fso = Server.CreateObject("Scripting.FileSystemObject")
set f = fso.CreateTextFile("C:\temp\MyTest.xml", True)
f.WriteLine (PostedDocument)
f.Close
Set f = Nothing
Set fso = Nothing
%>
When I create a new aspx VB.NET project and copy this code into it, I can
build the project without any errors, but when I run the biztalk test, it
gives me the error from my earlier post. When I type the aspx page address
in a webbrowser, it gives me the following error:
Server Error in '/BTStoCRM' Application.
----------------------------------------------------------------------------
----
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type 'BTStoCRM.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="BTStoCRM.Global" %>
Source File: c:\inetpub\wwwroot\BTStoCRM\global.asax Line: 1
----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573
"Prashant Kondle" <pk*****@cox.net> wrote in message
news:o5cqb.5915$mb5.369@fed1read02... can u send me the code where u actually post to the BizTalk HTTP receive DLL..from your application.. the problem is with biztalk parsing..and not with http..u can try to
change the channel settings to pass-through.so no validation occurs.. u can also validate your XML in the editor..or use a sample XML from the biztalk tutorial for testing..
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thanks for the sample code. I copied it into my aspx page, but it
doesn't work for me. My guess is that I need to do some header validation in the aspx page too, I just don't know what, because I can find no
documentation about this. Biztalk puts my request in the retry Queue, saying there's
no processing server. I get the following error in the event log.
An error occurred in BizTalk Server.
Details: ------------------------------ [0x80004005] An error occurred during transmission: Request information:
Proxy: Proxy port:80 URL:http://myserver/mypage.aspx Content-Type:text/plain; charset="utf-8" User name:administrator Client certificate: Request body:559 Bytes Timeout duration (seconds): 600 Error code:80004005 ====== ERROR ===== The HTTP server returned an unexpected response: 500 Internal Server Error The following response was received: <html> <head> <title>Parser Error</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9emDans Test [0x0159] The server encountered a transport error while processing the messaging port "mytest", which uses a transport component with a ProgID
of "BizTalk.SendHTTPX.1".
[0x012b] A transmission attempt failed.
"Prashant Kondle" <pk*****@cox.net> wrote in message news:Gaaqb.5512$mb5.3344@fed1read02... This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e) { // Create a Stream object to capture entire InputStream from
browser. Stream str = Request.InputStream;
// Find number of bytes in stream. int strLen = (int)str.Length;
// Create a byte array to hold stream. byte[] bArr = new byte[strLen];
// Read stream into byte array. str.Read(bArr,0,strLen);
// Convert byte array to a text string. String strmContents=""; for(int i = 0; i < strLen; i++) { strmContents = strmContents + (Char)bArr[i]; }
// write string into a file using filestream string Filepath = "c:\\output.xml"; FileStream fs = new FileStream(Filepath,FileMode.CreateNew,FileAccess. Write); StreamWriter sw = new StreamWriter(fs); sw.Write(strmContents); sw.Flush(); sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl... > I want to send a biztalk document to an aspx page, and I need to see some > sample code, because I just can't make it work. I have a port with transport > type HTTP, pointing to my aspx page, something like > http://myserver/mypage.aspx. From there it gets blurry, because I
just can't > figure out how to do the rest. > > Does anybody have a sample page for me that I can take a look at?
Just a > simple one that takes whatever biztalk sends and saves it as an xml file on > the hard drive, with some pointers of what to check for, maybe some > exception handling? I am working with C#.NET, but VB.NET would be
nice too, > either one. > > Any help would be very much appreciated. I am not in the habit of > crossposting to more than one newsgroup, but I have been searching
for a > long time, and I am getting nowhere. > > Thanks, > Daniel. > >
Thank you Prashant for your sample code. The error turned out to be on the
server not in your code. MS support helped me solve the problem this morning
(it was a missing assemply node in the machine.config file in the framework
folder). I then copied your code back into my aspx page and it created the
file.
I am so happy today!! well at least for now :)
"Prashant Kondle" <pk*****@cox.net> wrote in message
news:Gaaqb.5512$mb5.3344@fed1read02... This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e) { // Create a Stream object to capture entire InputStream from browser. Stream str = Request.InputStream;
// Find number of bytes in stream. int strLen = (int)str.Length;
// Create a byte array to hold stream. byte[] bArr = new byte[strLen];
// Read stream into byte array. str.Read(bArr,0,strLen);
// Convert byte array to a text string. String strmContents=""; for(int i = 0; i < strLen; i++) { strmContents = strmContents + (Char)bArr[i]; }
// write string into a file using filestream string Filepath = "c:\\output.xml"; FileStream fs = new FileStream(Filepath,FileMode.CreateNew,FileAccess. Write); StreamWriter sw = new StreamWriter(fs); sw.Write(strmContents); sw.Flush(); sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl... I want to send a biztalk document to an aspx page, and I need to see
some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it as an xml file on the hard drive, with some pointers of what to check for, maybe some exception handling? I am working with C#.NET, but VB.NET would be nice too, either one.
Any help would be very much appreciated. I am not in the habit of crossposting to more than one newsgroup, but I have been searching for a long time, and I am getting nowhere.
Thanks, Daniel.
glad to help!..
initially i thought biztalk was the issue but based on your previous
mail..it seemed that problem lied with the .NET solution.
i had re-tested my code just to make sure...
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message
news:u1****************@TK2MSFTNGP09.phx.gbl... Thank you Prashant for your sample code. The error turned out to be on the server not in your code. MS support helped me solve the problem this
morning (it was a missing assemply node in the machine.config file in the
framework folder). I then copied your code back into my aspx page and it created the file.
I am so happy today!! well at least for now :)
"Prashant Kondle" <pk*****@cox.net> wrote in message news:Gaaqb.5512$mb5.3344@fed1read02... This is the piece of code i use in my ASPX page load function--
private void Page_Load(object sender, System.EventArgs e) { // Create a Stream object to capture entire InputStream from browser. Stream str = Request.InputStream;
// Find number of bytes in stream. int strLen = (int)str.Length;
// Create a byte array to hold stream. byte[] bArr = new byte[strLen];
// Read stream into byte array. str.Read(bArr,0,strLen);
// Convert byte array to a text string. String strmContents=""; for(int i = 0; i < strLen; i++) { strmContents = strmContents + (Char)bArr[i]; }
// write string into a file using filestream string Filepath = "c:\\output.xml"; FileStream fs = new FileStream(Filepath,FileMode.CreateNew,FileAccess. Write); StreamWriter sw = new StreamWriter(fs); sw.Write(strmContents); sw.Flush(); sw.Close();
}
hope it helps
-PK
"Daniel Rimmelzwaan" <ri*********@xhotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl... I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest.
Does anybody have a sample page for me that I can take a look at? Just
a simple one that takes whatever biztalk sends and saves it as an xml
file on the hard drive, with some pointers of what to check for, maybe some exception handling? I am working with C#.NET, but VB.NET would be nice too, either one.
Any help would be very much appreciated. I am not in the habit of crossposting to more than one newsgroup, but I have been searching for
a long time, and I am getting nowhere.
Thanks, Daniel.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bruno G. |
last post by:
Hello!
Is it possible for IIS to send some sort of notification when an ASP
error occurs on a page?
I can see them in the web logs, but I was wondering if there was a way
to receive an email...
|
by: Kitchen Bin |
last post by:
Hi.
I am trying to use Sockets to do multiple Send and Receives via HTTP
(not simultaneously). A first pair of Send/Receives works fine and
sure enough I receive HTML back, but the next...
|
by: Daniel Rimmelzwaan |
last post by:
I want to send a biztalk document to an aspx page, and I need to see some
sample code, because I just can't make it work. I have a port with transport
type HTTP, pointing to my aspx page, something...
|
by: Bhupesh Saini |
last post by:
I am trying to call a ASPX page using HttpWebRequest class and pass cookie information to it. My ASPX pages gets called just fine, however none of the request cookies are available to the ASPX page....
|
by: Amoril |
last post by:
I am currently developing an app that will post an XML file (1 to
100MB+ in size) to an outside vendor application via HTTPS Post (doing
this in a vb.net windows app). The vendor will then at some...
|
by: TCook |
last post by:
Hello,
I am trying to programmatically post (i.e. login, redirect &
programmatically submit data) to a website not a webservice. I am receiving
the error that is shown in the subject line of...
|
by: ken |
last post by:
Hello everyone,
I'm new to visual VB and I am trying to setup communications using the
Function ReceiveSerialData() As String example found in the help
section of Microsoft Visual Basic 2005...
|
by: BigDave |
last post by:
For a previous employer, I did a lot of BizTalk 2004 development, but
am no longer doing so, and do not even have BizTalk installed.
One of the things I miss is the BizTalk Scheme Editor, and how...
|
by: Joe |
last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which
closely coincide with my expired session) by checking for the Authentication
Cookie when the login screen loads. If the...
|
by: Henry Stock |
last post by:
I am trying to understand the following error:
Any thing you can tell me about this is appreciated.
Security Exception
Description: The application attempted to perform an operation not allowed...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |