Web application running on VS Development Server but not running on IIS

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 ???

+3
3

, . , , .

SP, . , Views SP , Windows .

0

IIS , asp.net .
, asp.net windowsauthenification. , ? Page_Onload. ( , ) this.User.Identity.Name , Windows.

+1

in IIS Manager. Click "Web Site" → "Properties" and select "Directory Security." Then “Anonymous Access” and “Authnatication Control,” then select “Windows Integrated” to allow Windows domain users. To access the website

0
source

Source: https://habr.com/ru/post/1753258/


All Articles