473,804 Members | 3,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

receive https post (asp.net)

I am currently developing an app that will post an XML file *(1 to
100MB+ in size) to an outside vendor application via HTTPS P*ost
(doing
this in a vb.net windows app). The vendor will then at some *later
date
post an updated return XML file to my webserver (asp.net). T*he
primary
problem I'm having is getting the posted stream to load in a*n
XMLDocument object. When trying to read the posted stream in*to the
XMLDocument the following error is kicked back from my webse*rver
(seen
by the vendor), "The remote server returned an error: (500) *Internal
Server Error." At minimum I want to make sure that the XML t*hey're
posting to me is well-formed so I don't need to load it into* an
XMLDocument object if there's another way to do it.
Also they're expecting to post their info to me via HTTPS, h*ow can I
set up my page so it's looking for credentials to be passed *along
with
the XML stream? I see how to send credentials to them using
System.Net.Netw orkCredential, but I don't see how accept cre*dentials
from the vendor when they post to me.
Code used to accept HTTP post from Vendor:
Dim str As Stream
Dim strmContent As String
Dim strLen As Integer
Dim strRead As Integer
'Request input stream from the poster
str = Request.InputSt ream
'Get the length of incoming string
strLen = str.Length
'make a Byte array the size of the stream
Dim strArr(strLen) As Byte
'read the stream into the array
strRead = str.Read(strArr , 0, strLen)
'the stream will be ASCII encoded
Dim ascii As ASCIIEncoding = New ASCIIEncoding
'Get ASCII into reg. string here
strmContent = ascii.GetString (strArr)
Dim doc As XmlDocument = New XmlDocument
doc.LoadXml(str mContent)
doc.Save("D:\te mp\test5.xml")
'Return Response to poster.
Response.Write( "some response")
Any suggestions on what I can do to fix this or possible res*ources
that
might help me out?
Thanks!

Jul 21 '05 #1
0 1357

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2323
by: Gill Bates | last post by:
I'm trying to login to a banking site (https://www.providentconnection.com) using vb.net. I've tried many variations of WebClient and HttpWebRequest; none of which I've got to work. My latest version is: Dim myWebClient As New WebClient Dim nvc As New NameValueCollection nvc.Add("Login", username) nvc.Add("Password", password)
1
2195
by: dave | last post by:
Hello I have one simple form (myform.asp) and it posts to query.asp I had put below code in both file on top of the page to redirect this two pages in https:// so any one can access it thru http , it changes to https:// if Request.ServerVariables("HTTPS") = "off" then method = Request.ServerVariables("REQUEST_METHOD") srvname = Request.ServerVariables("SERVER_NAME") scrname = Request.ServerVariables("SCRIPT_NAME") sRedirect = "https://"...
6
3149
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 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...
8
11087
by: Soeren S. Joergensen | last post by:
Hi, From a win-service I do a HttpWebRequest to a secure url with some parameters to get some simple data from a remote system used later on in a worker thread. When making the request from my code it takes about 10-12 secs to complete, but doing same request in my browser takes less than 1 sec. Can anyone explain this delay from within my code ??
2
6948
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 later date post an updated return XML file to my webserver (asp.net). The primary problem I'm having is getting the posted stream to load in an XMLDocument object. When trying to read the posted stream into the XMLDocument the following error is...
7
1855
by: Masahiro Ito | last post by:
I need to be login to several websites and download files that are https connections. I just tried IPWorks demo, but it does not seem to offer https. Does anyone know an https capable product, or a way I can do this myself? Thank you. Masahiro
0
464
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 P­ost (doing this in a vb.net windows app). The vendor will then at some ­later date post an updated return XML file to my webserver (asp.net). T­he primary problem I'm having is getting the posted stream to load in a­n XMLDocument object. When trying to read the posted stream in­to the XMLDocument the following...
0
1673
by: David Mediavilla | last post by:
I am writing a client for an HTTPS web service using WSE 1.0 but I always get an error like "The underlying connection was closed: An unexpected error occurred on a send." Sometimes the error "occured on a receive". Looking around, I find http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx ("Solving "The underlying connection was closed" when using WSE"), that sets KeepAlive to false, but it doesn't work for me since when I get to...
11
1973
by: IfThenElse | last post by:
Hello, Is there a set up in IIS 6.0 on W2K3 that can automatically switch my users from http to https. I know there are scripts that can be added to do that. But is there a universal setup in IIS to do so. if not will a future IIS provide that func.
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9589
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9163
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7626
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.