Search Results

Search found 4006 results on 161 pages for 'profile'.

Page 10/161 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Low Profile AMD Cooling

    - by J. T.
    I have a few setups where I can mount two motherboards on top of each other. They are running AMD Athlon 64 x2 dual core 4200 CPU's using a very low profile CPU cooler. These coolers are loud and annoying. Does anyone know of a low profile QUIET CPU cooling solution?

    Read the article

  • Limit user profile on specific OU using Group Policy

    - by Sergei
    We have a host that will be used for creating VM clones from time to time for testing purposes.It is used actively for testing and users tend to keep a lot of files in their profiles.We would like to limit users profile size to avoid cloning unnecessary files to new VMs. Is there way to impose limit on user profile on OU level without introducing roaming profiles?

    Read the article

  • SharePoint 2010 User Profile Synchronization

    - by manemawanna
    Hello, I'm completely new to working with SharePoint and Windows Server, but last week I was given a small brief to play with SharePoint 2010 to see how I got along with it. Anyway I've set up a SharePoint server and had a mess around to get some new sites and pages created etc, but I'm now looking to have a try at importing some AD groups. As part of this I've look at these tutorials, here and here. So far I've got through to the process of starting the User Profile Service which works fine, but when I get it starting the User Profile Synchronization service it sits on starting. But when I refresh the page or go to the monitoring section it shows it as aborted. Now I'm new to administering servers like I say and when I start the User Profile Synchronization service it tries to run as NT AUTHORITY\NETWORK SERVICE and asks for a password so I've been providing it with the admin password, now I'm not sure if this is part of the issue or not as I've checked the log files and they seem to say that it doesn't have permissions, which is fair enough, but I can't see how you can change the account even if I wanted to. So if anyone could help it would be appreciated, if you need any further information to help with an answer, just let me know.

    Read the article

  • How to move your Windows User Profile to another drive in Windows 8

    - by Mark
    I like to have my user folder on a different drive (D:) than my OS is (C:). Reading the following post I decided to give it a try. All went quite well, untill I found out that my Windows 8 Apps won't execute anymore (other than that I didn't noticed any problems). My apps do work, while using an account that isn't moved. In the eventviewer I've found error messages like these: App <Microsoft.MicrosoftSkyDrive> crashed with an unhandled Javascript exception. App details are as follows: Display Name:<SkyDrive>, AppUserModelId: <microsoft.microsoftskydrive_8wekyb3d8bbwe!Microsoft.MicrosoftSkyDrive> Package Identity:<microsoft.microsoftskydrive_16.4.4204.712_x64__8wekyb3d8bbwe> PID:<4452>. The details of the JavaScript exception are as follows Exception Name:<WinRT error>, Description:<Loading the state store failed. > , HTML Document Path:</modernskydrive/product/skydrive/App.html>, Source File Name:<ms-appx://microsoft.microsoftskydrive/jx/jx.js>, Source Line Number:<1>, Source Column Number:<27246>, and Stack Trace: ms-appx://microsoft.microsoftskydrive/jx/jx.js:1:27246 localSettings() ms-appx://microsoft.microsoftskydrive/jx/jx.js:1:51544 _initSettings() ms-appx://microsoft.microsoftskydrive/jx/jx.js:1:54710 getApplicationStatus(boolean) ms-appx://microsoft.microsoftskydrive/jx/jx.js:1:48180 init(object) ms-appx://microsoft.microsoftskydrive/jx/jx.js:1:45583 Application(number, boolean) ms-appx://microsoft.microsoftskydrive/modernskydrive/product/skydrive/App.html:216:13 Anonymous function(object) Using ProcMon, I see a lot of access denied messages, like these: Date & Time: 12-9-2012 9:32:20 Event Class: File System Operation: CreateFile Result: ACCESS DENIED Path: D:\Users\John\AppData\Local\Packages\microsoft.microsoftskydrive_8wekyb3d8bbwe\Settings\settings.dat TID: 2520 Duration: 0.0000149 Desired Access: Read Data/List Directory, Write Data/Add File, Read Control Disposition: OpenIf Options: Sequential Access, Synchronous IO Non-Alert, No Compression Attributes: N ShareMode: None AllocationSize: 0 Any idea how to solve this? I noticed that the app folders e.g.: D:\Users\john\AppData\Local\Packages\microsoft.microsoftskydrive_8wekyb3d8bbwe had a different owner than the old profile folder had. Old profile folder had john as owner where my new profile folder had the Administrators group as owner. Changing this didn't help unfortunately.

    Read the article

  • Terminal/Putty showing control characters (^M) after updating

    - by jaycee48
    I updated my system yesterday afternoon using the recommended updates from Update Manager. After it completed, I shutdown my system and went home for the day. I come in this morning and I am getting control characters displayed when using vi in both the standard terminal emulator, putty, and putty inside of my Windows virtual that I run with VirtualBox. I have made no other system changes and I cannot figure out how this occurred. It's as if every text file I have was created in DOS. I've searched the forums and I haven't found any answers. I am using xterm as my emulator and I checked with 3 of my coworkers and none of them are having this problem so we do not believe it is a server side issue. Especially since I've checked 3 different servers. There's nothing in my .profile other than PATH variables so I'm using the same terminal settings as everyone else. Some files are fine (I can open and read both /etc/environment and my .profile) but most of any kind of server generated log file is trash. Running cat or head on the same file displays the contents without the characters. Any ideas would be appreciated. Thanks.

    Read the article

  • How to configure KDE default settings for a new user of a group?

    - by Adobe
    I'm a sys admin on Kubuntu 11.10 machine. Where do I configure the basic config for a new user (say belonging to group "users")? Edit 1: I want to configure langauages - currently my new users get English and Bulgarian Languages. I want them to get English and Russian - and also to set Alt-CapsLock - to be the input-language-switching-combination. Edit 2: How do I configure things in /usr/share/kde4 When I do kdesudo systemsettings and save configurations - only root settings got changed - not the /usr/share/kde4 ones. Edit 3: New user gets the /etc/skel files controlling bash behaviour-appearence. What about the KDE new user's default files - where are they stored? Edit 4: Oh, I found some hints: kde4-config --path config gives a list of folders (separated by the colon) where KDE looks for configs. My machine responded with: /home/boris/.kde/share/config/ /etc/kde4/ /usr/share/kubuntu-default-settings/kde4-profile/default/share/config/ /usr/share/kde4/config/ /usr/share/desktop-base/profiles/kde-profile/share/config/ It looks like third line is where KDE takes the default options. So I found these zilions of settings - but no GUI way to configure it ((. Edit 5: Finally, I've created a dummy user, configured it, and wrote a script which gives it's settings to a given user(s). The trick - is to chown after one transfered the dot files from one user to another. I've tested it - it works fine.

    Read the article

  • Workflows for User Profile properties

    - by Nigel
    Hi Guys, I have a requirement from a client with regards to user profile properties. The requirement is as follows: We would like to setup custom user profile properties such that these values are editable by individuals via their my site. When a user edits this user profile property value, it should not be immediately visible to other users that happen to go to the individual's my site, but rather go through an approval workflow. If the value submitted is approved the user profile property value is updated. As far as I know this is not possible. I do have a work around for this but I want to ensure that I haven't missed anything before going down this path. Thanks in Advance

    Read the article

  • Fail to profile remote java app using TPTP

    - by rperez
    Hi all, I am trying to profile CPU usage using TPTP. Application to profile run on Linux RH AS5. I installed and configured Agent Controller like described here I ran the java application using the command java '-agentlib:JPIBootLoader=JPIAgent:server=standalone,file=log.trcxml;CGProf' MyApp The monitoring station is All-In-one TPTP version 4.6.2. I followed the stepes described here on Eclipse - on the "Profile Configuration" I choose a new configuration for "Attach to Agent", set the host to my remote linux machine where MyApp is running, test connection succeed and when I get to the "Agents" tab, I see "Pending...", a background process "Feching children for host" is running and can't find anything which makes it impossible to profile. Any idea?

    Read the article

  • Using Jquery to load Facebook fb:profile-pic - not working in IE

    - by Gublooo
    Hey.... I followed the tips given on Loading Facebook fb:profile via ajax In my app, I am basically loading more comments posted by the user via Jquery and along with each comment showing the user's picture using the fb:profile-pic tag This is a sample of how I'm building the string via Jquery newcomment += "<fb:profile-pic uid='"+data.fb_userid+"' height='50' width='50' /"; newcomment += ""+data.user_name+": "; newcomment += ""+data.user_comment+": "; $("#morecomments").append(newcomment); So the profile-pic was not being displayed - After reading the above link, I added if ( FB.XFBML.Host.parseDomTree ) setTimeout( FB.XFBML.Host.parseDomTree, 0 ); The weird thing now is - its working in Chrome and Firefox but not in IE Cant figure out why. Any help will be appreciated. Thanks

    Read the article

  • Combining properties made available via webservices profile service aspnet

    - by Adam
    I really wasn't sure what the title for my question could be, so sorry if it's a bit vague. I'm working on an application that uses client application services for authentication/profile management etc. In web.config for my website, I have the following profile properties like this: <properties> <add name="FirstName" type="string" defaultValue="" customProviderData="FirstName;nvarchar"/> ... Basic things like first name, last name etc. I'm exposing properties for my client app like this: <system.web.extensions> <scripting> <webServices> <authenticationService enabled="true" requireSSL="false"/> <profileService enabled="true" readAccessProperties="UserProfile" writeAccessProperties="UserProfile"/> <roleService enabled="true"/> </webServices> </scripting> </system.web.extensions> What I'm wondering is whether it's possible to bundle all the individual profile properties into a single object for client apps to utilize? I originally had all my profile data stored as members of a single class (UserProfile) but I broke it all out so that I could use the SqlTableProfileProvider to store each field as individual columns in relevant tables. I know I can create an class with members for each type, I'm just not sure if there's an easy way to create an object with all my property values (other than assigning values to this object whenever I assign to the the standalone properties). I don't think I'm explaining this very well, so I'll try an example. Say in my website profile I have FirstName and LastName as properties. For my client application profileService I want to have one ReadAccessProperty FullName. Is there some way to automatically create FullName from the existing FirstName and LastName properties without having to also have a seperate FullName property (and manually assign data to it whenever I assign data to FirstName and LastName)?

    Read the article

  • Maven profile properties are not "overriding"

    - by Nazar
    I have Maven multi-module project with such structure: parent-pom-project -- module1 -- module2 At the parent-pom-project I have such pom.xml <modules> <module>module1</module> </modules> ... <profiles> <profile> <id>local</id> <properties> <prop>local_prop</prop> </properties> </profile> <profile> <id>test</id> <modules> <module>module2</module> </modules> <properties> <prop>test_prop</prop> </properties> </profile> </profiles> At all pom.xml files I have such tag: <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> </build> At module1 and module2 in resource directory I have properties files with such text: prop=${prop} The problem is that after mvn clean install or mvn clean install -Ptest or even mvn clean install -P test I get prop=local_prop If I user test profile for build module2 is also builded, but properties are used from local profile. I use Maven 3.0.3. Anybody have any ideas?

    Read the article

  • Custom WM profile - issues with codec

    - by dominolog
    Hello I create my custom WM encoder profile. The reason I need a custom, non standard WM profile is that I need that the video resolution must be the same as input video stream. I created below profile but after I encode my video and audio with it, the WMP while loading says that the WMV1 codec is not found and prompts me for downloading WM encoder codecs. After installing them, the problem still exists. <profile version="589824" storageformat="1" name="mReplay Hi-End profile; WM Format 9; Audio &amp; Video" description="Streams: 1 audio 1 video"> <streamconfig majortype="{73647561-0000-0010-8000-00AA00389B71}" streamnumber="1" streamname="Audio Stream" inputname="Audio409" bitrate="320008" bufferwindow="-1" reliabletransport="0" decodercomplexity="" rfc1766langid="en-us" > <wmmediatype subtype="{00000161-0000-0010-8000-00AA00389B71}" bfixedsizesamples="1" btemporalcompression="0" lsamplesize="14861"> <waveformatex wFormatTag="353" nChannels="2" nSamplesPerSec="44100" nAvgBytesPerSec="40001" nBlockAlign="14861" wBitsPerSample="16" codecdata="008800000F0035E80000"/> </wmmediatype> </streamconfig> <streamconfig majortype="{73646976-0000-0010-8000-00AA00389B71}" streamnumber="2" streamname="Video Stream" inputname="Video409" bitrate="100000" bufferwindow="-1" reliabletransport="0" decodercomplexity="AU" rfc1766langid="en-us" vbrenabled="1" vbrquality="95" bitratemax="0" bufferwindowmax="0"> <videomediaprops maxkeyframespacing="80000000" quality="100"/> <wmmediatype subtype="{31564D57-0000-0010-8000-00AA00389B71}" bfixedsizesamples="0" btemporalcompression="1" lsamplesize="0"> <videoinfoheader dwbitrate="100000" dwbiterrorrate="0" avgtimeperframe="400000"> <rcsource left="0" top="0" right="0" bottom="0"/> <rctarget left="0" top="0" right="0" bottom="0"/> <bitmapinfoheader biwidth="0" biheight="0" biplanes="1" bibitcount="24" bicompression="WMV1" bisizeimage="0" bixpelspermeter="0" biypelspermeter="0" biclrused="0" biclrimportant="0"/> </videoinfoheader> </wmmediatype> </streamconfig> <streamprioritization> <stream number="1" mandatory="0"/> <stream number="2" mandatory="0"/> </streamprioritization> </profile>

    Read the article

  • How to get a profile picture from fb:friends selector

    - by malshan
    Im a Newbie to PHP and FBML(Facebook Markup Language).....so now im coding a Facebook app so I need to get profile picture and friend name when I select a name from FB:Friend Selector Select a Friend <fb:friend-selector uid="exclude_ids" name="pal" idname="friend_sel" /> I use exclude_ids to see all friends in my selector so how to get profile picture? I can get name from this but how to get the profile pic large?

    Read the article

  • Need help fixing a strange path error in bash

    - by Evan
    UPDATE Ok, I found some errors in the path which I think I fixed, but now it's not running in any case - which for some reason I think is a step forward. Thanks for suggesting the following steps, here is their output: user@computer:~$ echo $PATH /usr/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/matlab/bin:/usr/local/VoxBo/bin:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron:/usr/lib/voxbo/bin:/home/user/folder:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/games/:/usr/local/matlab/bin:/usr/local/VoxBo/bin/:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron/ user@computer:~$ typeset -p PATH declare -x PATH="/usr/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/matlab/bin:/usr/local/VoxBo/bin:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron:/usr/lib/voxbo/bin:/home/user/folder:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/games/:/usr/local/matlab/bin:/usr/local/VoxBo/bin/:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron/" user@computer:~$ type app1 app1 is /home/user/folder/app1 user@computer:~$ type app2 app2 is /home/user/folder/app2 user@computer:~$ app1 bash: /home/user/folder/app1: No such file or directory user@computer:~$ app2 bash: /home/user/folder/app2: No such file or directory user@computer:~$ /home/user/folder/app1 bash: /home/user/folder/app1: No such file or directory user@computer:~$ /home/user/folder/app2 bash: /home/user/folder/app2: No such file or directory user@computer:~$ cd /home/user/folder user@computer:~/folder$ app1 bash: /home/user/folder/app1: No such file or directory user@computer:~/folder$ ./app1 bash: ./app1: No such file or directory user@computer:~/folder$ ./app2 bash: ./app2: No such file or directory user@computer:~/folder$ ls -l total 29384 -rwxr-xr-x 1 user user 14949776 2011-02-03 11:09 app1 -rwxr-xr-x 1 user user 15137300 2011-02-03 11:10 app2 user@computer:~/folder$ Thanks for everyone's input! ORIGINAL QUESTION I have two executable files I downloaded and am trying to add to the path. They are located in /home/user/folder and the specific files are /home/user/folder/app1 /home/user/folder/app2 Both app1 and app2 have the executable flag set to all (user, group, other). I can execute the files if I am in /home/user/folder and I execute these commands ./app1 ./app2 However I can't run them from elsewhere. I added this line to my .profile PATH="$PATH:/home/user/folder" and then sourced the path with . /home/user/.profile and I can see app1 and app2 when I use command completion (pressing tab). However here is what happens when I try to run app1 or app2 with the following commands (the following only shows 'app1' but the same is true of 'app2') user@comp:~$ app1 -bash: app1: command not found user@comp:~$ /home/user/folder/app1 -bash: app1: command not found user@comp:~/folder$ ./app1 (program runs) I'm stumped :), I must have missed something simple. Thanks for your help!!

    Read the article

  • Make windows 7 client compatible with windows 2003 server

    - by caspert
    Hi, I am sysadmin for a small business with 30 clients. We have a server running windows 2003 and all the client-computers run windows XP. Now this is not an important issue, but it would be nice if it worked. My personal (home) computer is running windows 7 RC. When I bring my home-computer to work and log into the network with domain\username it logs me in just fine. Although, approving my profile, letting me into the network, including all network drives and printers, it does not download the profile fully. I do believe it might be getting the roaming profiles. So all my user- items, documents etc. attached to the profile does not show up on Windows 7. Is there any way to make it fully download the profile? as it does with Windows XP.

    Read the article

  • User Profile cannot be loaded - Windows 7

    - by Ryan
    After uninstalling an HP Vector Mouse driver, then rebooting, when Windows tries to auto log me in, i get an error message saying tyhe following: The User Profile Service failed the Login. User Profile cannot be loaded. Due to the fact that it is the only account on this PC, I cannot even go into another account. I rebooted the machine several times, before going into Safe Mode with Networking. For some reason, I cannot create a new account whilst in safe mode (I think it is to do with UAC, nothing with UAC is clickable). Thus, I am stuck. I cannot get into my account, nor can I create a new one to copy files over to. Any ideas? Thanks in advance! Ryan EDIT: System Restore was, for some reason turned off. Thus, I cannot restore to a working point.

    Read the article

  • SmartSVN - Unable to create new repository profile

    - by Sandeepan Nath
    I have just installed SmartSVN on this fedora system. The application starts (on running ./smartsvn.sh) with its usual UI but many things are not working. Creating New repository profile Trying to create a new repository profile (Repositories- Repository Profiles- Add) An Error occurred while processing an SVN command - Cannot connect to 'svn+ssh://192.168.0.103': There was a problem while connecting to 192.168.0.103:22 Quick Checkout Trying to do Quick Checkout (less configuration) An Error occurred while processing an SVN command - Malformed XML. Some Observations When I run the smartsvn.sh file like this:- ./smartsvn.sh It shows this in the console - Warning: /bin/java does not exist Could not lock /root/.smartsvn/_lock_ Switched to running instance I was using SmartSVN in another system before this where it was working. There too, it was showing the warning like Warning: /bin/java does not exist but this part was not showing:- Could not lock /root/.smartsvn/_lock_ Switched to running instance I have only JRE installed in both the systems and not JDK. So, what could be the reason? Any pointers? Thanks, Sandeepan

    Read the article

  • Cannot see main user profile directory on old vista hdd on win7

    - by chaoskreator
    I have an old laptop HDD that ran Vista that I need to get some pictures and movies off of. I've attached it via SATA cable to my new Win 7 (64 bit) machine and it mounts fine, except I can't see the main user profile in the D:\Users directory. I've changed ownership and permissions for the D: drive to my C:\ Username but still no luck. I read something about it being caused by the UAC being active on the Vista machine. Is this true? Is there a way to disable this and gain access to the main profile without putting it back into the old laptop (it's fried and won't boot)?

    Read the article

  • Child Folder inheriting a permission that parent folder does not have (NTFS)

    - by just.another.programmer
    I'm reconfiguring roaming profiles on my network to use proper NTFS security settings according to this article. I have reset the following permissions on the roaming profile parent folder: CREATOR OWNER, Full Control, Subfolder and files only User group with profiles, List folder, Create folders, This folder only System, Full Control, This folder, subfolders, and files Then I select one of the actual roaming profile folders and follow these steps to fix the NTFS settings: Click Security, Advanced Uncheck "Allow inheritable permissions..." Choose "Remove..." Recheck "Allow inheritable permissions..." Click "Apply" After I choose apply, I get the following permissions listed on the roaming profile folder: Administrators (MYDOMAIN\Administrators) Full Control, This folder only CREATOR OWNER, Full Control, Subfolders and files only System, Full Control, This folder, subfolders, and files Where is the Administrators entry coming from!? There is an entry on the root of the drive for Administrators to have full control, but the Roaming Profile Parent folder is not set to inherit any permissions, and it does not have the administrators permission.

    Read the article

  • Build a user's profile directory on creation in batch

    - by Moses
    I have a batch script that I use when I set up new Windows 7 PCs that creates a user based on a variable, creates a folder on their desktop, then shares it: @echo off SET /p unitnumber="Enter unit number: " net user unit%unitnumber% password /add /expire:never MD "C:/Users/unit%unitnumber%/Desktop/Accounting #%unitnumber%" runas /user:administrator "net share "Accounting#%unitnumber%"="C:/Users/unit%unitnumber%/Desktop/Accounting#%unitnumber"" I discovered that the share that is created is overwritten when the newly created user first logs on, because Windows creates builds their profile directory at that time. Is there any way to initiate a build of a user's profile directory in the batch file just after creating the it? The only thing that looks useful is the /homedir:pathname switch for the net user command, but I believe that option assumes the directory already exists. Other than that web research hasn't been fruitful. I'd be to use whatever to get this done as long as I can incorporate/launch it from the batch. Any suggestions?

    Read the article

  • Windows 8: User profile service service failed the login. User Profile can not be loaded

    - by Ryanmt
    I removed accounts that were hosted on a separate drive before upgrading to windows 8 from 7 yesterday. However, now I get the User profile service service failed the login. User Profile can not be loaded. error whenever I try to access any new account. I've attempted it: from safe mode (suggestions here ) net user test \ADD Editing the permissions on the %sysdrive%\Users\Default folder to ensure it is readable Every attempt is met with the same error. Additionally, I do not see any new entries created in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry entry. I'm not sure I understand why a failed user creation wouldn't trigger an error... but that seems to be what is happening here.

    Read the article

  • Automatic profile load on boot

    - by AnthonyW
    Is there any way to configure a computer to login automatically at bootup and then IMMEDIATELY switch users? The purpose is to trigger the profile loading process for the assumed user so that when they go to login, their profile loads instantaneously. Yet, the immediate user switch means that the login password is still required before any actual use. A few of the attempts I have made require storing the password in plain-text for the system to use. Needless to say that is undesireable. I have been looking for this solution for years; if anyone knows of a better solution to skinning this cat I am all ears. EDIT: tsdiscon command will Lock the workstation.

    Read the article

  • ASP.NET MVC: Using ProfileRequiredAttribute to restrict access to pages

    - by DigiMortal
    If you are using AppFabric Access Control Services to authenticate users when they log in to your community site using Live ID, Google or some other popular identity provider, you need more than AuthorizeAttribute to make sure that users can access the content that is there for authenticated users only. In this posting I will show you hot to extend the AuthorizeAttribute so users must also have user profile filled. Semi-authorized users When user is authenticated through external identity provider then not all identity providers give us user name or other information we ask users when they join with our site. What all identity providers have in common is unique ID that helps you identify the user. Example. Users authenticated through Windows Live ID by AppFabric ACS have no name specified. Google’s identity provider is able to provide you with user name and e-mail address if user agrees to publish this information to you. They both give you unique ID of user when user is successfully authenticated in their service. There is logical shift between ASP.NET and my site when considering user as authorized. For ASP.NET MVC user is authorized when user has identity. For my site user is authorized when user has profile and row in my users table. Having profile means that user has unique username in my system and he or she is always identified by this username by other users. My solution is simple: I created my own action filter attribute that makes sure if user has profile to access given method and if user has no profile then browser is redirected to join page. Illustrating the problem Usually we restrict access to page using AuthorizeAttribute. Code is something like this. [Authorize] public ActionResult Details(string id) {     var profile = _userRepository.GetUserByUserName(id);     return View(profile); } If this page is only for site users and we have user profiles then all users – the ones that have profile and all the others that are just authenticated – can access the information. It is okay because all these users have successfully logged in in some service that is supported by AppFabric ACS. In my site the users with no profile are in grey spot. They are on half way to be users because they have no username and profile on my site yet. So looking at the image above again we need something that adds profile existence condition to user-only content. [ProfileRequired] public ActionResult Details(string id) {     var profile = _userRepository.GetUserByUserName(id);     return View(profile); } Now, this attribute will solve our problem as soon as we implement it. ProfileRequiredAttribute: Profiles are required to be fully authorized Here is my implementation of ProfileRequiredAttribute. It is pretty new and right now it is more like working draft but you can already play with it. public class ProfileRequiredAttribute : AuthorizeAttribute {     private readonly string _redirectUrl;       public ProfileRequiredAttribute()     {         _redirectUrl = ConfigurationManager.AppSettings["JoinUrl"];         if (string.IsNullOrWhiteSpace(_redirectUrl))             _redirectUrl = "~/";     }              public override void OnAuthorization(AuthorizationContext filterContext)     {         base.OnAuthorization(filterContext);           var httpContext = filterContext.HttpContext;         var identity = httpContext.User.Identity;           if (!identity.IsAuthenticated || identity.GetProfile() == null)             if(filterContext.Result == null)                 httpContext.Response.Redirect(_redirectUrl);          } } All methods with this attribute work as follows: if user is not authenticated then he or she is redirected to AppFabric ACS identity provider selection page, if user is authenticated but has no profile then user is by default redirected to main page of site but if you have application setting with name JoinUrl then user is redirected to this URL. First case is handled by AuthorizeAttribute and the second one is handled by custom logic in ProfileRequiredAttribute class. GetProfile() extension method To get user profile using less code in places where profiles are needed I wrote GetProfile() extension method for IIdentity interface. There are some more extension methods that read out user and identity provider identifier from claims and based on this information user profile is read from database. If you take this code with copy and paste I am sure it doesn’t work for you but you get the idea. public static User GetProfile(this IIdentity identity) {     if (identity == null)         return null;       var context = HttpContext.Current;     if (context.Items["UserProfile"] != null)         return context.Items["UserProfile"] as User;       var provider = identity.GetIdentityProvider();     var nameId = identity.GetNameIdentifier();       var rep = ObjectFactory.GetInstance<IUserRepository>();     var profile = rep.GetUserByProviderAndNameId(provider, nameId);       context.Items["UserProfile"] = profile;       return profile; } To avoid round trips to database I cache user profile to current request because the chance that profile gets changed meanwhile is very minimal. The other reason is maybe more tricky – profile objects are coming from Entity Framework context and context has also HTTP request as lifecycle. Conclusion This posting gave you some ideas how to finish user profiles stuff when you use AppFabric ACS as external authentication provider. Although there was little shift between us and ASP.NET MVC with interpretation of “authorized” we were easily able to solve the problem by extending AuthorizeAttribute to get all our requirements fulfilled. We also write extension method for IIdentity that returns as user profile based on username and caches the profile in HTTP request scope.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >