0

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.

but how to pass the asmx webservice security on below SQL code. This code is working fine without ASMX secuirty(username & password)

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.

user3069097
  • 59
  • 1
  • 12

1 Answers1

0

Pasting from: How to logon webapi from SQL Server

 EXEC @hResult = sp_OAMethod @objectID, 'open', null, @methodName,
 @URI, 'false', @UserName, @Password
Community
  • 1
  • 1
gerodim
  • 131
  • 8