I have an ASP.Net application that uses SQL Server stored procedures and web services using Windows Authentication. The idea is to use the registered user credentials to call the web service (this is important because the web service uses authentication credentials to assign the owner of the created or updated record) and to execute the stored procedure.
When I use the integrated VS.Net web server, the result will be fine (maybe because this server starts with the current user account). SQL Server SP returns the expected results (even when I run them in Query Analyzer) and the web service credentials are set correctly for the currently logged in user.
However, when I host the application in local IIS, it does not work properly. The Sql server stored procedure returns an EMPTY dataset, and the web service credentials are set to empty.
I use
myService.Credentials = System.Net.CredentialsCache.DefaultCredentials
Bothe is the virtual directory of the web service host, and the virtual directory of my application uses Windows authentication in IIS directory security.
Anyone have an idea ???