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


Post New Web Links

Who to restrict access to only one view.

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
 
What is the best way to grant access for a user, to select from only one view, not the actual tables?


View Complete Post


More Related Resource Links

How to restrict folder access to users and theirs only

  

Hi. I created a web application using "Forms Authentication". 

There is a folder name "uploads", and it creates subfolders as username when they register. Web application stores users' files and images under their folder ("uploads/username")

I tried to find a way to restrict users to download and upload files to their folder only and couldn't find a good one. 

Then I came up with this idea that stores "web.config" file each time user registers and the web.config should look like below. Username will be changed dynamically according to username.

This method actually works but I am little worried if this is a good practice as far as performance wise. Because it'll create web.config files as many as users and there might be other holes that I don't recognize. 

I appreciate any advice or better suggestion for this problem.


--------web.config in "/Root/uploads/username directory"--------------

<location path="HRpages">
  <system.web> 

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

  
Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

  
Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All

SharePoint Users Behind a Forefront TMG Server Cannot Access Explorer View in Document Libraries

  
SharePoint server via a Forefront TMG server in a separate sub-domain. These users cannot access Explorer View in Document Libraries nor can they map a drive to the SharePoint directory structure, as users who are in the same sub-domain as the SharePoint server can. How do I setup SharePoint and the TMG server so that these users can map a drive to the SharePoint site? Office SharePoint 2007 SP2 Windows 2008 Server SP2

Restrict folder access in Report Server

  
Hi There, I am creating folders each of our end users in Report Server, who upload their reports to their respective folder. I want to allow users to see and access only their folders and they should not be able to see others folders available on the Report Server, it is possible? If Yes, how do I do it? Thanks for your help. Regards, Suresh

restrict access for a single group to a single folder in a list

  

Hello and Goodmorning,

I have one list, organized with 3 folders.

I can create a group(s), add user(s) to this group(s). 

Now i need to assign access like this:  group1 can only see and 'readonly' folder1, group2 can only see and 'readonly' folder2, group3 can only see and 'readonly'...folder3!

Im sure this is possible, from similar non-programming posts on the forum.

I have been looking into SPRoleAssignment and SPRoleDefinition to define Group permissions but its the mapping them to specific folders that I am missing...

Enjoy your tea.

 

max

 

 

 

 


Cannot Create an Access View

  

Hey Community,

Here's a mystery, I want to create an Access view on one of my lists.  I go through the normal create view steps, but when I get to the Create View page, creating an Access view is not even an option!  I haven't seen this before and a few quick Google searches haven't added any illumination - anybody know how to enable the creation of Acces Views?


Tom Molskow SharePoint Architect - If I solved the issue please propose my reply as the answer - Thanks!

Sitemap: why can't sub nodes further restrict role access?

  

I have a menu in my application (created from the sitemap) which I want available to two user roles.  However, there are items on that menu, I want available only to one role or the other.  So I have created the following in my sitemap.


	  <siteMapNode title="My Account" roles="TimeUser, Client" >
		  <siteMapNode title="My Profile" url="~/TimeTracker/ClientUserProfile.aspx" description="" roles="Client" />
		  <siteMapNode title="My Profile" url="~/TimeTracker/EmpProfile.aspx" description="" roles="TimeUser" />
		  <siteMapNode title="Change Password" url="~/TimeTracker/EmpChangePassWord.aspx" description="" roles="TimeUser, Client" />
	  </siteMapNode>


Essentially, I want employees with the "TimeUser" role to see the "My Profile" link that goes to the EmpProfile.aspx page, but not the link to the client profile page.  However, when an employee logs in, they see both.  I am guessing this may be because the "My Account" node which contains them allows both roles.  Is there a way around this without duplicating the "My Account" node?


UserProfile view attributes access denied

  

Hi,

I am trying to view the profile properties of another user using the following code (SharePoint 2010)

