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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Feature working only under Admin account

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

Hi,

I had created a feature and activated in the site under the Admin account. The feature was to count the number of files under each sub folder. The feature got activated successfully. I tested the code under the Admin account, and it was working. I tried to test with other users, who had design and contribute access. But when the other users checked, the count was not showing.

This is the code I have used:

[CODE]

  public static void GetOpenItems()
  {
 SPSecurity.RunWithElevatedPrivileges(delegate()
 {
 using (SPSite site = new SPSite(Constants.url))
  {
using (SPWeb currentweb = site.OpenWeb())
  {
 SPListCollection mylists = currentweb.GetListsOfType(SPBaseType.DocumentLibrary);
 for (int q = mylists.Count - 1; q >= 0; q--)                          
 {
 SPList list = mylists[q];

 if (!list.Hidden)
{                             
currentweb.AllowUnsafeUpdates = true;
SPFolder folder = list.RootFolder;
SPView curview = list.Defau


View Complete Post


More Related Resource Links

Retract custom master page feature and all site pages stop working

  
There is a requirement to apply custom branding on personal sites in a SP 2010 project. For this I have created a feature which uploads and applies the custom master page on creation of any new personal sites.   I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on a team site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master.   Any help on this is appreciated. Regards, Neha

Retract custom master page feature and all site pages stop working

  
I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master. Any help on this is appreciated. Regards, Neha    

Windows PGM socket access error with non-admin account

  

Hi,

 

I'm trying to use PGM sockets to send data. I can listen and receive data fine from a PGM socket using a non-admin account, but when I try to create a socket to send data I get an exception at this step:

socket.Bind(new IPEndPoint(IPAddress.Any, 0));

The exception is:

An attempt was made to access a socket in a way forbidden by its access permissions

Note that if I run the same code under an admin account it works fine. Is there a way to create a sender PGM socket without running under an admin account?


Code behind feature not working

  

Hi.

I am using WSS 3.0 on Win 2003 and SPD 2007.

I have created a list and created a customized the corresponding NewForm.aspx to with different sub headings as there are many columns and named it NewForm_v2.aspx. To this I've added a label and button to test code-behind features.

The problem:

I have created built a class library in VS2005 > assigned the key etc and finished all other formalities. Changed inheritance tags as well in NewForm_v2.apsx. But when I press the button it is not invoking the method present in the class library (The button should change the text in the label)

My next question is how to debug my code-behind? I've read some articles and tried, but could not hit my break point yet ...

Thanks for your help!

Regards


User Profile working, but domain in the Account Name field is incorrect

  

Profile import is working with a small set of users from just one OU. The synchronization connection has a Forest Name of "corp.mycompany.com", just like in our current profile settings in MOSS 07.

However, the user profiles created are listed with "corp" as the domain, not "mycompany".

E.g. my profile Account Name shows "corp\eriehl", but it should be "mycompany\eriehl".

How do I update this reserved property to contain the correct value for our domain?


Who will create Super admin account?

  

On admin side how to create first secure admin account when there is no users/admin exists  without manuall entry ?

On any website how we can create Super admin account who will handle all the things? Except the entry in db manually. I c# or vb.net

 

 Regards

Awais


Document ID feature not working

  

Hello,

I want to try out the Document ID feature.
I enabled the "Document ID" feature in the Site Collection features list.

That gave me a new setting "Document ID settings" in the "Site Collection Administration" list.
I checked "assign document ids", I specified a prefix, and checked the "reset all document ids..."

I did this last friday, and today there is still no sign of document ids in my document library.
When I check existing documents, or upload new documents, there is no field "document id" when I check the properties.
This column is also missing when I modify or create a new view.

Any ideas what I need to check to get this working ?
I have beta 2 installed (14.0.4536.1000).
Maybe it is a know issue with this version ?


Client Integration feature not working in MOSS 2010

  

Hi,

We have installed Moss 2010 and integrated with ADFS 2.0 and CA SiteMinder. We have created a new website and enabled Client integration feature in MOSS 2010. But, the client integration feature doesnt work in MOSS 2010. We can successfully authenticate each IdP and can login to website. However, when we access any document from sharepoint, it asks for user authentication second time. Previously, we had configured the website same way but we were not getting the issue. But, now we are getting this issue when we access any document from sharepoint.

Any help would be highly appreciated.

Thanks,

Pravin


Retract custom master page feature and all site pages stop working

  

I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.

 

I activated

Workflow doesn't strat automaticaly under non admin user account.

  

Hello,

I need an email to be send to specified e-mail when an item is change by any user.

I ticked "Automatically start this workflow whenever an item is changed".

When I make any changes in the field by admin account workflow automatically starts, no problems with it.

But when I make any changes in the field by any other user account workflow doesn't start automatically. I still can start it manually but I need it to start automatically.

Thank you.

 


Do we need to add SharePoint account Admin Group

  

SharePoint 2010 will atutomatically create following accounts.

Do I need to include all account in Adminstrator Group?

  • IIS_IUSRS
  • Performance Log Users
  • Performance Monitor Users
  • WSS_ADMIN_WPG
  • WSS_RESTRICTED_WPG WSS_WPG Thanks in advance


Thanks, Sam

FAST Search Admin links not working

  

I have installed FAST for SP 2010 and configured it a little bit, but all four FAST Search Administration links "Managed properties", "Crawled property categories", "Manage property extraction" and "Spell checking management" for my Query Fast Search Service Application do not work. I get the "Unexpected error occurred while communicating with Administration Service" error and my log reports "An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=FASTSearchCert\nIssuer Name: CN=FASTSearchCert\nThumbprint: EBDF82DBD9688401743605B35519271CB173F441\n\nErrors:\n\n SSL policy errors have been encountered.  Error code '0x2'.."..

 


Sharepoint 2010 Search feature not working

  

I just updated from MOSS 2007 to MOSS 2010. Everything looks like it went well and most of the features are working except for the search feature.  When I search for a known document that I know is in a library, Sharepoint does not list any results.   I can no longer search for any documents.  ANy ideas on why this is? What are some steps I can take to look for the problem / solution?  I have gone in the search settings in the central admin site and see that there is an error but cant determine what that is.

Content Source Type Start Time End Time Duration Success All Errors
Local SharePoint sites Incremental 11/24/2010 9:55 AM

MOSS 2007 MySite not working after deleting & readding an exchange account

  

Hi All,

One of our users had their AD account deleted and readded in Exchange, and now they cannot access their mysite, as the old profile information still exists. How and where would I fix this please?

As a test, I recreated this issue and found that deleting the old mysite entirely meant the new user profile could go and recreate a new mysite, but I need to know if I can somehow re-link the old mysite with the new profile?

 

Many thanks!

 

Paul.


You can't be right all the time, but you can be smart everyday.

SQL 2005/2008 on Windows Server 2008 R2 cluster - Service only starts when account is local admin

  

I have a single node Windows Server 2008 R2 cluster configured with SQL Server 2008 Enterprise Edition installed as a clustered instance.

I am having an issue where the SQL Server service will only start using TCP/IP when the service account is a member of the local admins group. To get SQL to install I had to add the sql server service account to the local admins group.

I have configured group policy with the permissions required for SQL Server 2008 and this is correctly applied to the node.

Errorlog shows the following...

Error: 26054, Severity: 16, State: 1.
2010-05-05 15:23:41.98 Server      Could not find any IP address that this SQL Server instance depends upon.  Make sure that the cluster service is running, that the dependency relationship between SQL Server and Network Name resources is correct, and that the IP addresses on which this SQL Server instance depends are available.  Error code: 0x5.


2010-05-05 15:23:41.98 Server      Error: 17182, Severity: 16, State: 1.
2010-05-05 15:23:41.98 Server      TDSSNIClient initialization failed with error 0x5, status code 0xa. Reason: Unable to initialize the TCP/IP listener. Access is denied.

2010-05-05 15:23:41.98 Server      Error: 17182, Severity: 16

Allow non-admin users view site and list settings (delegate control feature?).

  

I wonder if anyone knows of a way to allow regular users to view settings for sites, lists and document libraries (e.g. versioning, navigation, library template settings) without granting them permissions to change these settings?

Why do I need it? 

This is to allow 1st line support to gather some information and identify possible causes of user issues without having to escalate every call to users with admin or site owner permissions. 


Scenario 

A user logs a call saying he's uploaded a document but other users cannot see it. Now,

Working with SharePoint document libraries

  
Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.
Categories: 
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