Basit Khan

Basit Khan

  • NA
  • 336
  • 121.6k

How to pass ASMX services security username & password in SQ

Dec 31 2016 2:55 AM
Hi,

I have created asmx services on insert trigger. its successfully working also.

after that i have added security for asmx services.
 
 
<authorization>
<deny users="*" />
<allow users="basit, sss" />
</authorization>
 
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
 
but how to pass asmx username and password
 
Thanks
Basit. 

Answers (1)