HighTechTalks DotNet Forums  

Problem with my Published web service

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Problem with my Published web service in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Wright
 
Posts: n/a

Default Problem with my Published web service - 08-17-2007 , 10:41 AM






I have created a web service that will validate a username/password
combination against LDAP. I encrypt the username/password, send it to my
web service which decrypts the username/password, validates the user against
LDAP and returns some properties about the user to the client. When I test
the application in Visual Studio the client runs just fine. When I deploy
the service to my Local IIS, none of the methods work. I suspect it has to
do with the IUSER account, but I am not sure. Does anyone have any idea
what to check for so this web service will run via IIS? I suspect I need to
run the web service via IIS. Since this was a test box, I gave my IUSER
account full admin rights to see if that helped, but I got the same result,
so I put the IUSER account's permissions back. I know the web service
works I have tested it, I just can't get it to work on IIS. Any
suggestions?

John



Reply With Quote
  #2  
Old   
John Wright
 
Posts: n/a

Default Re: Problem with my Published web service - 08-17-2007 , 10:45 AM






Here is the error I get:

System.Exception: Error Getting user information. --->
System.Runtime.InteropServices.COMException (0x80005000): Unknown error
(0x80005000) at System.DirectoryServices.DirectoryEntry.Bind(Boole an
throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at
System.DirectoryServices.DirectoryEntry.get_AdsObj ect() at
System.DirectoryServices.DirectorySearcher.FindAll (Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindAll () at
UserValidation.UserExists(String UserName, String Domain, String strDC) ---
End of inner exception stack trace --- at UserValidation.UserExists(String
UserName, String Domain, String strDC) at Service.CheckUserName(String
UserName, String Domain, String DC)


"John Wright" <riley_wrightx (AT) hotmail (DOT) com> wrote

Quote:
I have created a web service that will validate a username/password
combination against LDAP. I encrypt the username/password, send it to my
web service which decrypts the username/password, validates the user
against LDAP and returns some properties about the user to the client.
When I test the application in Visual Studio the client runs just fine.
When I deploy the service to my Local IIS, none of the methods work. I
suspect it has to do with the IUSER account, but I am not sure. Does
anyone have any idea what to check for so this web service will run via
IIS? I suspect I need to run the web service via IIS. Since this was a
test box, I gave my IUSER account full admin rights to see if that helped,
but I got the same result, so I put the IUSER account's permissions back.
I know the web service works I have tested it, I just can't get it to work
on IIS. Any suggestions?

John




Reply With Quote
  #3  
Old   
Erik Alsmyr
 
Posts: n/a

Default Re: Problem with my Published web service - 08-20-2007 , 10:29 AM



Our autneication method looks like below. AuthenticationTypes and
DirectoryEntry are both from the System.DirectoryServices namespace. We use
this against AD aswell as Samba and Novell without problems. You should
probably use FastBind as AuthenticationType.

The web service is run as the normal IUSER account. No other privileges
needed.

private void AuthenticateUser(string ldapPath, string username, string
password, AuthenticationTypes type)
{


if (traceSwitch.TraceVerbose)
{
Trace.WriteLine(string.Format("AuthenticateUser {0}.",
username), TraceCategory.Verbose);
}

try
{
using (DirectoryEntry entry = new DirectoryEntry(ldapPath,
username, password, type))
{
// Bind to the native to force authentication.
Object tmp = entry.NativeObject;
}


}
catch (Exception e)
{
if (traceSwitch.TraceError)
{
Trace.WriteLine(string.Format("AuthenticateUser failed
due to exception : {0}", e.Message), TraceCategory.Error);
}
throw;
}
if (traceSwitch.TraceVerbose)
{
Trace.WriteLine(string.Format("AuthenticateUser {0} executed
ok.", username), TraceCategory.Verbose);
}
}

"John Wright" <riley_wrightx (AT) hotmail (DOT) com> wrote

Quote:
Here is the error I get:

System.Exception: Error Getting user information. ---
System.Runtime.InteropServices.COMException (0x80005000): Unknown error
(0x80005000) at System.DirectoryServices.DirectoryEntry.Bind(Boole an
throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at
System.DirectoryServices.DirectoryEntry.get_AdsObj ect() at
System.DirectoryServices.DirectorySearcher.FindAll (Boolean
findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindAll ()
at UserValidation.UserExists(String UserName, String Domain, String
strDC) --- End of inner exception stack trace --- at
UserValidation.UserExists(String UserName, String Domain, String strDC) at
Service.CheckUserName(String UserName, String Domain, String DC)


"John Wright" <riley_wrightx (AT) hotmail (DOT) com> wrote in message
news:ueGapyN4HHA.3684 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have created a web service that will validate a username/password
combination against LDAP. I encrypt the username/password, send it to my
web service which decrypts the username/password, validates the user
against LDAP and returns some properties about the user to the client.
When I test the application in Visual Studio the client runs just fine.
When I deploy the service to my Local IIS, none of the methods work. I
suspect it has to do with the IUSER account, but I am not sure. Does
anyone have any idea what to check for so this web service will run via
IIS? I suspect I need to run the web service via IIS. Since this was a
test box, I gave my IUSER account full admin rights to see if that helped,
but I got the same result, so I put the IUSER account's permissions back.
I know the web service works I have tested it, I just can't get it to work
on IIS. Any suggestions?

John






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.