.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

webdav xmlhttprequest to query current users exchange mailbox items

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :SharePoint

I would like to use xmlhttp request to display the current users unread email count in a webpart.  I can get this to work if the user enters their username & pw, but I'm not able to get any pass-thru credentials to work.  How can we set this up to pass through the current user's credentials.  We tried to set the sharepoint wfe with kerberos trusted delegation, but this doesn't seem to work.

We do not want to create an account with full access to all private mailboxes.

View Complete Post

More Related Resource Links

Content Query WebPart shows page items with status "draft", and page items that current user does no



I have this issue that CQWP is rendring items that it should not render. I test this with a read-only user, that should NOT see draft pages or pages with different permissions. But the read-only user do see the items, but when I click on the link I get access denied. This access denied is correct, but why does the page items appear in the CQWP at all?


1) I use OOTB CQWP (inherits from ContentByQueryWebPart in my .webpart file) : "<type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart ....." and I have my custom xsl to get the look and feel I need

2) The issue with page items showing when status = drafts only appear when using the PublishingExpirationDate field. When I try creating new pages and give them status draft by using "check in to share draft" (logged on as an contributer/approver user), this item wil NOT appear in the CQWP for the read-only user. When I change a pages' status from approved to draft, this item will still be shown in the CQWP, but this will point correctly to the published version. But after the pages' expired date (PublishingExpirationDate) is expired, the page gets status "draft" (handeled by a timer job I guess), and this page item will still be rendered in the CQWP, but sending the read-only user to an access-

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Users getting logged out because HttpContext.Current is null


We've  been trying to fix this one for a couple years, and I'm just out of ideas, so any help is really appreciated!

We've got a fairly large, complex web application that uses Forms Authentication to authenticate users.  Throughout the application we store and retrieve information about users in the Session object, and in some cases in cookies.  In a couple places we check for the existence of the context, and if it's null we send the user back to the login page to re-establish the session. 

Just a quick run-down of this web app: C#, .NET 3.5, IIS 6, ASP.NET State Service to manage session

As for the session timer, we use our own home-grown timer, which is basically a client-side timer, which is backed up by a check to the SQL database to see when their last activity was.  This seems to work well for us.  It's not perfect, but it allows us to notify the user before the session times out, and allows us to be certain we're not logging a user out before their 60 minutes of inactivity is up.

What's happening is that certain users are being logged out after just a few minutes.  We've eliminated the timer as a cause and believe what's happening is the HttpContext.Current is null, so the user is logged out.  We do not know why the HttpContext.Current is null, and I underst

Creating a gridview to allow editing of current users


I finally got membership and roles setup and seems to be working.

I have setup a page to allow the creation of a user and editing of roles for a user.

I would like to setup a page with a gridview that displays all users and what roles they are assigned. I remember running across someone else that was looking to do the same thing, but cant find it. Not sure if it was in this forum or online somewhere else.

But i found that i can use the  aspnet_Membership_GetAllUsers procedure in my db to get all the users, but how can i add the roles to each person and possibly setup the gridview so that each role they have, is displayed on their row in the gridview

So i would like to see something like this maybe more data displayed depending on the client request.

Username                 Email                 Last Login                          Roles

meofcourse               m

Any way to execute a workflow when a caml query returns zero items?

Lets say I have a list with a status column and I want to execute a workflow when all items in the list have a status of complete. I basically want to execute a workflow when the caml query looking for non-complete statuses returns zero rows. Can I do this with SPD or are there any 3rd party tools for this? I'm thinking of writing one if there are not.

Exchange Server 2007 SP1 mailbox migration into 2010

Hi Everyone, I’ve got all in one Exchange Server 2007 SP1 RU3 that got all in one role installed (HT-CAS-MBx) in Windows Server 2003 Standard R2 SP which is also running as domain controller with all FSMO role. I’m planning to migrate the Exchange Server 2007 server role into the Exchange Server 2010 Standard that I have prepared in my Virtual Machine of Windows Server 2008 R2, what is the safest migration path to make the email flow working end to end parallel (staging migration process). [B](please also not that this Exchange Server 2007 SP1 got so many problem like – OOF email error in Outlook 2007, meeting scheduler stopped working, etc… therefore updating it into SP3 is not the way here and I've backed up the mailbox using Backup Exec 2010 in case i can just restore the backed up mailbox into the new server 2010 if possible)[/B] My this is what I’m about to do: 1. Transfer all FSMO role into another domain controllers 2. Install and configure similar role in the new VM (Exchange Server 2010 Std.) 3. Confused… Things to do after all mailbox migration: 1. Cutover the MX record into the new server name 2. Install updated UCC- SSL certificate into the exchange server 2007 Any kind of help and suggestion would be greatly appreciated. Thanks, AWT /* Infrastructure Support Engineer */

CSS - formatting block list items for the current page

I have a sidebar containing an un-ordered list (menu). Each list item is contained in a light grey block when the user hovers over it with the mouse. However I would also like the block to stay grey for the current page that the user is on. HTML <div id="sidebar"> <ul> <li><a href="../001.aspx">001</a></li> <li><a href="../002.aspx">002</a></li> <li><a href="../003.aspx">003</a></li> <li><a href="../004.aspx">004</a></li> <li><a href="../005.aspx">005</a></li> </ul> </div> <!-- end #sidebar --> CSS/* Sidebar */ #sidebar { float: left; width: 15%; padding: 10px 0px 0px 40px; } #sidebar ul { margin: 0; padding: 0px; list-style: none; line-height: 0px; } #sidebar li { font-size: 11px; line-height: 280%; text-transform: uppercase; letter-spacing: 2px; font-weight: normal; } #sidebar a { display: block; } #sidebar a:hover { text-decoration: none; font-weight: normal; color: #7584BD; background: #F2F2F2 } Very simple really, and used everywhere. I have been looking at free CSS examples to try and solve this problem, but the only so

Content Query Web Part (CQWP) fails to show picture items from a document/picture library in an anon

I have a Picture Library and am trying to use the CQWP to display a list of items in the library.  The web part shows the items fine in authenticated mode, but it fails to show the items to anonymous users. The error log message is: Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.SetDocumentIconUrlAndOnClickString(SPWeb web, DataRow row, String strDefaultItemOpen, Boolean fSetDocIcon, Boolean fSetOnClick, String fileRefColumnRef, String progIdColumnRef, String fsobjTypeColumnRef, String permMaskColumnRef)     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.PreProcessForDocumentIconAndOnClickAttribute()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.AddContentQueryData()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String viewPath)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform) I'm running SP 2010.  I've tried various scenarios including: 1. Using the default publishing template. 2. Using the blank site template with publishing and lock down features enabled. 3. Us

