DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 17 Aug 2007 08:41:11 -0600,    posted on: microsoft.public.dotnet.framework.aspnet.webservices        back       

Thread Index
  1    John Wright
          2    John Wright
          3    Erik Alsmyr


Problem with my Published web service   
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
Date:Fri, 17 Aug 2007 08:41:11 -0600   Author:  

Re: Problem with my Published web service   
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(Boolean 
throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at 
System.DirectoryServices.DirectoryEntry.get_AdsObject() 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"  wrote in message 
news:ueGapyN4HHA.3684@TK2MSFTNGP02.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
> 
Date:Fri, 17 Aug 2007 08:45:06 -0600   Author:  

Re: Problem with my Published web service   
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"  wrote in message 
news:eONN10N4HHA.484@TK2MSFTNGP06.phx.gbl...

> 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(Boolean 
> throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at 
> System.DirectoryServices.DirectoryEntry.get_AdsObject() 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"  wrote in message 
> news:ueGapyN4HHA.3684@TK2MSFTNGP02.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
>>
>
> 
Date:Mon, 20 Aug 2007 16:29:55 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us