Security At Various Levels In Website
Feb 21, 2010I want to provide different security aspects to the admin and customer to a single website with a different home pages..
View 3 RepliesI want to provide different security aspects to the admin and customer to a single website with a different home pages..
View 3 Repliesi got a web app where some users can upload to a folder images or files like pdfs.
Those users are authenticated by forms.
Well, in public areas, everyone can see those images and files.
I use for showing an httphandler, changing name, etc...
Id like to know if its possible set security like this:
- Folder with uploads, only with read permission for everyone that is not authenticated
- Folder with uploads, with write permission for authenticated users
Goal is that none can upload files if they are not autenticated and make the upload through the web form created for that.
have a .net website that i have been developing where the majority of pages are accessible to anybody but a few pages are restricted to members. This have been done thru the .net membership provider.This all works fine but what im trying to do now is run a closed beta test.So i want to put the application online but require any visitors to the site to have to go thru an initial beta login screen that has one common username and password for all users. Once past that login the site needs to function like it would if that login step had not occurred. That is, users would have to signup or use their own personal logins to access the pages restricted to members
View 5 RepliesI have two levels of authentications in ASP.NET application.I have a [Code].... user that have full access to all the websites and [Code]....user that have limited access.I want to destroy all open sessions before do any new login, no matter who will do the login.Where should I place my code to destroy all open sessions before I do any new login?
View 3 RepliesI need to design a system that will control access to certain information. The requirement from the user is to use access levels e.g.
Level 1 - Support
Level 2 - Manager
Level 3 - Senior Manager
Level 4 - Department Head
etc.
If a certain piece of information is marked as Level 1, then all roles should be able to view that piece of information. If it is marked as level 3, then only the Senior Manager and Department Head can view it, but the Manager and Support roles can't view it.
Questions
When I assign the access level to a piece of information, will I have to assign multiple roles to it in order for me to achieve this functionality? Is there a better way of doing this?
Using ASP.NET MVC, I need to configure my URLs like this:
[URL]
In ASP.NET, what is the order of precedence with setting viewstate and similar properties? These can be set at web.config, page level and also at the control. If I turn it off at both web.config (global), page level, but on at the control level, for example, what is the result?
View 1 RepliesI am trying to create a menu with multiple sub levels
Menu 1
Submenu2
SubMenu22
The values of these menus and the urls are populated from the database. Currently I am using a TreeView to achieve this functionality but looks like treeview has lots of overheads.Could you please help me to construct the same functionlity using the accordian and repeater control
I have 3 page templates - A, B & C.
View 6 RepliesI am building a subscription based web site, which currently has three subscription levels, i.e. Horses, Soccer, and Horses and Soccer. I was thinking of implementing standard role based authorization, where a Horses subscriber would get roles including those to use the Horses section, etc.
Should I use a standard role provider, and when a member subscribes to the site, assign roles for his subscription to him, or use a hierarchical role provider, that when asked for the roles for a member, only then uses the member's subscription level to 'calculate' a set of roles for the member.
I have a requirement like this to insert records into a table...
Tab1 - Row1(Column1) ab2-Row1(Column1) Tab3-Row1(Column1) Tab3-Row1(Column2)
Tab3-Row2(Column1) Tab3-Row2(Column2)
Tab3-Row3(Column1) Tab3-Row3(Column2)
Add New row Tab2-Row2(Column1) Tab3-Row1(Column1) Tab3-Row1(Column2)
[code]...
I have a javacript file (script.js, for example) in the following location:
/Website/Shared/Js/script.js
I have two pages which use this javascript, but each one of them seems to require a different path and I can't figure out how to resolve both of them.
One of them is the page:
/Website/One/Two/Three/page.aspx and this requires the path:
<script src="../../../Shared/Js/script.js" type="text/javascript"></script>
The other page is:
/Website/One/Two/page.aspx and this requires the path:
<script src="../../Shared/Js/script.js" type="text/javascript"></script>
I tried to come from the root by doing
<script src="../Shared/Js/script.js" type="text/javascript"></script>
or
<script src="/Shared/Js/script.js" type="text/javascript"></script>
but none of these seem to work. The temp solution I have found is to declare the script twice which is dumb, but that is all I can think of now.
i want design of page like this. At the top of page is first level of menu - Main Categories. On the right site of the page is submenu (level 2). Can i achieve this with bult-in component like Menu control and sitemap file? I want to try create menu this way.
View 13 Replieshow to get list of all tree nodes (in all levels) in TreeView Controls ?
View 2 RepliesI found the article about Nested GridView Example in ASP.Net using C# and VB.Net
I tried it with a third level, but have problems of binding data. How it could work?
<asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" CssClass="Grid"
DataKeyNames="t1000_customer_id" OnRowDataBound="OnRowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<img alt="" style="cursor: pointer" src="./images/plus.png" />
<asp:Panel ID="pnlOrders" runat="server" Style="display: none">
[CODE]...
I'm creating a navigation menu. I've to render repeater control ul-li tags and menuitems can range upto N levels. I need to add a child repeater control dymnamically to parent control?
EDIT:
Example -
ul-li can goto n levels
<ul>
<li>
<ul>
<li>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</li>
<li></li>
<li></li>
</ul>
</li>
<li></li>
<li></li>
</ul>
I have four categories, which I would like to show up in my breadcrumbs:
ex:
Home > Poems TOC > MyPoem
Home > Songs TOC > MySong
can I structure the xml in the Web.sitemap doc, so that even if the files are in the same directory, they will dispaly as above. (the TOC entries are table of content pages, which call the actual content pages)
I have an XML file structured as follows:
<Levels>
<Level Code="T" Text="Test">
<SubLevels>
<SubLevel Type="9" Text="Nine"/> [code]....
What I want is two drop down lists, one linked to /Levels/Level and one to the SubLevels for the selected level. Currently, I have the main one bound as follows:
<asp:XmlDataSource ID="XmlLevelInfo" runat="server" DataFile="~/Levels.xml">
</asp:XmlDataSource>
<asp:DropDownList ID="cboLevelFilter" runat="server"
DataSourceID="XmlLevelInfo" DataTextField="Text" DataValueField="Code">
</asp:DropDownList>
This works fine, but I can't work out how to link the Sub Levels to the second drop down list. Is this possible using data binding?
I am building an ecommerce site and I struggle to find a way to check the stock levels for each order.I have created an "in house" procedure that involves the administrator having to push a "check stock" button for each item on the order but it doesn'tlook too elegant.
View 3 RepliesI am building an ecommerce site and I struggle to find a way to check the stock levels for each order. I have created an "in house" procedure that involves the administrator having to push a "check stock" button for each item on the order but it doesn't look too elegant.
View 2 RepliesI wanna write a usercontrol to handle different access levels on pages.
Below is the html i wanna achieve.
[Code]....
This is my code at this point:
[ParseChildren(false), PersistChildren(true)]
public partial class RequiredUserType : System.Web.UI.UserControl
{
public string UserTypes { get; set; }
[Code].....
My problem is that the <Content> and <AlternativeContent> doesn't get rendered as Panels and on the Client side its rendered as the initial tags(<Conten>) and not a div or whatever a asp:Panel normally gets converted to.
Its time for another very simple question that I can't find an elegant solution for. Basically, I have an app that is using a jQuery Ajax call. In this call, you have to specify a URL path for the service that you are calling. In this instance, I am needing to call this JavaScript function from multiple files in my application and those files are on differing levels of the folder structure.
Here's the question, how would you elegantly handle this scenario so that you can call the JS function from any location in your app. Here are my constraints:
1) I am running on Asp.Net 4.0.
2) My current environment has a local, Dev, Test, and Prod Environment (hard-coding the URL path will not work).
Code Snippets:
function MakeTheCall() {
$.ajax({
type: "POST",
url: "Services/FileName.asmx/Handler", //Path in Question
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result) {
},
error: function(xmlHttpRequest, status, err) {
}
});
}
I would like to be able to call this function (which is in an external JavaScript file) from files in different directory levels, such as:
1) http://SomeDomain.com/SomeDir/CallingFile.aspx
2) http://SomeDomain.com/CallingFile.aspx
I am using database with a list of username/passwords, and a simple web form that allows for users to enter their username/password.
When they submit the page, I simply do a stored procedure check to authenticate. If they are authorised, then their user details (e.g. username, dob, address, company address, other important info) are stored in a custom User object and then in a session. This custom User object that I created is used throughout the web application, and also in a sub-site (session sharing).
My question/problems are:Is my method of authentication the correct way to do things? I find users complaining that their session have expired although they "were not idle", possibly due the app pool recycling? They type large amounts of text and find that their session had expired and thus lose all the text typed in. I am uncertain whether the session does really reset sporadically but will Forms Authentication using cookies/cookiless resolve the issue?
Alternatively should I build and store the User Object in a session, cookie or something else instead in order to be more "correct" and avoid cases like in point #2.If I go down the Forms Authentication route, I believe I cannot store my custom User object in a Forms Authentication cookie so does it mean I would store the UserID and then recreate the user object on every page? Would this not be a huge increase on the server load?
i almost finished my website
but i am afraid of sql injection to my website
how i can protect my self against this injection ...?
I'm using a FileUpload control in a website which should only be able to upload images. To that end, I'm checking its MIME type before accepting the upload.
Whether the FileUpload.PostedFile.ContentType property comes from the file itself or the request? The latter is insecure, since the request can be spoofed. If that's the case, any good way to validate a file securely?