Sending XML data to asp server... Is there any problem?

Hi, I transform client XML data to IIS server by WinInet API.
In IIS server, asp parse request XML data and result save in MS-SQL.

I can read XML data by this function,
but I can send XML data...
The function that I use is that...

BOOL CXMLUtil::RequestHttpServer(LPCTSTR lpszMethod, LPCTSTR lpszURL,
  LPCTSTR lpszRequest, LPCTSTR lpszHeader,
  CString &strResponse, CString &strStatus)
 BOOL fResult = TRUE;

 CInternetSession iSession;
 CHttpConnection *pHttpConnection = NULL;
 CHttpFile *pHttpFile = NULL;
 CString str_ErrorText;
 DWORD dwErrorCode = 0;

 CString strUrl = lpszURL;
 CString strMethod = lpszMethod;
  strMethod = "GET";

 // Send Request
 DWORD dwServiceType;
 CString strServerName;
 CString strObject;
 CString str_Head;

 BOOL fParsed = AfxParseURL(strUrl, dwServiceType, strServerName,
strObject, nPort);
  pHttpConnection = iSession.GetHttpConnection( 

  pHttpFile = pHttpConnection->OpenRequest( 
   (LPCTSTR)strMethod, strObject, NULL, 1, NULL, 

   pHttpFile->AddRequestHeaders(lpszHeader, HTTP_ADDREQ_FLAG_REPLACE |

  if(lpszRequest == NULL || _tcslen(lpszRequest) == 0){
  } else {
   pHttpFile->SendRequest(NULL, 0, (void*)lpszRequest,

  //Receive Response
  pHttpFile->QueryInfo(HTTP_QUERY_STATUS_TEXT, str_ErrorText);

  strStatus.Format("%d %s", dwErrorCode, (LPCTSTR)str_ErrorText);
  if(dwErrorCode / 100 == 2) {
   char buf[8193];
   DWORD dwLength;

   strResponse = "";

    dwLength = pHttpFile->GetLength();
    if(dwLength == 0)

    dwLength = pHttpFile->Read(buf, min(sizeof(buf)-1, dwLength));
    buf[dwLength] = 0;
    strResponse += buf;
   } fResult = TRUE;
   fResult = FALSE;
  fResult = FALSE;

  delete pHttpFile;

  delete pHttpConnection;


 return fResult;

and I use this function like this...

void Test()
 CString xmlCustomers;
 xmlCustomsers = "<?xml .....?><test></test>";  // not completed
 CString strResponse;
 CString strStatus;
 RequestHttpServer("POST", strUrl, xmlCustomers,
              "COntent-Type: text/xml\r\n", strResponse, strStatus);

Is it any problem?
Could you have any clue. help me...

rigmania (4)
7/15/2003 12:26:19 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 59


Similar Artilces:

Changing Server Name
I set up an Exchange 2003 server. While messing around with the settings, I realized I did not like the name of the machine, so I changed it. But, in ESM, it still shows the old server name. How do I change the server name in ESM? Thanks, Jeff On Sat, 25 Mar 2006 14:32:51 -0800, Jeff Grossman <> wrote: >I set up an Exchange 2003 server. While messing around with the >settings, I realized I did not like the name of the machine, so I >changed it. But, in ESM, it still shows the old server name. How do >I change the server name in ESM? > >Th...

How do I send copies emails without sending attachments?
I send emails with attachments to our bank. My boss wants a copy of the email but not a copy of the attachment. How do I do that? Steve Bramblett wrote: > I send emails with attachments to our bank. My boss wants a copy of the > email but not a copy of the attachment. How do I do that? Each recipient gets the SAME copy of the e-mail. If you want different recipients to get different versions of your e-mail, you have to send different e-mails. ...

Data Security & Flash Drive Formatting
Last week I placed some sensitive files on a flash drive for a brief period (two or three hours) before deleting them. At this point, I'd like to make sure that these deleted files CANNOT be recovered, and I know there are tools out there that *can* restore deleted files. I need to make sure that any such tools will NOT be able to recover the files in question. So, I'm wondering if a "low-level" format operation would flip all the 1's to 0's (so to speak), such that these files would be certainly unrecoverable. Would formatting do the trick? And wo...

no data to return blank
I currently have this formula =IF(C8>0,C8-$G$3,"") in a series of cells which is fine when there is information but I get a # value error when there is nothing in the cells it looks to. Is there a way to have it leave the cell blank if there is no data in the cells it looks to? -- A. when i test this formula using blank cells for c8 & g3 i get a blank cell as a result. how is your sheet arranged? "Andmor" wrote: > I currently have this formula =IF(C8>0,C8-$G$3,"") in a series of cells which > is fine when there is information ...

Wacky migration wizard problems
Hello all, We have two separate domains with the following configuration: Single NT4 PDC running Exchange 5.5 Single W2003 DC running Exchange 2003 There is a two way trust between the domains. I ran the Migration Wizard and moved over one user account. I logged into the new domain as the user, setup Outlook with the proper settings, and got an error that the user account did not have permissions to the mailbox. I checked in system manager and Self has all the necessary rights to the mailbox. The weird thing is that we did another test migration a month ago with the same domains...

No message in outbox
I tried to send a message with 1Mb attachment to 40 recipients in the bcc field. It gave me an error message from the isp's server, the message was NOT sent (I've checked), it did NOT arrive in Sent Items, but neither is it in the Outbox any more. I can send and receive email successfully. Problem is, every few minutes Outlook tells me it's sending message 1 of 1, it fails and gives me the same error message. Yet there is no message in the Outbox. But what happened to the original message when it first failed to send? I guess it's 'stuck' somewhere but I can...

Bin and sort a large list of data
I have a large list of data that i need to go through for my job. what i want to do is organize the numbers into bins, then elimintate any numbers that are identical. does anyone have any ideas? Hi, Sort the data into the number order. Let's say that is in column A. Then in the first free column, make the first cell 0, and then do in row 2 =IF (A1=A2,1,0) This will then equal zero on the first line of a new number. Then Copy, Paste Special, Values on this column of ones and zeros, and then sort on it. The data at the top will be a unique list of numbers. You can just the...

Converting an MFC 6.0 App to .net problem
I have recompiled an existing MFC 6.0 application in VS .net 2003. Now about every 13th time I run it in debug mode I get a "Unhandled exception at 0x7c901230" error. When I run it using the WinDbg program I get: DBGHELP: ntdll.pdb - file not found *** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - DBGHELP: ntdll - export symbols ntdll!DbgBreakPoint: 7c901230 cc int 3 When I run a release version of the application everything runs fine. Any Ideas? Larry The information you posted regarding symbol files is irrelevant to ...

Sending mail from selected email address
Hi All, As I have 4 email accounts set up in Outlook, I understand that I can send mail from each or any account. The accounts are listed under tools / Send and Receive / then each of the accounts. How can I choose which account to send from so that the recipient see's who I want it to be from?? Hope that explains it. Regards Alan On Sat, 16 Apr 2005 21:10:48 -1000, The Fatman <> wrote: > Hi All, > > As I have 4 email accounts set up in Outlook, I understand that I can > send > mail from each or any account. > > The acco...

Sending a macro to another PC-how?
How do you send a macro you've written to another PC so that they can save it in their Personal.xls file (at Program Files\Microsoft Office\Office\XLStart)? You can export a macro and save it, to do this from your workbook, right-click the workbook's icon and pick View Code. This icon is to the left of the "File" menu this will open the VBA editor, click on the module you want to save and go to file and export file, then save it to a floppy or what ever you backup to, then import it to the new workbook. -- Paul B Always backup your data before trying something new Using ...

Data validation doesn't work if contents is added by pasting
Hi I've data validation set so that only the number 1 can be entered, but even this cannot be entered if an adjacent cell is a certain value. this works for direct entry, but not if the value is pasted in or added using the "drag handle". Is there any way to stop this happening as I just know somewones going to try and fill all the cells by draging the values down. Regards Jeff Jeff, You could disable "Allow cell drag and drop" in Tools | Options or... copy the following code, right click the sheet tab and choose 'view code'. Paste the code into the modu...

Sending mail from remote location
my mail works great while at home. when I go on the road I can receive ail but not send. I get the following error message: Subject 'SKIDOO MACH Z 800LT (long track / long tunnel) (Jackson)', Account: 'Jeff', Server: '', Protocol: SMTP, Server Response: '571 imp11 OTcuMTQ3LjE2LjIzMA== You must connect from Charter IP space. E1110', Port: 25, Secure(SSL): No, Server Error: 571, Error Number: 0x800CCC61 It worked on my last laptop and I have not been able to figure it out on this one. I can't remember what I...

Forwarding email to Blackberry to a remote server
I have Blackberry with an email address on a server in NYC that runs BES 4 and exchange 2000. And I want to have people email to an address on an exchange 2000 server in Albany, NY and have exchange forward the emails to the person's mailbox and to the Blackberry in NYC. I have setup the forwarding system as prescribed by MS, but when people on the NYC domain email the Albany address they get this error message: From: System Administrator Sent: Friday, February 11, 2005 1:57 PM To: Gary Subject: Undeliverable:RE: Delivery Status Notification (Failure) Your message ...

Send and Recieve Fix
For a long time I had a problem with my Send/Recieve function in Outlook. This happended in both Outlook 2000 and my current version - 2007. I found I had to re-boot my computer to perform a Send/Recieve in Outlook. Otherwise the sequence would start then stop and say it could not perform due to an error. After extensive Internet and News Group research I decided it was time to run a check on disk errors. This Windows XP facility seemed to have fixed my Outlook problem. I did this about a few months ago now and I have since had no problems with my send and recieve. Unfortunately I do have ...

Unable to send?
Hi, I've got MOOL, and i"m usign ti with outlook. The emails that I'm sending are just "stuck" in the outbox? Can anyone give me an idea of what's going on? Rex Did it ever work? Are you able to receive? -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP Roland Schorr & Tower Microsoft OneNote FAQ: **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Rekks" <> wrote ...

Sending messages in Outlook
We have a user that everytime that she sends an email she will get booted out of Outlook. The email does go through, but she will have to get out of Outlook. When she goes back into Outlook, everything is fine until she sends another message. Any help would be appreciated. ...

No Permission to Send/Receive Email???
I just replaced our server hardware, upgraded to WS 2k3 Enterprise and created a new domain. I transferred the client files and desktop on our desk/laptop computers over to the new domain. We do NOT have Exchange installed yet, but use Outlook 2002 with the email etc. saved on the client. One one client machine (mine), the email, calendar, etc are there, but when I hit the Send/Receive button, I get a message saying that I don't have permission to perform this operation. Also when I try and change the automatic check for email option it tells me I don't have permission. ...

problem with combining functions
I'm using regular Excel formula in the cells (not scripting, mainly because I don't know how). I have a problem with trying to combine offset() and small() my actual code is: =OFFSET(small(E4:E18,1),0,-2) and it obviously doesn't work. Is there any way to use those two features together? If it helps I'm trying to make a gradebook capable of weighting categories (e.g. 50% of avg for quiz, etc.) and dropping lowest quizzes. I have all the code working except this one combination of finding the lowest grade using small() and returning its corresponding number using offset(). ...

Automatic Data Changes
I have a work sheet that I use to monitor dates. I need to track up to 5 dates at a time. I would like my worksheet to update automaticaly when I change the dates. Let me explain. The data in A4 through A12 never changes. The data in B4 through B12 changes weekly. I need to track the last 5 changes made to B4 through B12. ex. Lets say B4=10/20/09. I then change B4 to 11/2/09. I want the data from B4 to go to C15. so C15 will be 10/20/09. Then when I change B4 to 11/16/09, I want C15 to automatically update to 11/2/09 and C16 to update to 10/20/09. and so on for 5 dates....

CListView Problem #2
Hi, I have a strange problem that 'just appeared' a couple of days ago. Both views are derived from my CLView:CListView. I also have a CLView object in another view not derived and driven from the doc that's fine. I can only hope this rings a bell as I've shut _everything_ off in the report view, (toolbars, initializing columns, writing rows, styles, tooltips, anything my derived class does.) The only thing I'm doing that is different than MFC is my doc manager deletes and creates views in the main frame, but I doubt th...

Send Do Not Send
When I attempt to email via a print server - OutLook Express displays the message "A program is attempting to email on your behalf" Send or Do Not Send - How do you prevent this from happening? And just automatically send? ...

View other BU data
Hi, Let say there are 4 BU define in my systems and name it as BU1 up to BU4 accordingly. And each BU has manager and sales person that is different from other BU. Is it possible that BU1 manager can see all lead, opportunity for BU2? But BU2 manager cannot see the BU1 lead and opportunity?? Thx, Carrie Hi, yes it is possible by using different security roles for the two different sales managers (they have different access rights and should therefore have different roles). It is also possible using BU hierarchy and placing the managers in a aggregate BU or in the bottom one dependin...

Exchange 2003, Windows Server 2003, Data Centre Environment
Interesting title to a somewhat uninteresting post. I've just signed up for this, using the Windows Live Mila desktop beta, and just want to test things are working ok! Hello! Adam Laslett wrote: > Interesting title to a somewhat uninteresting post. > I've just signed up for this, using the Windows Live Mila desktop beta, > and just want to test things are working ok! > > Hello! > SOB. ...

Sending on behalf... Exchange 2003
Hi everyone, Is there a better way to give a few users the ability to send mails also from the mailbox without having them logout and login to a different Outlook 2003 profile... Or without the text sending on behalf of... So my question is, Is there an easy way that a user can select another e-mail address and send mails out...? Thanks a lot in advance!! Regards, BY On Thu, 05 Oct 2006 12:57:12 GMT, "BY" <> wrote: >Hi everyone, > >Is there a better way to give a few users the ability to send mails also >from the info@dom...

What was Outlook sending?
Hi, I downloaded my messages using the option "send and receive all". However, the "Show Progress" box indicates that I was also 'sending something'. But I had nothing to send! I look in the "Sent items' folder and nothing was sent at this time. What was Outlook 2003 doing? Santista The usual response here is, "You have a virus". It could be that a virus program is using your Outlook to send spam and/or a copy of itself to people in your address book. I hope this is not the case, but please have the foresight (aftersight?) to look into ...