Specific Page Security On Web.config?
Sep 24, 2010I have the following on my web.config
<location path = "WebPages/Reports">
<system.web>
<authorization>
[code]...
I have the following on my web.config
<location path = "WebPages/Reports">
<system.web>
<authorization>
[code]...
Currently, I work on an ASP.NET project which is hosted under version control and is used on several developer machines, tester machine and production environment.
In three cases, configuration (Web.config) may be different. For example, developer and tester environments use testing SQL Server, whereas in production environment, another SQL Server is accessed, so the connection string is different in those cases.
We want to keep three versions of Web.config in subversion. But modifying each of three files every time we need to add, remove or change a common setting is annoying: it would be nice to have a common, master Web.config, which will be inherited by each of the three Web.config files.
How to set up an ASP.NET project which will use a master configuration file and different slave configuration files on different machines, thus sharing the same project/source code/configuration files in subversion?
Is there a tutorial on how to redirect user to a specific web page based on his/her role? For example, I have teacher role and student role. When the teachers login, it will redirect the teacher to the teacher web page and the students redirected to the student web page.
View 1 RepliesAt work, I'm currently doing an ASP.NET project, where I have to connect an MS Access file to ASP.NET.
This has been done successfully. Next, I had to create a login page, this has been succeeded as well.
Now I have make sure everyone sees unique queries from the database. Example: There are 12 queries in the database; one person has to see another query than the other person can see. But there are some products, which everyone has to see as well.
How do I do that without creating server errours (I get them a lot with one little change).
I am trying to figure out how to associate a specific user to a specific data on the site, like social networking site.
View 3 RepliesI am using Formsauthentication. My situation is as per below:
the login form has codebehind :
protected void LoginButton_Click(object sender, EventArgs e)
{
TextBox uname = Login1.FindControl("UserName") as TextBox;
TextBox pass = Login1.FindControl("Password") as TextBox;
CheckBox rm = Login1.FindControl("RememberMe") as CheckBox;
Literal fail = Login1.FindControl("Literal1") as Literal;
if (Membership.ValidateUser(uname.Text, pass.Text))
[Code].....
Now the problem is that when I try to login with proper credentials it first redirects to default.aspx( there is no such page in my project), after login again with same credentials it properly redirects to the correct page. Why such problem arises? to fix this?
I'm not sure if this is possible or not, I'm using Roles to limit what pages a user can access based on there assigned Role. My question, is there anyway to redirect the user to a specific web page based on thier role after they login.
For example:
If Bob logs in with Role="Automotive", I want him to be redirected to Auto.aspx.If sue logs in with Role="Clothing", i want her to be redirected to cloths.aspx.
I don't have any sub catalogs for the .aspx files and this is my web.config file:
[Code]....
It's as if the Login.aspx won't grab the Site.Master if I add this authorization.
I get directed to the Login.aspx if I try to enter any other page, but without seeing the master page.
Is this enough info to solve this or do you need to know how the other pages looks like?
i want a simpe login systemm using webconfig file and one login.aspx page.
View 3 RepliesFollowing is the scenario:
I have two applications, each resides in its own folder at the same level.
Physical location:
A. inetpubwwwrootapp1
B. inetpubwwwrootapp2
Virtual directory:
C. www.abcapp1
D. www.abc.com
I noticed that when I ran C, it pickups and runs the web.config in from location B also... Why?
is it because the virtual directory? Also how can I tell C to use web config inA only?
I am trying to get sections from specific .config file such like "my.config".
WebConfigurationManager.OpenWebConfiguration can get the web.config in specific path.
Maybe WebConfigurationManager.OpenMappedWebConfiguration can reach my purpose
Is it possible to make some values in my Web.Config file dependent on whether I am building a release or debug based ASP.NET application?
View 3 RepliesI'm using the web.config transformations on an ASP.NET site so I have .config settings for dev, test, and release environments. I need to run the source code in Visual Studio against the test database using the settings in Web.Test.config and I can't figure out how to do it. I tried changing the configuration to Test but it still uses the base Web.config settings.
View 1 Repliesin my web.config file i've added an entry:
<httpModules>
<add type="HDI.HTTPFilter" name="HTTPFilter"/>
but the server where i've placed the website on is not reading this entry but in other servers the site works perfectly.what the problem might be?
My web.config file has several authorization. May i know how can i update the roles value in to allow 'Staff' to access Page1.aspx programmatically.
[code]....
We had some content restructure recently and I'd like to put in some redirect rules into web.config so bookmarks to the old pages can get routed to their new locations/pages.I tried using this approach:
<location path="~/product/productA.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="~/product/category/productA.aspx" exactDestination="false" childOnly="true" httpResponseStatus="Permanent" />
</system.webServer>
</location>
But all I'm getting when I go to "[URL] is our http 404 page.Am I doing something wrong, or is the httpRedirect tag in web.config not supported in mono?
I have an application that has a user Login Control (provided by ASP). I am just now working with the integration of a dataBase created in MS visual studio 2010, to a developed website created in MS visual web developer 2010. My main goal is to create an authentication ticket that enables a user to be able to see a dataBase information only after that user has been successfully authenticated.
Up to now I'm able to see the dataBase when i run the website even if I'm not log-in, how i can create a home page that tells the user to log-in and once that user has successfully log-in it redirects the user to another page where the user can see the database and how I can add information to that dataBase only to specific members
We use Sharepoint to control our websites. We build the sites, then load them into the sharepoint server. My question is if I use windows authentication, how can I get my role security in my web config file to coencide with the asp.net controls that use the Forms authentication. Is there a differenence? Our security uses a session variable for security but there is no where to set up their permissions except in active directory. I hope this makes sense because I would like to implement the LoginView with Role groups but how can I give them the role="administrator"? Do I have to go into active directory and give them these permissions(would take awhile due to the size of the company)? Or do I have to set up priveladges in the web.config file for each user(difficult I think)?
View 5 RepliesI'm no programmer. I am a student majoring in Business Information Systems. My capstone course requires me to develop a web-enabled database that will allow a company to track their projects. I have set it up this far using the 3.5 dynamic data page. My database is fine, however I need to set it up so that Admins can view the entire site and have the ability to edit, view, and delete items, and where users can only edit projects that they are assigned. Is what I'm looking to do possible?
View 4 RepliesI have installed an SSL certificate with EV on a website through IIS. I am aware that as the SSL has EV that it can display a 'green bar' on web pages. I want to display the 'green bar' on specific web pages. These web pages sit within a 'SECURE' folder within the website directory. Is there some code I can insert on these web pages for the 'green bar' to display?
View 1 Replieshow do i ask if the current user have the specific role ...
like ... if(user is in role)
{
do simthing...
}
How can I collect all user (guid) from a specific role?
View 3 RepliesI built a website that tracks submissions online (SQL server express 08 edition). It has its own User table thats linked to other data tables specific to the business of the website. But I found out recently that I can save lot of time by integrating ASP.NET standard Login Controls that can automate lot of coding and make my life easier. Now since then, I added the login controls, integrated the work flow into my website (just user , role navigation so far) and noticed VS creates its own user tables , view, SPs etc. I am okay with that.I need all my submissions to be linked to a particular user that enters each sumission. Now since my user (userid) moved from my personal custom table to a standard ASPNETDB.mdf table... how do I link my original website database and tables to this Default User table / (ASPNETDB.mdf) created by VS.
View 5 Replieshow to set a specific path (e.g. apppath or d:/myfolder) to all session objects across my ASP.NET 2.0 (state server configured) application so that all sessions will save/store in myfolder only.
View 4 RepliesI want to use the login component with forms authentication, but i don't want to use the whole package. I have a database with users in it, and i create the users manually, through another section of my site. I will authenticate them using my own functions, in the Authenticate event.
But, specifying the forms authentication in web.config, i seem to recall having seen somewhere, that i could add pages that were protected, while the rest of the site wasn't.
How do i do this? Currently, i have only 1 page that i want to protect.