Re: asp.net and ldap



Hi Bryan,

Since the problem occurs when you turn back to impersonate=false which
cause the default ASPNET account to run the asp.net application which
haven't sufficient permission to qurey the remote AD, then it is ok that
you still use impersonate and grant the impersonated user the access
permission to the folder you want to write?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Bryan" <BryanZM@xxxxxxxxxxxxx>
| References: <#pg12s8sFHA.616@xxxxxxxxxxxxxxxxxxxx>
| Subject: Re: asp.net and ldap
| Date: Thu, 15 Sep 2005 11:31:55 -0700
| Lines: 55
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Response
| Message-ID: <upcPVQiuFHA.3500@xxxxxxxxxxxxxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 208.46.205.150
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:124916
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Ok, Now I have the same problem again with accessing active directory.
| Because i started using "impersonate = true" in the web.config
evertything
| worked fine, because the user it was impersonating has permission to
access
| AD or is a user. That worked well and fine, until i wanted to give write
| permissions to the aspnet account, so it could upload images to a folder.
| So by turning off impersonate = true, made it so ASPNET was the user
again
| and had write permissions, but - AD was no longer accessable to the
| application!!!!
|
| HELP!
| I need both to work!
| I also tried explicitly putting the user name into this class -
| System.DirectoryServices.DirectoryEntry entry = new
|
System.DirectoryServices.DirectoryEntry("LDAP://corp.companycom","company.co
m\myusername","mypassword");
|
| and get the same error again stating that server is not operational!
|
| What Shall I do???
|
| Thanks,
|
| Bryan
|
| "Bryan" <BryanZM@xxxxxxxxxxxxx> wrote in message
| news:%23pg12s8sFHA.616@xxxxxxxxxxxxxxxxxxxxxxx
| > Hello,
| > I have a asp.net app working with directory services on my Windows XP
| > development machine. However when I moved the application over to our
| > production server (Win 2000 Server) it no longer works.
| >
| > I use this code to try to connect to ldap:
| > System.DirectoryServices.DirectoryEntry entry = new
| >
System.DirectoryServices.DirectoryEntry(LDAP://corp.mydomain.com,user,pass);
| >
| > I tried using my user name and password, the domain admin user/pass but
| > keep on getting "the server is not operational" error. Now I know this
is
| > security related, but after a day and a half of trying to get it to
work
| > and searching google i cannot find out how to make it work!
| >
| > I even tried using ldp.exe on the webserver, it worked fine. I was able
to
| > connect right to the ldap no problem...
| >
| > Any and alll help is greatly appreciated!!!
| >
| > Thanks,
| >
| > Bryan
| >
| >
| >
| >
| >
| >
|
|
|

.



Relevant Pages

  • RE: CreateDirectory() - Could not find a part of the path "D:".
    ... we may do some check on permission. ... through passing full qualified path when you swtich the process identity ... and turn off impersonate). ... BTW, to get the physical path of the root dir of our ASP.NET application, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to read a file from a different drive on the same machine C# windows based application
    ... You do not have permission to read. ... You'll need to either impersonate the user accessing your ... I do not answer questions on behalf of my employer. ... programmer helping programmers. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: File Copy
    ... have permission with my current logon details to access. ... If I open the folder using the Windows file manager with the path "\\ ... If I enter valid details, ... Try using WindowsIdentity.Impersonate() to impersonate the user ...
    (microsoft.public.dotnet.languages.vc)
  • RE: security steps to allow webservice to run exe
    ... We cannot expect any windows form UI come from an ASP.NET application. ... Write permission to temp folder. ... you may try impersonate in ASP.NET: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: File Copy
    ... have permission with my current logon details to access. ... If I open the folder using the Windows file manager with the path "\\ ... If I enter valid details, ... Try using WindowsIdentity.Impersonate() to impersonate the user ...
    (microsoft.public.dotnet.languages.vc)