Security :: Show The Address Property For Company Users?
Sep 17, 2010
I have been playing a bit with ASP.NET MVC 2 using VWD 2010.After a bit of struggling with profiles(thank you MS for putting 2 web.config files in the solution...) I decided that after all I like this technology. I always thought that dotNET would be great for server side stuff and I've been proven right.Anyhow, I'm gonna start a real project now and I want to do something weird(yes, I know, I shouldn't be wanting to do weird things, but it's just beyond me :-) ): say I have a company website with roles and a forum.When I click on the nickname of a user, I want to bring his/her profile up - just like you would be doing with any decent forum out there. Well, my final idea is a tad more interesting in this regard, but let's stick it at that: click and see profile page.Problem is, I want this profile to be different for company employees and users.
I want some general informations such as first and last name, date of birth, photo, etc and then for instance I do not want to show the address property for company users. Yes I know I might want to put the company address there or leave it at all blank and I would rather not display it at all.From what I gather about profiles, this is possible only using views and checking for the roles, doing something like:
I've got a pretty simple vb.net page that has a bunch of data listed in a datagrid and each row in the datagrid has an accompanying .pdf form listed in a column. The user reviews the data, and if needed clicks on the hyperlink that opens the .pdf in another IE browser window. After reviewing the .pdf in the other window, the user may need to dowload it to their pc to add notes, highlights, text, etc. Since they have the .pdf open in the browser window on the pc, is it possible to then just drag/drop the .pdf to their desktop to edit locally?? If that isn't possible in .NET what other options are there?
Right-click | Save As isn't a good enough option, becuase the user won't know if they need to download and edit it until the .pdf is actually open. My initial thought of once they have it open in IE, just do a file, save as, won't work either, as it requires too many clicks.
In an asp.net webform app, I need to restrict the logged in user to show data only for their company. This is a primary key of my topmost table. How to I set that based off the user. I imagine I would have another table with some user ID mapped to company ID?
I'm using membership that created by asp.net configuration when you create users with roles when you create a user for your website using asp.net configuration in Visual Studio
After uploading my project and creating the Database, I can't login using the users that i have created, i'm 100% sure im using the right username and password but still can't login but they are working 100% in my local DB
after few search in google i found the solution is to execute the following command:
I need a way to block users from their IP if necessary. What's the best way to approach this? Can I use Request.ServerVariables["REMOTE_ADDR"] and store the ip address as a string in the DB?
I am currently useing forms authenticantion with users set up with the Membership API and I have there other information like first name and work phone number stored useing the Profiles API. I want to create a company directory useing a grid view to display every user and there profile information. I can use Membership.GetAllUsers() or ProfileManager.GetAllProfiles() but it does not list any of the custom profile information like name and phone. What is the best way to get a grid view to show all the user information?
I have some webforms and the main page grabs the users email address when they login and a UserID. It's not uncommon for the user to keep the web page open all day. Is it good practice to store the email address and ID as a session variable and up the timeout to say 10 hours? Or is there a better way? My concern is A) Session variables timing out before the user login timesout B) Doing this incorrectly.
I have two tables, both contains same properties. The problem is the address spellings MAY vary between table 1 and table 2 but they are actualy same properties. In my sql statement it list out the property that has exactly the same spellling. How do I match the two tables addresses? I heard about fuzzy algorithm but how do I apply it here. I know it wont be perfect but it will be close (check my sql below) I use sql server 05.
Example
Table 1 - 123 greenwood hwy - 123 halo street Table 2 - 123 greenwood highway - 123 halo street SELECT table1.address,table2.street_address FROM table1 INNER JOIN able2 ON table1.address = table2.street_address
My Output returns only one property that has same exact address spellings
We have implemented the ASP membership and roles..and we would like to display the users currently logged in and also display the number of users online so we can display that on the page. The list of users woudl only be available to our admins. BUt the number of users will show for everyone.
in my asp.net+vb web page which is use din INTRANET web . In a page i want to restrict the browsing for four peoples only, so that i used a code like below.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ipaddress As String ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If ipaddress = "" OrElse ipaddress Is Nothing Then ipaddress = Request.ServerVariables("REMOTE_ADDR") End If iptxt.Text = (ipaddress) If iptxt.Text = ("192.168.0.3") Then Response.Redirect("err.aspx") End If end sub
in my asp.net+vb web page which is use din INTRANET web . In a page i want to restrict the browsing for four peoples only, so that i used a code like below.
ProtectedSubPage_Load(ByVal sender AsObject,ByVal e AsSystem.EventArgs)HandlesMe.LoadDim ipaddress AsString ipaddress =Request.ServerVariables("HTTP_X_FORWARDED_FOR")If ipaddress =""OrElse ipaddress IsNothingThen ipaddress =Request.ServerVariables("REMOTE_ADDR")EndIf iptxt.Text=(ipaddress) If iptxt.Text=("192.168.0.3")ThenResponse.Redirect("err.aspx")EndIf
i have a asp.net web with vb code and sql database. i am willing to store the details of the users as ip,computer name and time of using the web is it possible.
I just realized after i created a test account i was not in any roles. Is there a way to automically add new users into the role Users? Have i missed this some where?