How to properly configure permissions so users can view, add, edit, and delete list items, but not w

I am trying to figure out how to properly setup security so that it can be configured at the top-level, and then inherited all the way through. Here is what I would like to do: Each user can view, add, edit, and delete list items - but, users cannot modify or delete web part pages. The only way I know how to do this is set Contribute from the top-down, and then go into each Site Pages library and set Read access. The problem is that I have 100 sites, and I was hoping there was a way I could set security at the top, and inherit downward. Rather than having to go into all 100 Site Pages library and set Read access. Is there a way to do this? Thanks in advance.

In a group calendar, can items be made visiable to all users by default without adding them as atten

Well the title says it all really. We have a functioning sp 2010 site, setup this weekend, that's working great so far.  Primarily its being used for the company manual and procedures (a wiki site).  Search is working well and so on. I added a calendar with the intention of showing key company activities, plus holiday information and who's out at meetings.  We're a small company and this is unlikely to get ridiculously except on exceptional days. As it stands, when i create an item (for example someone out for a weeks holiday) unless another user adds one of the 'attendees' of the holiday event to the calendar it doesn't show up.  If I add all users as attendees then they can all see it by default. However, if I show that our chairman is attending a meeting at a client, then I can't explicitly say that the chairman is an attendee because for everyone to see it, they have to be attendees as well. I nsoed around a little and thought target audiences might be the way to go.  I configured all users and manager relationships, compiled the audience (it shows the right number of users).  However, if I setup a meeting with the chairman as an attendee, and the whole company audience as the target audience, then people still can't see it. Back to square one. So, is there an actual answer to this?  A different type of calendar, a query that

SPView query to find if the current user belongs to a Group


HI All,

I´m trying to write a query for a list view that should return all items if the current user belong to a group. If the user doesn´t belongs to this group, no items should be returned.

So far, I could find many equal examples about using the CAML Membership element in a comparison with an AssignetTo field. But not making a comparison between the current user and a specific Sharepoint Group.

Any suggestions, please?


load users records in infopath fields without using "run the query" button



is it posible to instead of clicking the "run the query" button to load the users records in the fields that the fields load automatically.

can this only be done with a role and a "set a value's field" action? 

SSIS SharePoint List Adapter - how to query Users & Groups?


I am using SSIS SharePoint List Adapter to load data in and out of my SharePoint Lists from within SSIS, and most of it is working fine.  However, I need to perform a lookup against the Users & Groups collection in SharePoint so I can retrieve the UserID and set the value when writing back to SharePoint.  Any help would be tremendously appreciated!


query to get Items from sub folders in a document library




i am having a document library  MY LIBRARY with SUB Folders SUB 1, SUB 2,SUB 3 ,SUB 4


i need to retreive documents in SUB 1, SUB 2 only

How can i write CAML query for this?

If need to retreive from one sub folder, i am using


qry.Folder = list.ParentWeb.GetFolder("MY LIBRARY /SUB 1");


Thanks and Regards,




How to query private Tags of Current User?


Hello. I need to query current logged user private tags.

I want to show a links.


I'm using the following code:


using (SPSite site = new SPSite(@"http://dev2:27397/"))
        using (SPWeb web = site.OpenWeb())
          SPServiceContext serviceContext = SPServiceContext.GetContext(site);
          SocialTagManager tagManager = new SocialTagManager(serviceContext);
          UserProfileManager userManager = new UserProfileManager(serviceContext, true);
          SPUser user = web.CurrentUser;
          UserProfile userProfile = userManager.GetUserProfile(user.LoginName);

          var allTags = tagManager.GetTags(new Uri("http://dev2:27397/Lists/TaskList/..."));
          var onlyOpenTags = tagManager.GetTags(userProfile);                   


Here I can get private tags for specific url and public for user.


But how to get private and public tags for current User?



MDX query for current


Hello guys,


I am currently browsing a cube with MDX using this query

select [Measures].[LOAN] on columns,[Dim Period].[PERIOD].[PERIOD KEY].&[201001] on rows from skyebank_financial_cube

The above query hardcode the year and the month from the Period dimension, however is there a way I can modify the query to dynamically find the current year month and year in the cube.


Thank you

SPQuery to get all Items Modified in Current Month/Year


I have a SharePoint List. Using CAML I need get all the Items that are modified in the current Month/Week/Year.? 

Can anybody help me to achieve this?




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