DirectoryEntry fails when Published on IIS

Hello! I have an web application that changes the user's password on Active Directory using the object DirectoryEntry. When I run the application on VisualStudio it works perfectly, but when I publish on IIS it doesn't work. But I don't have an error message or something like this, because the only error that occurs is that the method ( directoryEntry.Invoke("ChangePassword", new object[] { oldPassword, newPassword }); ) always goes to CATCH on the try catch. May someone help me, please?? There is a long time that I'm try to do this... Thanks!!! Phillipe.

0
phillipebarbosa
4/30/2009 4:17:06 PM
asp.net.security 27051 articles. 1 followers. Follow

2 Replies
1203 Views

Similar Articles

[PageSpeed] 52

 See this link for details - http://en.csharp-online.net/User_Management_with_Active_Directory—Managing_Passwords_for_Active_Directory_Users

 


Please remember to click “Mark as Answer” on the post if this answer helps you.

0
ajay
5/1/2009 2:17:37 AM

Hi,Philip

Change password in AD needs administration permission,so ,try shift application pool identity to Administrator account.

If you are using IIS 7. There are many ways to set the account which ASP.NET app will use. The easiest way is using IIS Manager(UI):

1. Click "Application Pools" in the left frame. choose the application pool you want to change the identity in the middle frame. then, in the most right frame. click Advanced Settings:

If you are using  IIS 6.0. Expand "ApplicationPool" note. choose app pool,and right click the app pool's properties. then, change the application pool account in "Identity" tab.

 Any thing not clear, please update here. 

Regards


Andrew Zhu
Microsoft online ASP.NET support
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
0
Andrew
5/5/2009 6:51:33 AM
Reply:

Similar Artilces:

Is there an MS IIS forum? IIS fails to start after installing security patch (MS08-006)
I can't find a specific IIS forum at MSDN. This issue isn't specifically related to ASP.NET or .NET.After I installed the recent security patches, my IIS cannot be started. I think MS08-006 is causing the problems, but I'm unable to confirm this right now. The error in the event log is "“The IIS Admin service terminated with service-specific error 2147549183 (0×8000FFFF).”SC Query returns this:C:\>sc query IISAdminSERVICE_NAME: IISAdmin TYPE : 20 WIN32_SHARE_PROCESS STATE : 1 STOPPED (NOT_STOPPABLE,NOT_P...

Installed .net 1.1 and iis, .net stuff not being recognized in iis
I installed iis and then .net 1.1, my problem is when I run my web site in iis, all I get is text values. I went into iis and to my website and hit properties and click on configuration, the .net stuff is not present. under extensions all I see ..asa ..asp ..cdx ..cer ..idc ..shtm ..shtml ..stm No .aspx? Anyone know what I must do? you need to do the regiis.exe trick. give me a couple of minutes and I'll find a relevant thread for you.... http://beta.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20428406.htmlRTFM - straight talk...

IIS windows intergrated security and .NET access
One thing I've really wanted w/ windows passthrough auth is for the authenticated user object to be available to .NET w/o IIS making a decision to accept or deny. In other words, I want the web request to undergo the challenge/response by IIS, but the for IIS to hand that result over to .NET to manage if desired. This would allow .NET to programmatically determine what to do should the challenge/response fail, and also allow it to make a decision about users who come from certain domains as opposed to others -- those in domain get higher rights than those w/o, for example In order to ...

Publishing issue- publish failed
Hi all,I am trying to publish my Web Appication Project to staging server using VPN, but every time I try to publish the project, I get this errorUnable to create the Web '\\devServ\WebProject\Project'.  The path '\\devServ\WebProject\Project' does not exist or you do not have access. The filename, directory name, or volume label syntax is incorrect.I am totally lost in this issue, not getting any other clues... please help.  .NET-ifiedArpit KhandelwalPlease: Don't forget to click "Mark as Answer" on the post that helped you.That way future readers wil...

how to publish cs.net app for local IIS?
I have an app setup in My documents/VS2005. I can see it in browser from VS2005. When browser is up I see it is using port 2110 or 2376. I want to "publish" it on my local IIS (and later create a copy on a production webserver). I created a folder in c:\inetpub\wwwroot, In IIS management console I created application in that folder, it is setup as an asp.net 2.0 CS application, but when I try to open it from browser via URLlocalhost/folder-name/file-nameI am gettingServer Application Unavailable The web application you are attempting to access on this web server is currently ...

Accessing IIS integrated security website from .NET application?
So I have an application on webserver1 using FORMS authentication (allows anonymous access to login page so running under ASPNET account). In this application there are links to a website on webserver2 that does not allow anonymous access and requires windows integrated security. So basically when you click on a link from the application to webserver2 an authentication popup window appears.  What I'd like to do is pass the authentication information from my application (on webserver1) to webserver2 so that the page I'm calling (via a simply linkbutton) does not produce an ...

VS2008 Fails to Publish and removes security/sharing from subfolders
I've been using VS2005 for a few years now with almost no problems.  I have multiple development sites on Server2003, IIS6.  I publish those to the "live" sites on the same server, different folder.  As I said, been doing that successfully with no problems on a weekly basis for a few years. I upgraded to VS2008 this week in order to start playing with Ajax.  Have a small, simple Intranet site, so I decided to start with it.  Took the development site, upgraded it to VS2008, made minor text changes.  I'm able to access, view, interact with...

