|
-
May 31st, 2005, 07:21 AM
#1
Thread Starter
Hyperactive Member
post to .net webservice using inet control[resolved]
I am trying to use a .net webservice in a vb6 app, but without using a control i have to then put on the client machines.
i have tried posting data to the webservice using the inet control but i keep getting a malformed url error, i'm not sure if im even posting to the correct place
Code:
wsurl = "http://localhost/Email/Email.asmx/SendEmail"
postdata = "isHTML=true&[email protected]&[email protected]&Subject=this is a test email&Body=this is the body of the test email&applicationName=testapp2&emailID=test2"
Inet1.Execute wsurl, "POST", postdata
Last edited by sagey; May 31st, 2005 at 11:06 AM.
Reason: [resolved]
-
May 31st, 2005, 07:26 AM
#2
Re: post to .net webservice using inet control
VB Code:
wsurl = "http://localhost/Email/Email.asmx/SendEmail"
Inet1.Execute wsurl, "POST", postdata
I remember encountering something roughly the same not so long ago, the spaces in the strings are fine as they are automatically transformed to +'s along the way.
But, when you are querying the Sendemail part you are adding your string to the URL without sending it as a query... here is how i believe it should look -
VB Code:
wsurl = "http://localhost/Email/Email.asmx/SendEmail?" 'note the ? to show a query
Inet1.Execute wsurl, "POST", postdata
If it helps Rate me, if not, then sorry, but i tried
-
May 31st, 2005, 08:09 AM
#3
Thread Starter
Hyperactive Member
Re: post to .net webservice using inet control [resolved]
The problem was me being ****e.
i had not dimmed the variable so i was getting an error because of them.
now sorted
-
May 31st, 2005, 08:56 AM
#4
Re: post to .net webservice using inet control [resolved]
 Originally Posted by sagey
The problem was me being ****e.
i had not dimmed the variable so i was getting an error because of them.
now sorted
Glad to hear it, please add the green Checkmark to your thread and tag the subject with [resolved]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|