|
|
DirectoryEntry searchRoot = new DirectoryEntry
DirectorySearcher search = new DirectorySearcher();
ArrayList allUsers = new ArrayList();
DirectorySearcher search = new DirectorySearcher(searchRoot);
search.CacheResults = true;
search.Filter = "(&(objectClass=user)(objectClass=person))";
search.PropertiesToLoad.Add("samaccountname");
search.PropertiesToLoad.Add("displayname");
SearchResult result;
SearchResultCollection resultCol = search.FindAll();
I used the above code to retrive active directory usernames and loginIds .Its working fine from local machine but not working from remote machine.
It is giving the erroe"An operations error occurred "
If any one has a solution for this please help me
Prajin
|
|
|
|
|
I am working in a project for an intranet network, but the users have to provide username and password to enter into the application.
1) Is Windows authentication the best suited for this?
2) Can Membership.validateuser() method be used with this?
3) If so, how can I use the alternate code
for 'FormAuthentication.RedirectFromLoginPage(...)'?
Please help me with an answer. Thank you.
|
|
|
|
|
If you want that the users have to enter username and password then Windows authentication is not the right choice. You would use Windows authentication to allow access to the web application by using the login information of the host system.
I'd suggest to use Forms authentication to force an explicit login.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Thank you for the reply.
But, using Windows authentication and using a table in a custom database to check the users credentials to enter this particular application. Is that a bad solution?
|
|
|
|
|
Surely not a bad solution, bad if you want that the users have to explicitly log in on a login form then I'd still suggest Forms authentication.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Got one more doubt. If we are using Forms authentication cookies will have to be used. In an intranet environment is that common?
In windows authentication do we use cookies at any place? atleast in using roles?
Thanks a lot for the help
|
|
|
|
|
Yes it is true that normally Cookies are required to run Forms authetication. Forms authentication can be run cookieless but I would not suggest this (the sessionkey is integrated into the URL).
I cannot tell you whether using cookies on the target intranet is an issue. I would say no but I don't know the restrictions on that Intranet.
Regards
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
The problem is based on intranet based application.
i was connecting the sql server 2000 with asp.net vb.net 2005.
There was no problem in connecting the (front end - back end ) at the server machine.
The problem arises , when the tries to connect the front end with the back end at the client end machine.
|
|
|
|
|
what problem did you get wile connecting to the database from the client machine
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Its possible to tell datagrid columns visible false in java script...,
If yes plz tell me how to do that one...,
How to mention the following codes in javascript...,
dgrdmain.Columns(0).Visible = False
dgrdmain.Columns(1).Visible = False
Advance thanks,
Magi
|
|
|
|
|
If any one knows Excel export using XML Templates from dataset or 2 dimesional array, Please help me on this
|
|
|
|
|
What exactly is your question?
We used an Excel XML template that was filled with a XSLT with data from XML data from a DataSet.
XML Data and Excel XML Template are inputs to the XSL transformation that generates the Excel XML File.
Maybe this link will help you: http://www.bbv.ch/pdf_files/system_event/2005_XMLto%20Excel.pdf
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Sorry to confuse you, Thanks for your help. I saw the link.
I would appreciate if you send me some code snipet on this
Thanks in advance
|
|
|
|
|
Sorry, I can't send you Code about this
But I hope you get the idea from the presentation.
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Its ok .
Thank you very much for your help.
|
|
|
|
|
Hi All,
I would like to know that is there any sample or help where in i can edit the treeview. like go and add,delete, modify directly inside treeview?
Any suggestions or help on this?
Thanks and Regards,
Biju S
|
|
|
|
|
Hi, i have problem with ASP.NET Send email, i used in my local machine it work preperly, but when i upload to the server i got an error "Could not access 'CDO.Message' object"
ASP.NET is Enalbled
Socheat
|
|
|
|
|
If you are using SmtpMail.SmtpServer, make sure Anonymous access is allowd. To allow access, open up the IIS Admin MMC. Locate the SMTP Virtual Server, and right-click, then select Properties. On the Access tab, click the Authentication button. Be sure "Anonymous Access" is the only checkbox checked. Close down all dialogs, and restart the SMTP Service.
Hope this will solve your problem.
Regards,
Satips.
|
|
|
|
|
It not my own server, how can change it
Socheat
|
|
|
|
|
Did you see that Norton is blocking in the server.
Regards,
Satips.
|
|
|
|
|
What do you mean? Do you any solution for me?
Socheat
|
|
|
|
|
It turns out that if you install any of the Exchange stuff, it installs the CDOEX.dll. Well, apparently, this dll is now used for all of the CDO.Message stuff from the COM side of things, and overwrites the CDOSYS.dll. Unfortunately, .NET is bound to the CDOSYS.dll, so it blows up when you try to send a message. The trick is to unregister the CDOEX.dll and register the CDOSYS.dll using regver32.exe.
Here is a translated article discussing this in detail.
Get it[^]
Remember, always use caution when mucking with the registry.
Regards,
Satips.
|
|
|
|
|
Its giving me an access error on the documents folder where I am trying to upload my files. (again, I am able to upload from my local website to this webserver just fine. through the server URL it gives this error)
I tried granting Read Write permission on the docs as well as iddocs. Please let me know if I missing some configurations.
I added ASPNet account to the folder where I am trying to store the files. I set permissions to full for ASPNet account on the docs/iddocs folder, gave full permission to ASPnet account on my web application, also on wwwroot. I checked that web,config for my web application has the tag
<identity impersonate="true"> Still no luck. I get the same error.
Appreciate your help.
Regards,
Rekha.
Server Error in '/webforms/ids' Application.
--------------------------------------------------------------------------------
Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 75: {
Line 76: SummaryFilepath.Text = ServerDocLocation + SummaryFileName;
Line 77: Summary_Attachment.SaveAs(ServerDocLocation + Summary_Attachment.FileName);
Line 78: }
Line 79: else
Source File: c:\Inetpub\wwwroot\webforms\ids\IDForm.aspx Line: 77
Stack Trace:
[UnauthorizedAccessException: Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014179
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
ASP.idform_aspx.Wizard1_NextButtonClick(Object sender, WizardNavigationEventArgs e) in c:\Inetpub\wwwroot\webforms\ids\IDForm.aspx:77
System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|
|
|
|
|
RDayalu wrote: System.UnauthorizedAccessException:
An UnauthorizedAccessException exception is thrown when the operating system denies access because of an I/O error or a security error.
Make sure you have sufficient privileges to access this resource.
If you are attempting to access a file or registry key, make sure it is not read-only.
Hope this will solve your problem.
Regards,
Satips.
|
|
|
|