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


Post New Web Links

How to use Multiple masterpages depending on the user permission

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :SharePoint
 
Hi, I am having Two master pages in sharepoint 2010 RTM enterprise

one mastepage has to be load when site admin has logged in\

other masterpage has to be load when 'other than'  site admin is logged in

For doing this req,I created feature activated event i done through this object model.


But this is working only when feature activated(1 time only).Not based on the logged in user


If i deactivate and activate again it will start working(load mastepage) one time only.
As I know, feature  will perform the action .once the site is open then it will start.

As per my requirement Before page loads my code has to work.


I also created Httpmodule,written Init method,but it also not working....Is there any other procedure i need to follow for doing this.Please help me.


View Complete Post


More Related Resource Links

How to use Multiple masterpages depending on the user permission

  
Hi, I am having Two master pages in sharepoint 2010 RTM enterprise

one mastepage has to be load when site admin has logged in\

other masterpage has to be load when 'other than'  site admin is logged in

For doing this req,I created feature activated event i done through this object model.


But this is working only when feature activated(1 time only).Not based on the logged in user


If i deactivate and activate again it will start working(load mastepage) one time only.
As I know, feature  will perform the action .once the site is open then it will start.

As per my requirement Before page loads my code has to work.


I also created Httpmodule,written Init method,but it also not working....Is there any other procedure i need to follow for doing this.Please help me.

Webpart Headline has different css styles depending on permission user group

  

Hello,

I have created a new enterprise search center with some subsites for every tab I created with the search box. On each subsite I placed a content query webpart to display some preconfigured search strings.

Depending on in which permission group (owner, member, visitor) a user is, the headline of the webpart is shown in different styles.
With the developer tool from IE8 I can see that for an user in the owner/member group the corev4.css and the minimalv4.css is choosen.

For users in the visitor group only the minimalv4.css is choosen and the headlines are in a bigger font, different color etc.
I have checked the check in/out status of the pages and if they are published, but this seems not to be the issue.

Can anybody explain me how to solve this issue so that the headlines are shown equal for all usergroups?

Thanks in advance,
Jens


Multiple Instances of User Control

  

I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.

Thanks,


Error "user does not have permission to perform this operation" with User Instance = True.

  

I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.

Tarek.


User control with multiple item content

  
I have a user control that I would like to contain multiple items as its content, similar to the way a <StackPanel> works. I tried using a <ContentPresent/> but it will only let me use a single item as the control's content. What's the best way to go about this? I realize I could just require the user to put a <StackPanel> or <Grid> or similar control as the content of the user control, but i would rather not do that if possible.   I'm not sure if it matters, but this control actually has several content presenters. Some of them will contain a single item and some will contain multiple items.

SQL User Permission (No answer found by searching)

  
Hello all!   I'm hoping someone will be able to answer my simple question!   Previously, I've run the below script to give one user access to their db in SQL management studio but nothing else. use [someDB] -- use the real db name go sp_changedbowner 'theUser' -- use the new username go 4. Next, deny the new user "public" access to ALL databases: use master go deny VIEW any DATABASE to theUser go   However I now need to add an additional user with view on permissions to the database and can't figure out how to do it. I'm sure it's simple but my SQL knowledge is at a low level.   Many thanks, Lee.

Restored copy of DB gives bizarre DENY permission to a dbo user

  
We took a backup of our PROD database and restored it in our Integration testing environment, and ran a script to alter the schema from the current PROD schema to the new schema we wanted to test in Integration testing. This same script has worked fine in two other environments and exhibited no issues. However, on our SQL cluster in the Integration testing environment, the script (which is hundreds of lines long and performs numerous things that require you to be dbo to do) fails on one line, a basic UPDATE statement on a single table.  The table has no deny permissions, and only has explicit grant permissions for the Application Role that accesses it.  Other users who are dbo can UPDATE the table.  I can UPDATE all other tables and do everything else a dbo should be able to do.  On every other SQL instance we have tried this on, it works. For some reason, this error only occurs specifically on this one instance of SQL, with my specific user, and this specific table.  I am baffled as to what could be going on, but need to get this repaired to bring our Integration testing environment back on line. What could be causing this?The Pragmatic TSQL Programmer

Error "user does not have permission to perform this operation" with User Instance = True.

  
I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005. I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True. I am using Windows Authentication mode in SQL Server Express. The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False. I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working. I am already added to the Administrator Group locally on my Laptop. Still same problem. Checked this article: http://msdn.microsoft.com/en-us/library/ms254504.aspx, same problem. I enabled User Instances and also tried to Disable User Instances. When I disable user instances, and then try to connect from VS, I get a different error, which is asking to enable user instances.

