Cyberactiva - webmaster tutorials, programming and videogames tricks

webmaster menu webmaster menu webmaster menu webmaster menu webmaster menu webmaster menu webmaster menu webmaster menu
  

Authenticate SOAP Message only no GET OR POST

Authenticate SOAP Message only no GET OR POST
Hi
i need to write a webservice which will accept only soap message NO POST or
GET.
i can see this in WSE using RequestSoapContext.Current but we don;t want to
use WSE, is there way ?
Can any one post some link samples for this.

ALSO i see this type of message on some of the services
SOAP RPC Router
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me.
How to do this?
thanks
bhu
Hu Bhu,

ASP.NET generates information for HTTP GET and HTTP POST bindings unless it
is told not to. You can remove these bindings by editing the web.config file
and adding the following lines inside the /configuration/system.web element.









--
Fabio Scagliola
http://fabioscagliola.com

Just wondering... if the HTTPPost from the WebService is removed, how will
it receive the SOAP-Requests?

or am I confused with something else?
--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
"Fabio" wrote in message
news:D13B9239-0235-4742-9552-A36DC2BEDE2A@microsoft.com...
> Hu Bhu,
>
> ASP.NET generates information for HTTP GET and HTTP POST bindings unless
> it
> is told not to. You can remove these bindings by editing the web.config
> file
> and adding the following lines inside the /configuration/system.web
> element.
>
>
>
>
>

>

> --
> Fabio Scagliola
> http://fabioscagliola.com
>
> Just wondering... if the HTTPPost from the WebService is removed, how will
> it receive the SOAP-Requests?
>

That will not prevent the web service to receive HTTP POST messages. SOAP
messages are HTTP POST messages indeed, but the content is different. See
samples below.

The following is a sample SOAP 1.1 request.

Message header:

POST /WebSite/AboutMe.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: ...
SOAPAction: "http://fabioscagliola.com/webservices/GetMyFavoriteBook"

Message body:


xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">






The following is a sample HTTP POST request.

POST /WebSite/AboutMe.asmx/GetMyFavoriteBook HTTP/1.1
Content-Type: application/x-www-form-urlencoded

EMPTY
--
Fabio Scagliola
http://fabioscagliola.com

>> Just wondering... if the HTTPPost from the WebService is removed, how
>> will
>> it receive the SOAP-Requests?
>>
>
> That will not prevent the web service to receive HTTP POST messages. SOAP
> messages are HTTP POST messages indeed, but the content is different. See
> samples below.

Hmmm.... got it now. Thanks, Fabio.
But I think HttpPostLocalhost should be remove and not HttpPost... not sure.
Actually, I just looked into WebServiceProtocols enum and then back into
WebServicesSection... and found the following protocols:
1. Documentation
2. HttpPostLocation
3. HttpSoap (v1.1)
4. HttpSoap12 (v1.2)
To test, just do
System.Configuration.ConfigurationManager.GetSection("system.web/webServices")
and get the Protocols property of the WebServicesSection that you get.
--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
Register for freeMembers Area
Web MarketingLast Web Marketing
Web MarketingLast Programming Tips
Web MarketingLast News


Web Marketing Links and links exchange .