BUG: Error When You Call LoadData Method in MSDN "Creating a Distributed Application" Walkthrough (320354)
The information in this article applies to:
- Microsoft Web Services (included with the .NET Framework) 1.0
- Microsoft .NET Framework SDK 1.1
- Microsoft .NET Framework SDK 1.0
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) "Creating a Distributed Application"
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.
- Type the name and the password of the SQL trusted domain
user in the Account used for anonymous access section.
- Click to clear Allow IIS to control password.
- Return to the project in Microsoft Visual Studio, and then
double-click the Web.config file in Solution Explorer.
- Add the following tag on the line after the <system.web> tag to configure integrated security for your XML Web service:
<identity impersonate="true"/>
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
REFERENCESFor additional information about ASP.NET security, click
the article numbers below to view the articles in the Microsoft Knowledge Base:
306158 INFO: Implementing Impersonation in an ASP.NET Application
306590 INFO: ASP.NET Security Overview
For more information, visit the following Microsoft
Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 9/17/2003 |
---|
Keywords: | kbbug kbnofix KB320354 |
---|
|