.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

Problems with permissions on custom sitemap

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :SharePoint


I have added a custom sitemap to my webconfig:


<add name="CustomXmlContentMapProvider" siteMapFile="_app_bin/tmw.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />


I then created this map in _app_bin and referred to it within my sitedefinition.  All is well, it works fine.  However unless the file has read/execute permission for all, it will throw an error every morning.  That is the weird part, it doesn't occur throughout the day, just for a few hours in the morning ending before 9:00am.  This makes no sense to me since the webserver can read the file and none of the other files in that directory have special permissions.  Does anyone know why this might occur?  Here is the error thrown (when the file doesnt have r/x for all and only in the morning):


Request information:

    Request URL:

View Complete Post

More Related Resource Links

Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

How to write an event to manage permissions on a document while uploading, depending on custom field



I am trying to find a solution to manage permissions on a document, while uploading it into a document library. This event has to be fired if a custom field is populated (it's a check box field).

How to write an event for this, i tried writing ItemAdded event, but this is getting fired as soon as a document is uploaded, before coming to the page, where we populate all the fields and hit check in.

can i capture Check-in event.

Please advise.


VS2010 designer problems with custom markup extensions returning FontFamily

App.xaml: <Application x:Class="CustomMarkup.App"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:int="clr-namespace:CustomMarkup"              xmlns:ext="clr-namespace:ExternalMarkupExt;assembly=ExternalMarkupExt"              StartupUri="MainWindow.xaml">     <Application.Resources>         <Style x:Key="MyStyle">             <Setter                  Property="Control.FontFamily"                  Value="{ext:ExtMarkupExt {x:Static int:Resources.FONTFAMILY_NAME}}"/>         </Style>     </Application.Resources> </Application> MainWindow: <Window x:Class="CustomMarkup.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x=&quo

Permissions issue for custom web service in the _vti_bin folder.

Hello, I have created a custom ASMX webservice that returns in JSON format so that I can call the data from JQuery on SharePoint page content.  I placed it in the ISAPI (_vti_bin) folder and it works just fine when I go directly to the web service and call it the way JQuery calls it: /_vti_bin/ServiceabilityCheck.asmx/GetSystemIDByZIPCode?ipaddress= Which returns: <string>{"SystemID":"5"}</string> When I try to call it from the SharePoint site with JQuery, it errors out and gives an unspecified error.  Fiddler shows {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"} as the response from the web service call. When I have the webservice on an IIS web app outside of SharePoint, it works fine.  I have anonymous access enabled on the SharePoint site, why would it give me this error?John Chapman | Blog: http://www.johnchapman.name

Problems with Farm Account magically losing permissions to certain things

I don't know what's going on, but this has now happened two times in a row during my rebuild from TP to Beta (completely new build from the OS up).  I'm using the same service account (domain account) as my setup and farm account.  While logged in with my farm account, I install the SP2010 pre-reqs, then the bits, then give it dbcreator and securityadmin roles in SQL, then run the SPT wizard.  Within the wizard, I specify the same account as my farm account, and all works fine and dandy.  After it's done, I'm able to get into Central Admin with this same account and see/do everything.After working with things a while and following the MS instructions for getting the User Profile SA working, if I reboot or logout/login, then I suddenly don't have access to some very important things, such as:- System Settings > Manage Services on Server.  It just disappears completely- Security > Configure Service Accounts.  This does not disappear, but clicking on it causes a prompt saying "Error:Access Denied."  Previously, I was able to go in here and set my service accounts for things like search, user code service, etc (I set them to the proper service accounts)- Configuration Wizards > Launch Configuration Wizard.  I used this multiple times when getting my farm setup, but now it's gone.I've gone so far as to make my farm account all of these things:- Member of B

Problems with Custom List Forms in Document Libraries

I have setup several custom list forms for various lists with no issues however when it comes to document libraries a few things dont seem to work correctly. I create a copy of the editform.aspx --> Hide existing web part --> Insert custom list form (edit) --> restyle the fields etc. save it as edit.aspx confirm it is being used as the default form in the supporting files section. Great it appears to work whenever someone uploads a document or clicks edit. However... that is only th first impressions as there are a few issues that crop up at this time.  Clicking the edit button on an existing document doesn't display the Name field, meaning individuals cannot rename a document. After an item is uploaded and the required fields are entered in the form the user then clicks check-in. The library then opens and shows the document is still checked out to that user. Has anyone else experienced these issues before? The critical factor is the checking in a document, as to why this breaks on a custom edit form I have no idea. Any help would be greatly appreciated as under quite a lot of pressure to get this resolved. Chris

BCS Method Security / External Content Type Permissions / Custom List Security Provider / Security T


I have an external list setup with the usual CRUD methods.  The external SQL table is also being populated by another source.  I want to enable/disable deleting depending on whether the record was created from SharePoint.  I would also like the normal list permissions to work.  So if a user has permissions to delete on the list, they can only delete items created for SharePoint. 

Where should this logic be incorporated?  On the BCS Delete method, somewhere in the External Content Type or on the list instance?  Most examples I find relate to security trimming for search.  I'm only concerned about the delete method.

I'm sure there are multiple ways to accomplish this.  Which is the best?


x86 to x64 problems with ResourceDictionary Custom Control


I created a Resource Dictionary in x86 architecture and it worked perfectly until i tried building it in x64. The error Im getting is:

Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Client.Controls' that is not included in the assembly.    C:\Users\[USER]\Documents\Visual Studio 2010\Projects\Client\Client\Resources\Label.xaml


The ResourceDictionary looks as followed:


I have a class with the

Custom Membership Provider Permissions Inconsistency


Hi there,

I've built a custom membership provider and a custom role provider and successfully deployed it. I've also managed to debug it by attaching all my w3wp.exe processes in Visual Studio 2010.

Trying to login with forms authentication seems to be working fine but obviously tells me access denied and it also hits the membership provider and the role provider in the debugger (i've got breakpoints on all the methods).

So then i log in with windows authentication using AD and try to set up permissions for forms-based user. The people-picker finds my FBA user and then i click on the "Add" button but when the picker returns focus to the permissions page, the page tells me the user cannot be found and underlines the username with a red squiggly. If i then type out the username and click the validate button (icon of a person with green tick-mark) then it takes a couple of seconds and resolves the username just fine. But when i then click on "OK" it loses validation and underlines the entered username with a red squiggly again. Also at this point nothing is hitting the debugger at all.

I've checked and re-checked my web.configs and i cannot determine where the problem lies!

Am i supposed to build a Claims Augmentation as well? My current understanding of the Claims-Based Identity Framework is that this is not nec

What factors into the calculation of the width of modal dialog windows? (problems with custom master


I have a fairly customized masterpage and while the modal dialog boxes seem fine in Chrome and IE, they aren't rendering wide enough in firefox causing them to need to be horizontally scrolled.

I've figured out that it's not my stylesheet because when I deactivate it the problem still remains. When I try going back to v4.master it also works fine, so I'm mostly positive it's my masterpage.

I've tried going through and removing various customizations but nothing seems to resolve the issue. I'm thinking it may be related to the ribbon which I have detached from the top of the page.

I'm hoping if someone knows how the width of the modal window is calculated I might be able to track down the bug.

I wish I could just set the modal windows to use a different masterpage all together or have more easily accessible css. Maybe Sharepoint 2012? :)

Custom Edit Form Attachment Problems (not the typical one)


Latest versions of MOSS 2007 and SPD with all SP and applicable hotfixes.

I create a new edit form by right-clicking on the original edit form and selecting "New from existing page".  Then I set to "default to master content" and then add a custom list form.  It works fine....attachments and everything. 

However, once I make any changes whatsoever within the newly-created DataFormWebPart, like moving a field to another cell or adding some text, the attach file function starts acting weird.  You hit the "Attach File" button on the toolbar and the DataForm is hidden and the attach file area is displayed as usual, but when you select a file and hit "OK", it simply blanks the attach file field and doesn't return to the DataForm.  You can select other files and attach them fine, but you have to hit "cancel" on the attach file function in order to return to the DataForm.  When you do that, the newly-added files are there and are saved properly when you save the list item.

I've spent days searching for a solution for this.  Any help would be greatly appreciated.

Edit:   This issue is also present on our development farm.  If nothing else, can somebody take a few minutes and try to duplicate?

Steps to Duplicate (in Sharepoint Designer

Setting custom task list permissions


I am trying to use code to set permissions for a custom task created in Windows WF. I have been trying to use the following method to access a specific task in the task list and add a role to that task:

        public void setTaskPermissions(Guid taskGUID, string loginName)
            SPSite Site = new SPSite(ConfigurationManager.AppSettings["DefaultSourceURLStandard"]); 

            SPWeb Web = Site.OpenWeb();

            //Get Role Definition from SPWeb

            SPRoleDefinition RoleDefinition = Web.RoleDefinitions.GetByType(SPRoleType.Contributor); //or whichever SPRoleType you choose

            //Get SPListItem

            SPList List = Web.Lists[ConfigurationManager.AppSettings["LeaversTaskListName"]]; //e.g., "Announcements"
            SPListItem ListItem = List.Items[taskGUID];

            //Create new Role Assignment
            //Add Role Definition to Role Assignment's Role Definition Bindings

            //add role specific to user
            SPRoleAssignment specificRole = new SPRoleAssignment(loginName,"","","");

Custom permissions for a list in sharepoint 2007



I have a requirement wherein I want to give a group permission to add document but not to edit them. I have already created a custom permission group. But the issue is that my document library has custom fields.So when a user of that group uploads a single document he is redirected to EditForm.aspx and when he clicks "OK" he gets access denied error(understandably). So I created an event handler to give the user edit permission on item adding and removed the permission on item updated. But now when I add a new document, a new folder or upload multiple documents, Item Updated event is not called and thus the permissions for that group are not removed.

Any ideas how to achieve this ?

Thanks, Tejas

Custom Controls in C# .NET

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it leaves a lot of room for bugs. So, implementing functionality specific to your control in the control's source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.

Writing custom MembershipProvider

ASP.NET Membership mechanism allows to use the build-in server tables to store and retrieve user data. By default, this mechanism can only be used with SQL Server database to which Microsoft provides suitable MembershipProvider class.
Inheriting from this abstract class, developer can use his own table(-es) from any database and use any database engine other than SQL Server, like Oracle, DB2 etc.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key
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