user permission in granula level in SharePoint version 2

  
Hi, everyone:   I am administrator of a SharePoint v2 site. I found that I can either give "view item" or "view item, insert item, remove item and update item" permission to users, no middle. However, I do wish to give some users "view, edit" permission, but no "insert and remove item" permission.   So, does SharePoint v2 support this in out of box feature? if yes, how to make it, if no how can we achieve in easiest way?   Thank u MySTfrom Finland :D

Errors attempting to process SSAS Cube. I get Either user does not have permission to create a new o

  
Hi All, One of my production server deployed cubes i am not able to process the cube.When i tried to process the cubes i will get an Error: TITLE: Microsoft SQL Server Management Studio ------------------------------ Either the 'NA\gsad478' user does not have permission to create a new object in 'JNJAUSYSVR01', or the object does not exist.  (Microsoft.AnalysisServices)   Over the source server i do have sysadmin access and also  i have added read only role of particular cube. I right click on the database and tried to create new database of SSAS that also thrown with same error. Please help me in this regard.   Thanks, Gangadhar

limitate user permission to edit other users documents

  
i have a list where everybody uploads documents, but i want that only the user that uploaded the document can edit it or delete it, is there a simple way without workflows or code? thanks!

User permission error

  
I have a VS 2010 website that is reading and writing to a SQL Server 2008 filestream. By filestream, I mean that I have a table in a SQL Server 2008 database that is configured for filestreaming (ie - the table has a RowGuid column and a varbinary(MAX) column that is filestream enabled). The website is able to read and write to the filestream just fine and has been doing so for months now. However, there is one minor detail about using the filestream that has plagued me since the beginning, and were it not for a hack - at least I consider it to be one - then my filestreaming would not work. The problem is that for some reason when my website makes a connection to the filestream (via the .NET SqlFileStream class) it always attempts to authenticate with the name of the webserver.For example, I have a brand new web server called WebSrvPrd01 that I just placed my website on (the one that is using the filestream). When I try to do anything that uses the filestream (either writing or reading to) it throws the following exception:Login failed for user 'SUPER-NT\WebSrvPrd01$'.At this point, I then have to go into SQL Server and add the domain and user SUPER-NT\WebSrvPrd01$ to the database and give them access rights accordingly. After having done so the website will have no problems and the filestream works wonderfully. However, I don't like this solution! It presents a bit

How to avoid Multiple log in for same user

  
how to avoid multiple log in for one user at a time?

How to manually set which localization file (resx) to load up depending on user

  
Hi,I want to use localization as user base and not language base.  I would like to name my resx to default.aspx.ABC where ABC is the user's name.How do i manually specify which resx file the page should load up?  Thanks

Multiple Instances Same User Control

  
I have an ASP.NET page inside of an ASP.NET Master page, and inside the page I have two instances of the same web user control. I have given them different IDs, but when I click a button on the first user control it causes the second user control to do the expected activity and the first one does nothing. Is there something I need to do to make sure that the controls don't get confused? P.S. The expected activity is that when the button is clicked one panel object is disabled and another is shown. When the button is clicked on custom control 1 the panel on custom control 2 is disabled and it's next panel is shown and custom control 1 does nothing. Thanks for the help. 

Multiple instance of User Control on Page - Button Click Event

  
Hi, I have this Web User Control, with 3 controls:<asp:TextBox ID="txtSearch" runat="server" /> <asp:RequiredFieldValidator ID="rfvSearch" runat="server" ControlToValidate="txtSearch" Display="None" /> <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" /> In code behind: protected override void Render(HtmlTextWriter writer) { rfvSearch.ValidationGroup = this.ID + "_validation"; txtSearch.ValidationGroup = this.ID + "_validation"; btnSearch.ValidationGroup = this.ID + "_validation"; base.Render(writer); } protected void btnSearch_Click(object sender, EventArgs e) { Response.Redirect("ResultadoSearch.aspx?argumento=" + txtSearch.Text); } When I try to add two UserControl and I Click in btnSearch of second UserControl, txtSearch.txt returns value of first User control.How I can get the value of second txtSearch?

Permission to use User Solution in Site Collection

  
Hello, is it possible to deploy a user solution in a site collection, and set permissions which users or groups can use the solution in the site collections or subsites in the site collection ?    
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