SQLTeam.com | Weblogs | Forums

How to pass ASMX services security username & password in SQL

sql2008r2

#1

Hi,

I have created a asmx services in .net and then i want to pass in sql.

i created below code and its working successfully.

set @URL=N'http://localhost/Test/WebService1.asmx/Frm_SendNotification?LsM_Message='test'

EXEC @rc = sp_OACreate 'MSXML2.ServerXMLHTTP', @objServHTTP OUT
EXEC @rc = sp_OAMethod @objServHTTP, 'open', NULL, 'GET', @URL
EXEC @rc = sp_OAMethod @objServHTTP, 'send'
EXEC @rc = sp_OADestroy @objServHTTP

now i want to pass the username and password.

Thanks
Basit.