.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

AD Suggestion Needed

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

In my application, there are different roles i.e.. Manager, Admin,etc... All are having groups except Manager.

Now there is a problem how to distinguish managers and user

My Requirement:


There is a Request form which needs to be approved by the manager (there is no group for manager) and requested user will select any user present in the AD Users as a manager.

When ever users login in to application, First i need to check whether login user has any request to approve(as a role of manager) or normal user(user submiting for a request)

If he has Request to approve, i will need to give two options Login ManageraAprroveror User Requests

How can achieve this task that need to keep track who is manager and user

View Complete Post

More Related Resource Links

Response.BinaryWrite help needed


Hi all

Im new to .NET and stuck now, so i hope anyone can help my with my problem.

I have a MS SQL database where i have stored some documents as Binary data. I cant figure out how to retrieve them and show/download them in my browser.

I found some guides online and have try to put something together.


private void Write()
 int id = 0;
 string strID = Request.QueryString["id"];
 int.TryParse(strID, out id);

 var db = new ModelDataContext();
 var doc = db.DocumentDatas.Where(x => x.ID == id).FirstOrDefault();

 byte[] byteArray = File.ReadAllBytes(doc);


How do i fill the byteArray with the data?

Thanks in advance :)


Run Button Behavior: Suggestion/Bug


Note: This could be a bug or considered as suggestion. I am not looking for solution.

1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.

RSS implementation code - need suggestion


Please suggest what is the best approach of coding for RSS implementation,


Implementation 1:

a) Add custom handler in web.config for .rss type

b) Create a handler class (RSSHandler.cs) in APP_Code

c) Create a Sample.rss file

d) Browse Sample.rss in browser

 Technical Solution:Utility Classes:I)                   

help needed: Ldap User authentication using userDN and password



Is it possible to authenticate a user using userDN and password? If so, then tell me the syntax.So far i have tried to authenticate using username and password from my c# code using directoryentry which takes the parameters like domainname,username and password. But i need to authenticate using Userdn and password.

helped needed: ASP LDAP authentication failed in IE 8


I use the following code to do the user authentication through Active Directory using LDAP.

entry = new DirectoryEntry("LDAP://" + server, user_name, password);
if (!string.IsNullOrEmpty(entry.Name))
EmployeeNetId = entry.Username.Substring(0, 3);

// Retrieve EmployeeId, and Employee Full Name
EmployeeId = -1;

It works for Chrome, Firefox with no problem. But with IE 8, it works sometimes, and failed on some computers. When it failed, I figured that I need to check SSL 2.0 in IE 8 Internet Options.  It's weird because in those computers that IE 8 works, SSL 2.0 is also unchecked.

Am I using some deprecated method? Or How do I specifiy the SSL version options in the LDAP connection?

Help needed in selecting coulmns from 2 tables using entity framework


Hi all,

I have two tabels as mentioned below. I am using entity framework and vs2010.I am not able to write linq query to get data from both the tables. there is one to many relationship(for one category ther can be multiple articles). Please help me out as this is very urgent. Thanks in advance.

1) Article

ArticleID bigint Unchecked
CategoryID int Unchecked
ArticleName varchar(500) Unchecked
ArticleDesc nchar(1024) Unchecked

Is the REST Starter Kit still needed with WCF 4?


The REST Starter Kit was targeted at WCF 3.5. I am wondering if it is still needed with WCF 4?

WCF over mobile modem link - performance help needed

I am looking for ways to improve the performance of my WCF communications over a mobile modem. I have a system where the clients are connected to the internet via a mobile (GPRS/3G/HSDPA) connection. This is NOT a windows mobile client, it is a full XP Professional system running .Net4.0. The clients basically use a USB mobile modem (SIM card etc) to get their internet connection. The server is connected directly to the internet via broadband. My WCF interface has 2 main methods, one sends 2 int values from the client to the server and the other sends 3 images (JPGs) to the server. As you can see one is going to take less than a second and the other is going to take maybe 30-60 seconds depending on the images size and connection speed. If we have a good mobile modem connection to the internet then everything works perfectly. The problem I have is a lot of the time I do not have a good connection. The timeout on the WCF binding is set to 120 seconds. This gives the images enough time to get across even if the connection is a bit slow.  The problem comes when the connection stops - this is a network (mobile network) problem, something like the signal drops etc. Communications never recovers. At this point after about 10 seconds of inactivity (no communications) I know that the connection will never recover. At this point the best thing I have found to do it res

Stand alone server into Cluster Server...recomandations and Suggestion

