Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security and Web Services

Status
Not open for further replies.

Diodin

Programmer
May 8, 2001
29
NL
Hello,

I'm building an application to access a database through the intranet. I need a n-tier application so I wanted to use web services. The data trail is webpage->web service->DLL->SQL Database. Here is the problem:

I have a database server (SQl 2000) and a webserver (Win2K server & IIS 5) with the .Net framework installed. When I build an web application without a web service I get the data from the database. When I build a web service and directly open the webservice in IE6 I get the data from the database. But when I use a webpage that calls the webservice then the access to the database is denied. The problem is that the authentication isn't forwarded.
Impersonation is set to true in the machine configuration, I tried Kerberos authentication and even certificates, but nothing helps. I'm running out of ideas.
There must be a simple way to get this to work.

Arjan Meskers
Winthesis B.V.
The Netherlands
 
I found the solution:

1. Set impersonate (in the machine.config file) to true
2. Set the nextline to your WebService:
ws.Credentials = System.Net.CredentialCache.DefaultCredentials
3. Set delegation true for all machines on the domain controller.

Arjan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top