MVC :: Implement Resource Based Access In Project?
Dec 29, 2010
I want to implement resource based access in asp.net mvc project.For example i have create employee, edit, delete employee and view employeei want to implement a funcitonality where administrator can assign resources to user for example user with moderator can only view employees and user with administrative priviledge can create, edit, delete and view employees list.How can i implement this functionality?Any articles on internet on this topic?
View 4 Replies
Similar Messages:
Apr 24, 2010
[ASP.NET 3.5, FormsAuthentication, SQL Server]
In the Roles table there is Role, and RoleType.
I have 3different roles, 2 of which have sub-roles.
Example
Role----------------------Type
Adminstrator
Subscriber---Basic
Subscriber---Business
I need to implement Code Access Security, and URL based security using the roles & types...
For instance, the (Subscriber/Basic) would need to view a different set of pages, and have different access to things then a (Subscriber/Business).
I think I can handle the Code Access security with a custom attribute, but I am unsure to how enforce a User be apart of 2 roles in the URL Authorization.
I am currently using the web.config to deny/allow access to the directories/pages.
e.g.
/Areas/Admin/web.config
[Code]....
Is it possible to force the user to be apart of 2 roles with this technique?
View 1 Replies
May 6, 2010
i know some thing about the MVP pattern... but when you want to develop a project(web project) based on the MVP pattern from where we need to start... i mean which component we need to start developing first ...
Model or View or Presenter... what are the points that we need to keep in mind....
View 4 Replies
Oct 26, 2010
I'm pretty sure this is something super easy, but how do i access a resource that is in a separate project using the expression syntax?
I thought it would be like so:
<%$ Resources:SomeNamespace.Resources.Web, PleaseSelectAnImage %>
where SomeNamespace.Resources is the project that the resources are located in.
i normally just do <%= SomeNamespace.Resources.Web.PleaseSelectAnImage%> but i need to have this inside a control.
<kw:SlickUpload ID="SlickUpload1" runat="server"
ValidExtensions=".png, .gif, .jpg"
InvalidExtensionMessage="<%$ Resources:SomeNamespace.Resources.Resources.Web, PleaseSelectAnImage %>" >
so when i just do what i normally do, it puts '<%= SomeNamespace.Resources.Web.PleaseSelectAnImage%>" literally.
my project name is SomeNamespace.Resources. the resource file name is Web. and the key is PleaseSelectAnImage.
View 1 Replies
Feb 14, 2011
I have a web application project which contains few resource file. i am planning to create another one project for Mobile where i should be able to use the same resource files.
some best practices to separate the resource files.
View 1 Replies
Aug 9, 2010
I have a web application project with a App_GlobalReousrces folder which contains a *.resx file that I would like to access (read) from a separate class library project.
What's the best way to deal with this one?
View 2 Replies
Nov 15, 2010
I have two web projecs that use or share some image and localization file (chinese and english).
I don't want to have a copy on each of the project.
Is it possible to share those images and localization file using Satellite Assembly?
View 3 Replies
Jul 22, 2010
I need to be able to change the resource file used by an ASP.Net Page based on some value other than Culture/Language/Region. The purpopse is to simply configure properties on the page based on a city or site name or other criteria. I do not want to change language or culture/region.
View 1 Replies
Jul 12, 2011
I have a simple intranet site. It has a role based authorization in the web.config file.
Any user's in a specific role called as "Apr-Sales-Writers" will be authorized to use those pages. If not, they will not be authorized. So far so good. Works fine. But we added additional functionality where a new active directory group (means new role) has to be added and user's belonging to this new AD group should be given access to only specific .aspx pages on the intranet site. I am using a web.sitemap and it looks like this.
If the user's belong to say AD group "Apr-Sales-Writers", they should access only default.aspx and salesData.aspx pages. User's belonging to new AD group (which I did not include in the web.config file below), should have access to other .aspx pages.
[CODE]<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="default.aspx" title="Home" description="Home">
<siteMapNode title="sales Data" description="sales Data">
<siteMapNode url="salesData.aspx" title="sales Data" description="sales Data" />
[Code] ....
View 7 Replies
May 25, 2010
I tried searching, but I guess the <% $ %> triggers something on google and it turns up nothing. What is this accessing in an asp.net .aspx page? I've used the = but never a $.
View 2 Replies
Jun 24, 2010
I want to implement the MVP in my project. I want that when I click a button appear some letters on the textbox.
View 5 Replies
Mar 26, 2010
Assembly 'LocalizationRes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' contains a Web resource with name 'LocalizationRes.VerifyDeletion.js', but does not contain an embedded resource with name 'LocalizationRes.VerifyDeletion.js'. getting an error saying like this while I am trying to acces the Resource file through Ajax...
View 2 Replies
Jul 8, 2010
i know that i can set a Label's text by using this syntax:
lblMessage.Text = (string)GetGlobalResourceObject("resxFile", "message");
but what's the difference(benefit/drawbacks) to using this syntax:
lblMessage.Text = Resources.resxFile.message;
also, i just found out that this second method doesn't work for local resource files. is there a different syntax used for local resource files?
View 1 Replies
Nov 11, 2010
Server A exists on domain A and server B exists on domain B. From server A I need to output file names that exist on shared folder on server B. I tried the following with no success (Access denied error):
DirectoryInfo dir = new DirectoryInfo(@"\serversharedFolder");
After some Googling I found that I need to use personlization to impersonate an existing user on Server B that has access to that shared folder. I used a C# personlization class as explained on codeproject (http://www.codeproject.com/KB/cs/cpimpersonation1.aspx). I supply the domain, the user, and the password and hope to get access to the shared folder BUT the error I see now is"Login failure: unknown user or bad password".
I am 100% sure that the domain, user, and password I supplied are correct. When trying to access the share via windows explorer from server A I am prompted for a username and password. After entering domainusername and the password I have access to the folder. So I know that the credentials I supplied are correct.
Am I going about this the right way? I have full access to server A and B so maybe there is an easier way to accomplish my goal.
View 6 Replies
Feb 15, 2011
We have a web site on customer server. It is being locked every 2 or 3 months. I posted this subject before. For understanding the error I created a log file. When the server locked I look the log file and saw "system resource exceeded" error message. Have you any idea about this error.. When restarting the server it continue.
View 5 Replies
Mar 16, 2011
I am trying to write xml directly to browser. it using resource .XSL for display in Table and row format...But it throwing message like
Access is denied. Error processing resource at the time of display on browser..
View 4 Replies
Mar 17, 2011
I tried to implement Optimistic Concurrency in the Movie MVC 3 project.
1. I added a new property
[Timestamp]
[ConcurrencyCheck]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public byte[] RowVersion { get; set; }
2. Modified controller to execute
var movie = db.Movies.Find(model.Id);
db.Movies.Attach(movie);
TryUpdateModel(movie);
db.SaveChanges();
return RedirectToAction("Index");
3. Added the RowVersion as a hidden field to the View page
@Html.HiddenFor(model => model.RowVersion)
It didnot work for me, can someone pls point me to the right direction?
View 1 Replies
Oct 11, 2010
I want to implement audit trail in my project. This implies keeping track of changes made in DB and later generating a report for specific data.
I'm looking for solutions other than triggers as in to have a generic solution for DB Audit trail in my project.
We'll probably be using Entity Framework 4.0. I want to explore the audit trail capabilities for the same any pointers in this directions would be helpful. also any ideas for DB Audit trail if we use Enterprise Library Data Application Block. Note:SQL Server 2008 has auditing features, but we'll not be using the Enterprise version.
View 1 Replies
May 7, 2015
How do I implement fresh desk API in my project (ASP.NET C#)?
View 1 Replies
Feb 15, 2011
I want to implement web based chat as google , yahoo , msn , facebook implemented , can any one give idea about which path i have to start i have three ways to do the task which one i should go for is the confusion
1 . Web to Web using Asp.net Database driven approach (AJAX , jquery enabled)
2. Web Services (Database or XML driven)
3. WCF
View 6 Replies
Jul 11, 2010
How to implement role based security in each page.
View 2 Replies
Mar 8, 2011
Or any class that's not X.aspx.vb. I've imported the Globalization, Threading, Threading.Thread, and UI.Page namespaces. But it won't come up in Intellisense and it gives error lines in my code. Is there a way to access use the GetLocalResource("Y") method in other classes?
View 3 Replies
Jan 27, 2010
I've added a key/value pair to an .resx file named SharedResources in my App_GobalResources directory.All the examples I've read on line have me trying to access the value as:
[Code]...
However, the intellisense is telling me that (Resources is not a member of '<Default>')
I've also tried this syntax, without the global
Dim MsgTemplate As String = Resources.SharedResources.EmailTemplate
I then get a message that (SharedResouces is not a member of Resources)
The intellisens is showing the following members for Resources
ResourceManger
ResourceReader
ResourceWriter
It should be compiling a global collection based upon the files in my App_GlobalResources directory from what I'm reading.However,I can't find anything to match what everythink on line says I should have available.
View 6 Replies
May 10, 2010
i have an project with name called(dbservice layer) which is in path: d:webserviceDBService. here i have an webservice which connects to DB and returns an object of an class.
once i added an reference here i get an url:http://localhost:2371/Jobs.svc
now i have another project name (UILayer) whic is in path: E:SchoolUILayer i added an service reference here with url as http://localhost:2371/Jobs.svc but i get an messgae telling service is unable why is that happening.
if both my webserivce layer and ui layer are in same project. then i able to use the webserive in the ui layer. and get the required output
so i wanted to know is there any way we can acesss the webserive from one project to another project
View 1 Replies
Sep 30, 2010
there is a tutorial about ASP.Net Application but i am using ASP.Net Web Site so i don't have unload edit name feature like stated here [URL]
View 1 Replies