Visual Studio (.NET 2003) fails to open WebApplications after restarting IIS
Hi:I had to stop my IIS for a few hours. When I restarted it and tried to open a web application in visual studio, the IDE went into a terminal state < Contacting Server to open web project "WebApplicationDoesNotOpens"... >. I had to end the hung IDE using task manager. This happens everytime I restart my IIS :(, and I am tired of restarting the web server, sometimes I even have to re-install IIS and go through the entire process ending with registering asp with aspnet_regiis. Its tiresome :(...Thoughts? Any advice would be appreciated...Thanks in advance!kremlins Hi, &nbs...

.net 2.0 Security Web.Config problem (possible IIS issue?)
I have a website I developed using asp.net (vb) that has a protected content sections, users and roles.  The established roles are 'Admin', 'Customer', and 'Employee' The protected directories are the /admin, /employee, and /customer respectively.  User's assigned to the 'Admin' role should be granted access to all three sections.  User's with the 'Employee' role should only be granted access to the /employee section, and user's with the 'Customer' role should only be allowed to access the /customer directory.  ...

c# .net web service deployment
Hi all, I've written a web service in C# ..NET and i have deployed this project by including windows installer web project. Everything runs fine on the remote machine but i wanted to know how i could include in the setup a way to change the IIS directory security settings to anonymous access. Currently i'm setting up the project and then manually changing the settings. I've read stuff on the web about  how you can write custom action scripts to do this but i cannot find a good example of one - in fact the information i've found so far has been less than useless. Any he...

Publish fails if publishing to an existing folder
Hello,  I am kind of concerned with the way I publish my asp.net project. If I publish to a brand new folder, it succeeds; if I publish to an existing folder, it updates the changed files correctly, but it would give me a "publish failed" message in the end. So what's going on here?   Thank you,  Haoest  Debugger is my best friend. (http://haoest.info) Try click on the error message, i think it should tell you more details.BruceDiscountASP.NET: Developer Ready ASP.NET Web Hosting- Microsoft Gold Certified Partner- Voted 2008, 2007, 2006 & 2005 Best ASP.NET Web...

Confusing IIS 7 security question on Exam 70-643 (.NET Trust levels)
Hi all, I am studying for 70-643 (Server 08 Apps Infrastructure) and have been consistently missing questions regarding .NET Trust Levels.  Here is an example question: ********************************************************** You are configuring a Windows Server 2008 IIS installation to support a new ASP.NET application. The developers of the application have specified that the code must have permissions to perform the following tasks: * Read several configuration files that are located outside of the Web application's directory* Read initialization settings from the Windows Re...

failed to view web application after publishing crystal reports to web using VS.Net 2005
for publishing crystal reports to web using VS.Net 2005, I followed everthing and completed everything successfully as mentioned in this link - http://techisolutions.blogspot.com/2007/11/publishing-crystal-reports-to-web-using.html I somehow figure out how to  view my web application , i used this url - http://mysrv/WebSetup1/default.aspx  But when i hit enter I get this message - The page cannot be found Please help....looks like i am soo close but not sure .....please advise. Thanks. Hi, Please refer to your another post: http://forums.asp.net/t/1317004.aspx   Th...

.Net Framework Code Access Security
I built a c# .Net 2.0 based user control that I run as an ActiveX control in IE7.  It works fine except for code access security issues ("Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, ......' failed).  To get around the code access security issues, I created a code group within the Machine All_Code group with the Publisher membership conditions based on a valid certificate (which my assembly has) and granted that code group the "Everything" permission set.  Even though my code group is m...

Web resources about - DirectoryEntry fails when Published on IIS - asp.net.security

Island Directory Field List
COUNTRY FIELDS NOTE: In numerical fields, a zero often indicatesthat an accurate figure is not available, not that the value is zero. C1. COUNTRY ...

DOMFileSystem.cpp
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, ...

Pepper C++ API Reference (Dev) - Google Chrome
Skip to main content Devtools Learn Basics Overview Development Workflow Using the Console Tips & Tricks Additional Resources Videos Blog Posts ...

Code - gitlabhq/grit - Code Climate
100% free for Open Source, forever. Get another set of eyes on your code. Code Climate / gitlabhq/grit Login Sign Up with GitHub Pricing Tour ...

Gerry Heidenreich
... with Active Directory in ASP.Net. Turns out I needed to fully qualify my AD access username with the domain name. When composing a DirectoryEntry([Domain], ...

Integrating input[type="file"] with the Filesystem API
A resource for developers looking to put HTML5 to use today, including information on specific features and when to use them in your apps.

Why is the file size reported incorrectly for files that are still being written to?
Attached please find a sample program which continuouslywrites data to a file.If you open the folder containing the file in Explorer, you can ...

SetPassword over domain trust fails – COMException 0×8007202
... .NET method for setting passwords in an AD environment over LDAP. When the ASP.NET application specifies Bob’s username/password in the DirectoryEntry ...

Search Engine Comparison Poll: The Results
Six days ago, I posted a poll that asked you to evaluate the quality of the first results from Google, Yahoo, Windows Live. You had to enter ...

Thoughts & Articles on ASP.net, C#, Software Development and Technology by Yaakov Ellis - Ellis Web Development ...
... , C#. I had code that did the following (actual code has a bunch of reusable methods for doing things like loading up UserPrincipal and DirectoryEntry ...

Resources last updated: 12/17/2015 5:00:08 PM