TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P196

Microsoft SQL Server 2008 R2 Unleashed- P196:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 1944 CHAPTER 48 SQL Server Web Services LISTING Calling a SQL Server Web Method from C if EPT_SQL2008UnleashedExamples SQLEndpointProxy new EPT_SQL2008UnleashedExamples int Employeeld object ReturnArray EmployeeId foreach object Obj in ReturnArray if Obj is DataSet DataSet ds DataSet Obj if 0 No Results Found else SqlRowCount ReturnArray 1 .Count Result s Found ds After you test whether the text box txtEmployeeld is nonempty you instantiate the WSDL-based stub class and name it SQLEndpointProxy. Next you set the credentials used by the web service to those of the currently logged-on user. NOTE When using SQL Server not Windows Authentication instead of assuming the default credentials you need to add web services security WS-Security username and password headers to the SOAP request. Note that the password will be sent in clear text so SSL is required to be installed and turned on for your web service. Anonymous web access is completely disabled for SQL Server web services and Visual Studio turns on NTLM authentication by default for the sample web application s virtual directory. Examples A C Client Application 1945 Depending on your system s security policy configuration the following line might be required in the configuration section of your or file identity impersonate true userName SQLWebServicesClient password wsdl This line tells the CLR to run the web application under the credentials of the user SQLWebServicesClient created earlier and also specified after the AUTHORIZATION keyword in the DDL . The client application thus impersonates SQLWebServicesClient in its requests to the web service regardless of the credentials of the logged-in .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.