Microsoft KB Archive/320354

= BUG: Error When You Call LoadData Method in MSDN &quot;Creating a Distributed Application&quot; Walkthrough =

Article ID: 320354

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Web Services Enhancements for Microsoft .NET 2.0
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2

-



This article was previously published under Q320354



SYMPTOMS
When you call the LoadData method from the AuthorsWinClient on a remote computer according to the instructions in the Microsoft Developer Network (MSDN) &quot;Creating a Distributed Application&quot; walkthrough, the method is unsuccessful and you receive the following error message:

Result: Error: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. at System.Data.SqlClient.SqlConnection.Open at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) at System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand

command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand

command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at WSRepro.Service1.GetDataSet in c:\inetpub\wwwroot\wsrepro\service1.asmx.cs:line 158



CAUSE
The walkthrough does not have enough information about security to work correctly when you call a Web service method on a remote computer.



RESOLUTION
Impersonate the Microsoft SQL Server trusted domain account through Microsoft Internet Information Services (IIS).

You must configure the project by using the IIS tool.  Start IIS. To locate IIS, double-click Administrative Tools in Control Panel. (For more information about how to start this tool, see your Microsoft Windows Help documentation.) Expand the node for your server. Expand the Default Web Site node. Right-click the AuthorsWebService node, and then click Properties. Click the Directory Security tab. In the Anonymous access and authentication control section, click Edit.</li> Type the name and the password of the SQL trusted domain user in the Account used for anonymous access section.</li> Click to clear Allow IIS to control password.</li> Return to the project in Microsoft Visual Studio, and then double-click the Web.config file in Solution Explorer.</li>  Add the following tag on the line after the <system.web> tag to configure integrated security for your XML Web service: <identity impersonate=&quot;true&quot;/> </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

<div class="references_section">