hello, i have this summarized stored proc. Problem is, when using
'Send', my aspx page reads (asp.net)Request.Form as empty
However, when I use a simple html file to post, it works. Does anyone
know what's wrong?
EXEC @iHr = sp_oaCreate 'Msxml2.ServerXMLHTTP.3.0',@iObject OUTPUT
declare @data as nvarchar(max)
set @data = 'boo=yeah'
EXEC @iHr = sp_OAMethod @iObject, 'Open', null,
'POST',@smtpWebService, 0
EXEC @iHr = sp_OAMethod @iObject, 'setRequestHeader', null, 'Content-
Type', 'application/x-www-form-urlencoded'
EXEC @iHr = sp_OAMethod @iObject, 'send',null,@data
while @State<>4
begin
exec sp_oagetproperty @iObject, 'readyState', @State output
end
EXEC @iHr = sp_OAGetProperty @iObject, 'responseText',@retVal OUT
print @retVal
EXEC sp_OADestroy @iObject 2 8384
Nick Chan (zz*******@yahoo.com) writes:
hello, i have this summarized stored proc. Problem is, when using
'Send', my aspx page reads (asp.net)Request.Form as empty
However, when I use a simple html file to post, it works. Does anyone
know what's wrong?
I don't understand what you mean with "html file to post" or "send",
but then I am completely ignorant about web servers and ASP.
However, whatever you are doing, you should not use the sp_OAcreate
routines in SQL 2005. Write a stored procedure in .Net instead. If
you still have to call this Msxml2.ServerXMLHTTP object you will have
to make the assembly unsafe, but I think it's still better than
having to enable sp_OAmethod and granting privileges to it, as this
is a big security risk.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se
Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx
hi thanks a lot for the reply
sorry i meant, when i create a html file to submit a http post thru a
browser, it works.
but i have taken ur advice and did a .net library. was much simpler
with system.net.webclient. thanks!
On Sep 15, 5:42 am, Erland Sommarskog <esq...@sommarskog.sewrote:
Nick Chan (zzzxtr...@yahoo.com) writes:
hello, i have this summarized stored proc. Problem is, when using
'Send', my aspx page reads (asp.net)Request.Form as empty
However, when I use a simple html file to post, it works. Does anyone
know what's wrong?
I don't understand what you mean with "html file to post" or "send",
but then I am completely ignorant about web servers and ASP.
However, whatever you are doing, you should not use the sp_OAcreate
routines in SQL 2005. Write a stored procedure in .Net instead. If
you still have to call this Msxml2.ServerXMLHTTP object you will have
to make the assembly unsafe, but I think it's still better than
having to enable sp_OAmethod and granting privileges to it, as this
is a big security risk.
--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: designsimply |
last post by:
I am trying to http post some xml to to a remote server using php. When
I try to submit xml using PEAR's HTTP_Client::post() to the remote
server, I get back the following "Invalid Document Format"...
|
by: John Smith |
last post by:
I'm writing a service which accepts a POST call, updates a database and
returns raw HTTP headers as specified below:
HTTP/1.1 200 OK
Content-type:text/plain
Content-length:3
OK
The code...
|
by: A.M-SG |
last post by:
Hi,
I have an aspx page at the web server that provides PDF documents for smart
client applications.
Here is the code in aspx page that defines content type:
Response.ContentType =...
|
by: RHPT |
last post by:
I am wanting to capture the XML posted by an InfoPath form with .NET, but I
cannot figure out how to capture the XML stream sent back by the InfoPath
form. With Classic ASP, I could just create an...
|
by: WIWA |
last post by:
Hi,
I want to login to a password protected website and fetch the content of the
page behind. I have based my code on
http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
|
by: Christian Lutz |
last post by:
Hy there
I have a Web Services written in Java, running on Tomcat. The Client is
written in C#. When i monitor the request/Response with TCPMon (included in
Tomcat) i can observer the following...
|
by: bill |
last post by:
Is there a way to log the actual outgoing http post message on a Web
Services client? I am calling a Java Web Services. I have to use HTTP POST
in my native C++ code. What I can do is writing a C#...
|
by: Praveen |
last post by:
Hi All,
I have made a webservice in C# and it works fine in my machine. I ran into a
crazy problem when I wanted to deploy it in windows 2003 server. I have run
"aspnet_regiis.exe -i" to make...
|
by: majik92 |
last post by:
Hello,
I'm in the process of rewriting a program I wrote in LUA to VB.NET.
So, I am still learning the language (VB). I just have a question...
I have a windows form called "mainPage". I want...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
| |