SPSecurity.RunWithElevatedPrivileges(delegate()
   {
    using (SPSite st = new SPSite(SPContext.Current.Site.ID))
    {
     UserProfile currentUserProfile = null;
     SPServiceContext context = SPServiceContext.GetContext(st);
     UserProfileManager profileManager = new UserProfileManager(context);
     UserProfile currentUserProfile = profileManager.GetUserProfile(userLogin);
     currentUserProfile[PropertyConstants.PictureUrl].Privacy

 //This is where the error occurrs

In the line highlighted in bold when I try to access the property I get the error

Access Denied: You may only retrieve your own profile's privacy setting, unless you are an administrator.

Since I am running with RunWithElevatedPrivileges shouldn't this code work?  Any ideas anyone.

Thanks

Arjuna.


Datasheet view, I get this error message: The lists are access DB lists.

  
  When I try to edit any of the lists by typing directly in the Datasheet view, I get this error message: The lists are access DB lists.

"An unexpected error has occurred. Changes to your data cannot be saved. For this error, you can retry or discard your changes."

I get this error message when I try to
1. add a new row by typing directly in the Datasheet view,
2. edit an existing row by typing (or selecting from a dropdown menu) directly in the Datasheet view, or
3. delete a row by right clicking on a row and selecting Delete Rows.

The error does not occur when I add new items to a list in the Datasheet view by clicking on one of the dropdown menus at the top of the list (such as New, and selecting New Item; or Actions, and selecting New Row). Using these options works fine for adding new rows, but I see no way now to edit or delete existing rows.

The problem seems to have developed sometime in the past few weeks.
I'm using Internet Explorer 7 with Windows XP Professional, Version 2002, Service Pack 3.

Using , want to restrict access to file .wmv

  

Hi all,  I want to secure a particular set of files in a folder by role type.  I have the following entry (See below)...I notice this doesn't work (I.e., it doesn't secure the file by Role Type..anyone can access the file).  I've read that I need to map the .WMV extension to the ASp.Net DLL.  Can somebody give me some details on how to do that?  (I'm a newbie).

 

Thanks in advance.

 

<location path="media/mymediafile.wmv">
    <system.web>
      <authorization>
        <allow roles="MediaRole" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>


 

 


Show data from an Access 2010 view

  

Hi.

I have a view in Microsoft Access 2010 that I would like to display in a SharePoint 2010 Standard web page. It does not need to be updated in realtime - only when the page is refreshed.

The data is updated from within Access - SharePoint would only be used to display a single view.

I would appreciate if someone can recommend a practical solution.

Thank you,
Markus


Markus Sveinn Markusson

Cannot access parent site list from subsite using XSLt List View webpart in sharepoint designer 201

  

Hi
   We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites.

We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart.


Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite.

Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages. 

Pls let me know what i have to change in the code level


<WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowR

Restrict access only to the homepage

  

Hello,

I want to allow all staff to access only the home page of the department. If I grant read permissions to Domain/Department/SitePages/Home.aspx I can access the landing page using full url, but if click on the department name in the breadcrums or go to Domain/Department/ i get  Error: Access Denied

This is happening because when one goes to Domain/Department/  one is redirected by default.aspx to Domain/Department/SitePages/Home.aspx but I can't grant read access to default.aspx

Do you have any suggestions on how I could accomplish only allowing read access to the home page?

 


Published Access 2010 Database to Sharepoint 2010. You do not have permission to view the records.

  

I have published an Access 2010 database to Sharepoint 2010.  It is pretty basic and essentially it is just used for teachers to enter lesson plans.  When viewing the site there is a form that has several dropdown menus.  The user should be able to choose their name, date, etc. from these dropdown menus.  The problem is that when I click on a dropdown menu the menu just shows a message that says "This service isn't available right now".  I also get a message that pops up which says "You do not have permission to view the records.  To obtain permission contact your site administrator."

The weird thing is that when I was testing this at one point I clicked the dropdown menu and it did work.  I clicked off the dropdown menu and went right back to it again and it didn't work.

I have anonymous access enabled for this site.  However, I have tried it with an anonymous user as well as with the user account that installed Sharepoint and published the database to Sharepoint and it doesn't work either way.

Is this a permission issue on the site or something else?  Any help is greatly appreciated.


How to Access List view webpart selected items

  

I'm displaying a list view in list view web part on web part page.

I want a solution to get selected items from the list view web part.

As I am displaying these results on web part page, i don’t have access to ribbon to add any custom buttons.

Any client side or server side code solution should be fine.

Thanks in advance.

 

I tried this code but it's returns null values

 

var ctx = SP.ClientContext.get_current();
              var items = SP.ListOperation.Selection.getSelectedItems(ctx);
              var myItems = '';
              var k;
              
              for (k in items)
 &

Restrict login access to website from specific machine

  

Not sure if this is the correct forum section but I need to restrict access to my website by physical PC.  When a user signs up I want to be able to restrict access to one machine for that account so it cannot be shared round, if, for example, somebody else in the same office wanted to access the system on their PC they would need a seperate sign in.

I have done some investigation and I "think" the only way is installing an ActiveX component (which isn't an issue that is restricts to IE only) and then read the users MAC address.  Am I trying to over complicate things or is that the only way?  I realise that MACS can be spoofed but this is not much of an issue.

Thanks


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