Hi all I have Stand alone server(SQL Server 2000) on Win2k3(SP2). Now I want make as Cluster server. way I am thinking 1.I have create fresh Cluster Environment and move the Databases 2.Arrange SAN drive and move all Databases(Data files/Log files) to SAN drive and Add one more Node and Create Cluster. I am realy new cluster some body help me the Direction to move Standalone to Clusteer.   Thanks in AdvanceSNIVAS

SQL Server 2005 Log Shipping and subsequent FULL backups that are needed

Afternoon,   I have a few Log Shipped DBs that are working great.   Currently they are set to fire off every 15 minutes 24/7.   My question is this ... I need to get FULL backups of the source DBs in order to restore them on certain Dev boxes.   If I were to execute the full backup on one of these Log Shipped DBs ... how would it affect the log shipping process?   Is there a special method to accomplish this?   As a side note, what would be some concerns/issues if in being able to create the FULL backups and not interupt log shipping, I were to create the backup using a 3rd party tool like Quest LiteSpeed?   I sure wish we were on Enterprise, then I could create a mirror and then snapshot off it to create my backups BUT ... that is not the case as we stand today.   Thanks

Remove items from a list literally not working as needed

This is why SharePoint drives me insane.  Everything I have been able to find on the web says I *can* programmatically remove list items from a list, all I have to do is a declining loop.  I have even copied verbatium several code examples found in this forum and on the web and every last one of them gives me a "Collection was modified; enumeration operation may not execute." error in the Event log.  This is a C# Windows Form Application we want to use to remove a common announcement from any announcement list in our entire site (top down).  We can *add* it to every announcement list without issue (seperate code).  Can anyone point out to us the error in our code below? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.SharePoint; using System.Text; using System.Reflection; using System.IO; using System.Diagnostics; using System.Xml; namespace RemoveAnnouncement { public partial class RAForm : Form { public RAForm() { InitializeComponent(); } private void removeAnnouncment_Click(object sender, EventArgs e) { const string a = "Application"; try { if (tlsURL.Text.ToString() == "http://" || tlsURL.Text.ToString() == &qu

Wanted to know if windows 7 pro is needed to install sharepoint 2010? or it is better to do vmware a

Wanted to know if windows 7 pro is needed to install sharepoint 2010? or it is better to do vmware and then do virtual sharepoint 2010 development environment?

urgent help needed regarding transactional replication2005

urgent help needed regarding transactional replication2005   I did set up transactional replication on sql 2005 and also in article properties have selected to replicate foreign keys,default constraints and indexes. I checked the schema properties at publisher and subscriber and found that on one table a foreign key is not replicated which has an on delete cascade. I am not sure why is not replicating that constraint.The other table has a foreign key which is also not replicated.   I would appreciate all your help. thanks, Satya

Need suggestion on table creation

Hi All    I want to create a DB in production server. In the DB 5 tables will consists lakhs of records.    We are using SQL Server 2005 Enterprise Edition    To produce the better performance i want to create 5 Data Files for 5 tables.Is my approach is    right or wrong.    Waiting  for valuable replies.

Resore suggestion

Hi all I have  fullbackup at 5:00PM yesterday and Transactinal log every 30min (24 hours),I took Diff backup   7:00PM yester day and Diff backup 4:00 AM today. My  Transactional backup running every 30 min, If any faulure what steps i have to take... Please correct me  if I am wrong 1.Restore Fullbackup(Yester day) with no recovery 2.Restore latest Differancial backup with no recovery 3.Restore all trasactional backups 4:30 with no recovery onwards.... and restore last trasactional backup with with rcovery it is creect scenario ??..please help me.. Thanks in Advance  SNIVAS

Help needed generating filenames

I have a sorted array of files saved in the following format of filenames: XXX XXX_XX XXX_XX_XX I want to insert a new file (with a unique filename) between two given filenames (which could be in any of the 3 formats above). For eg., a new file between 401 and 403 could be inserted with name 402 and a new file between 401_01 and 401_02 could be inserted with name 401_01_01. etc The idea is to conform to the sorted list. Is there a way I could generate filenames for the files to be inserted, given the two filenames between which it needs to be inserted? Please help. PS: would it be helpful to use regex?

Need suggestion's and guidelines for designing and creating WCF client channel pool

  What factor's should be considered for creating a WCF client channel pool? 1)Whether it is advisable to create a pool of pre-opened channel's?or create a new channel as an when needed?which one is expensive operation? 2)what should be the pool size? 3)how pool will support if concurrent request's are coming which use different binding's? 4)what should be channel lifetime? 5)If all the connection's in the pool are busy,whether we should wait till the free channel's are available in the pool or create new one's which is expensive?which one is better? if anybody is able to provide some usefull links it will be helpfull.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend