Search Results

Search found 15797 results on 632 pages for 'session variables'.

Page 253/632 | < Previous Page | 249 250 251 252 253 254 255 256 257 258 259 260  | Next Page >

  • How to use ssh-agent (and graphic passphrase dialog) in Kubuntu 10.10?

    - by halo
    I have recently switched from Ubuntu to kubuntu, both version 10.10. Unfortunately in KDE the ssh passphrase dialog doesn't work out of the box. Everytime my ssh private key is used I need to enter my password. This is neither secure nor comfortable. I have done comprehensive research on the net but only found out dated documentation. Several things I tried didn't work out. Current status: SSH setup working with direct passphrase input ssh-agent running in X session $SSH_AUTH_SOCK set to ssh-agent's socket in X session How to enable ssh-agent for keeping the passphrase in memory for ~15mins and as a bonus always use a graphical dialog for its input? I use asymmetric SSH key pairs for pushing/pulling in Git VCS logging remotely into different server systems

    Read the article

  • How to use ssh-agent (and graphic passphrase dialog) in Kubuntu 10.10?

    - by halo
    I have recently switched from Ubuntu to kubuntu, both version 10.10. Unfortunately in KDE the ssh passphrase dialog doesn't work out of the box. Everytime my ssh private key is used I need to enter my password. This is neither secure nor comfortable. I have done comprehensive research on the net but only found out dated documentation. Several things I tried didn't work out. Current status: SSH setup working with direct passphrase input ssh-agent running in X session $SSH_AUTH_SOCK set to ssh-agent's socket in X session How to enable ssh-agent for keeping the passphrase in memory for ~15mins and as a bonus always use a graphical dialog for its input? I use asymmetric SSH key pairs for pushing/pulling in Git VCS logging remotely into different server systems

    Read the article

  • Windows port forwarding

    - by carlesso
    This is the scenario: A Windows XP client A Linux Server The client is natted/firewalled/unreacheable from outside, the linux server is public. I need to allow the client, once upon some conditions, to expose the remote desktop port (3389) on the Linux Server, somethig like ssh -R 3389:localhost:3389. I dream it as a service, or something like that so I can start and stop the "forwarding-session" on my needs. I've to pilot this session from some program-language (python or ruby mostly). Any hint? Thanks in advance.

    Read the article

  • Manually forcing TCP connection to retry

    - by Vi
    I have a TCP connection (SSH session to some computer for example) Network suddenly goes down and drops all packets (disconnected cable, out of range). TCP resends packets again and again, retrying with increasing delays. I see the problem and plug the cable back (or restore network somehow). TCP connection finally successfully resends some packet and continues. The problem is that I need to wait for a some timeout on point 5. I want to use my opened SSH session now and not wait for 5-10 seconds until it finds out that connection is working again. How to force all TCP connections to resend data without now in GNU/Linux?

    Read the article

  • Mitigating the 'firesheep' attack at the network layer?

    - by pobk
    What are the sysadmin's thoughts on mitigating the 'firesheep' attack for servers they manage? Firesheep is a new firefox extension that allows anyone who installs it to sidejack session it can discover. It does it's discovery by sniffing packets on the network and looking for session cookies from known sites. It is relatively easy to write plugins for the extension to listen for cookies from additional sites. From a systems/network perspective, we've discussed the possibility of encrypting the whole site, but this introduces additional load on servers and screws with site-indexing, assets and general performance. One option we've investigated is to use our firewalls to do SSL Offload, but as I mentioned earlier, this would require all of the site to be encrypted. What's the general thoughts on protecting against this attack vector? I've asked a similar question on StackOverflow, however, it would be interesting to see what the systems engineers thought.

    Read the article

  • systemctl (Fedora 17) and interacting spawned processes's consoles

    - by Sean
    Introduction I've recently upgraded to Fedora 17 and I'm getting used to the newer systemctl daemon manager versus shell init scripts. A feature I need on some of my daemons is the ability to interact with their consoles because unclean shutdowns not initiated by the process itself can cause database corruption. So, performing a systemctl stop service-name.service for example might cause irreversible data loss. These consoles read user input through stdin or similar methods, so what I've been doing on my old OS is to place those daemons foregrounded in a screen session, and I suspended that screen session with ^A ^z. It's also worth noting that I've now made systemctl do this automatically if the computer reboots, but it still doesn't solve my potential data corruption problem I'm trying to avoid. My Question Is there a way to use systemctl in order to directly interact with the console of processes it spawns? Can I hook a process through systemctl to get access to its console? Thanks You guys always give great answers, so I'm turning to you!

    Read the article

  • How can I tell what command is running on the remote end of an ssh connection?

    - by user268385
    Tl;dr - how do I find the name of the command (eg $BASH_COMMAND) running on the remote end of an ssh connection? ... My example setup is two tmux vertical panes, LH pane runs a local vim session with vertical split, RH pane runs an ssh session running vim, again with a vertical split. Using tmux-navigator I can navigate from left to right over the first 3 vim buffers, but the 4th (far right hand one) is inaccessible. The reason for this is that tmux-navigator tests the value of 'pane_current_command' and compares it to 'vim' before deciding which keystrokes to dispatch. On the right hand tmux pane, the current command is 'ssh' and not 'vim'. What I want to do is test for (pane_current_command =~ 'ssh'), and if so, examine the command that is running on the far side of the connection? I cannot find a way to get hold of this, so any suggestions would be welcome? For information, the problem is almost the same as this one, but without the nested tmux sessions: https://github.com/christoomey/vim-tmux-navigator/issues/12

    Read the article

  • transparently set up Windows 7 as remote workstation

    - by Áxel
    Maybe is a very basic question, but I can't find the exact terms to Google for it and find the concrete answer to my doubt. Suppose we have several PCs in which individual employees work. One of them has an extremely powerful CPU, and it's very useful to use that computer to perform heavy computations, but go there and set up your task means its user has to stop working for a while. Is it possible to allow a secondary user account to remotly log in, for example via Remote Desktop, and work with a full user environment, while the main user keeps working under his user session? I've used remote desktop many times in the past, but it always blocked current user session, or even terminated it. Lots of thanks in advance guys.

    Read the article

  • Remote Desktop closes with Fatal Error (Error Code: 5)

    - by Swinders
    We have one PC (Windows XP SP3) that we can not log onto using a Remote Desktop session. Logging on to the PC directly (sitting in front of it using the connected keyboard and monitor) work fine. From a second PC (tried a number of different ones but all Windows XP SP3) I run 'mstsc' and type in PC name to connect to. This shows the login box which we can enter the correct login details and click OK. Within a few second we get an error: Title: Fatal Error (Error Code:5) Error: Your Remote Desktop session is about to end. This computer might be low on virtual memory. Close your other programs, and then try connecting to the remote computer again. If the problem continues, contact your network administrator or technical support. None of the computers we are using are low on memory (2Gb+) and we let windows manage the virtual memory side of things. We do not see this with any other PC and do use Remote Desktop in meeting rooms to connect to user PCs with no problems.

    Read the article

  • Seeing double-cursor in 'recursive RDP'

    - by John
    I'm using a Virtual PC VM on my PC to connect to a remote PC using RDP over a VPN. It works just fine except that in the RDP session, I often see a double mouse cursor... I get a standard mouse-arrow and the context-specific cursor such as a caret or hourglass. It's not a big problem but rather annoying and I wondered if there's any way to fix it, or at least understand where it comes from? Is it because I'm effectively running one RDP session from inside another? My host PC runs W7, my local VM runs XP, and the remote PC access using RDP is W7. Thankyou for any help.

    Read the article

  • TCP Sessions and IP Changes

    - by Kyle Brandt
    What happens to a TCP session when the IP of a client changes? I did a simple test of having netcat listen on a port, and connecting to that port from a client machine. I then changed the IP of the client while that nc session was open and sent some data, no data was received by server after changing the IP. I know they are different layers, but does TCP use IPs for part of how it distinguishes sessions? Does my example not work because of how the application handles it, or is this not working because of something happening at TCP/IP/Ethernet layers? Does this depend on the OS implementation? ( I am most interested in Linux at the moment)

    Read the article

  • Use SSH reverse tunnel to bypass VPN [on hold]

    - by John J. Camilleri
    I have shell access to a server M, but I need to log into a VPN on my machine L in order to access it. I want to be able to get around this VPN, and I've heard I can do this by creating a reverse SSH tunnel and using a intermediate server E (which I can access without the VPN). This is what I am trying: Turn on VPN on L, open SSH session to M On M, execute the command: ssh -f -N -T -R 22222:localhost:22 user@E From L, try to open SSH session to E on port 22222, hoping to end up at M Step 2 seems to work without any complaint, but on step 3 I keep getting "connection refused". I have made sure that port 22222 is open on E: 7 ACCEPT tcp -- anywhere anywhere tcp dpt:22222 I'm pretty new to SSH tunnelling and not sure what the problem could be. Any ideas what I can try?

    Read the article

  • Where are incoming messages queued/stored when sendmail is communicating with a milter?

    - by Mike B
    CentOS 5.x | SendMail I'd like to better understand how milter hand-offs work. We a remote MTA initiates an SMTP session, my understanding is that Sendmail hands the message data off to the milter during that session. Where/how is this message data stored? Is this all done in memory? Or is there a "queue" area where message data for milter is stored for pickup by the milter? If it helps, let's say I'm calling a milter like this: INPUT_MAIL_FILTER(`foo', `S=unix:/var/lib/foo/foo.sock, F=T, T=C:5m;S:3m;R:5m;E:5m')dnl

    Read the article

  • How to get a remote desktop / X11 with ubuntu 10.04 LTS from mac os x?

    - by cwd
    I am running Snow Leopard OS X 10.6 and I have X11 installed. I also have ubuntu 10.04 LTS running on a remote machine. I have root privileges. So far I haven't really installed anything besides the operating system. This was done in an amazon aws type of way. I see people talking about getting gnome or a "remote desktop" type of thing working, but I'm not sure how to go about this. I connected and then typed in gnome-session but nothing happened. Maybe I don't have that thing installed yet? Can someone point me in the right direction? Also, is it possible to just start an X11 session with a single app, like notepad or a file and folder browser?

    Read the article

  • Windows 7 persistent remote desktop

    - by jjedwardsja
    I have a Windows 7 x64 machine that I remote desktop into. The problem I have is when I log into the machine it loads the desktop fine. Once I close the remote desktop (no official log out.) and then log back in it reloads the desktop. I want it to preserve the session I was working in last time rather than resetting the session. This is a headless machine so I log in initial and always from a remote machine.

    Read the article

  • How do I know I'm running inside a linux "screen" or not?

    - by Jun Chen
    The "screen" refers to a program mentioned in How to reconnect to a disconnected ssh session . That is a good facility. But there is a question I'd really like to know. How do I know whether I'm running inside a "screen"? The difference is: If yes, I know I can safely close current terminal window, e.g., close a PuTTY window, without losing my shell(Bash etc) session. If no, I know I have to take care of any pending works before I close the terminal window. Better, I'd like this status to be displayed in PS1 prompt so that I can see it any time automatically.

    Read the article

  • Where's my tab completion and up-arrow behavior? (Ubuntu 10.04)

    - by pastorius
    I'm new to Linux, trying Ubuntu 10.04, preconfigured by host. When I log in (SSH) using the preconfigured account, the shell prompt is: user@hostname:~$ The up arrow scrolls through the list of recent shell commands, and tab-completion works as expected. However, when I create an account and log in (SSH) using that account, the shell prompt is simply "$", and the up arrow just prints a control character (^[[A). Can anyone tell me how to get my prompt, tab-completion, and up-arrow behavior set up? The fact that I'm getting control characters when I up-arrow makes me think that my account (or session) is in some mode I'm unfamiliar with. I know there is tab-completion code stored in bashrc that I can uncomment, but that doesn't seem to have any effect, even after logging out and logging back in. Am I in some strange mode when I SSH in with the new account, or are there just some session/account settings I need to set up, and can find information for anywhere on the Internet if I just knew what to look for?

    Read the article

  • Zentyal Server : Setting up secure VPN Client

    - by JustShrey
    I have officially exhausted pretty much all my google-fu trying to set this up so I'm asking my question here. For the record, I am a mid level rookie who has played around with servers in his spare time but have never worked with Zentyal Server. Now, I have been able to set up the server as a gateway, with one Network card being external and the other facing the internal Network. The Internal network computers are able to access the internet without any issues. What I need to do is to setup a open-vpn client on the central server so that all Internet data goes though the secure VPN session. As far as I can see, I can't set up the vpn session through the web admin page. Could somebody point me in the right direction? How would I go about doing this? Regards Shreyas

    Read the article

  • Unable to read DVD on laptop

    - by usabilitest
    I have a DVD disk that I created on an HP laptop. I believe it was setup to be accessed as a USB device. I do not have that laptop any longer and I still would like to access the files on that DVD from my current DELL laptop but it can not open the disk. My guess, the session nwas not closed on the disk and for some reason the new laptop can not read it. My question is, is there any way I can access the files using new laptop, of do I need to find similar HP to try to access the files and possibly close the session? Are there any utilities out there that could help me? Thanks.

    Read the article

  • Should I host my entire web application using https?

    - by user54455
    Actually my only requirement for using SSL encryption is that when a user logs in, the password is transferred encrypted. However after reading a bit about protocol switching, that an HTTPS session can't be taken over as an HTTP session etc. I've been asking myself if it's so bad to just have the entire application use HTTPS only. What are the reasons against it and how would you rate their importance? Please also mention: How much performance do I lose on server side (roughly)? How much performance do I lose on client side (roughly)? Any other problems on server / client side?

    Read the article

  • SQL SERVER – Concat Function in SQL Server – SQL Concatenation

    - by pinaldave
    Earlier this week, I was delivering Advanced BI training on the subject of “SQL Server 2008 R2″. I had great time delivering the session. During the session, we talked about SQL Server 2010 Denali. Suddenly one of the attendees suggested his displeasure for the product. He said, even though, SQL Server is now in moving very fast and have proved many times a good enterprise solution, it does not have some basic functions. I naturally asked him for example and he suggested CONCAT() which exists in MySQL and Oracle. The answer is very simple – the equalent function in SQL Server to CONCAT() is ‘+’ (plus operator without quotes). Method 1: Concatenating two strings SELECT 'FirstName' + ' ' + 'LastName' AS FullName Method 2: Concatenating two Numbers SELECT CAST(1 AS VARCHAR(10)) + 'R' + CAST(2 AS VARCHAR(10)) Method 3: Concatenating values from table columns SELECT FirstName + ' ' + LastName FROM AdventureWorks.Person.Contact Well, this may look very simple but sometime it is very difficult to find the information for simple things only. Do you have any such example which you would like to share with community? Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL String, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Ubuntu 13.10 install ISO crashes on VirtualBox Mac 4.3

    - by John Allsup
    Does anybody know what to do about this? Machine is a 2008 Core 2 Duo iMac with 4GB RAM. (And 64bit Debian 7 boots OK, but I've not tried installing under the latest version of VirtualBox as I have just upgraded VBox today.) VirtualBox 4.3, upon trying to boot a machine with the Ubuntu 13.10 (64bit) iso (with the VM configured for Ubuntu 64bit) crashes, with the following information: Failed to open a session for the virtual machine Ubuntu64. The VM session was aborted. Result Code: NS_ERROR_FAILURE (0x80004005) Component: SessionMachine Interface: ISession {12f4dcdb-12b2-4ec1-b7cd-ddd9f6c5bf4d} === Head of crash dump is below Process: VirtualBoxVM [716] Path: /Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM Identifier: VirtualBoxVM Version: ??? (???) Code Type: X86 (Native) Parent Process: VBoxSVC [644] Date/Time: 2013-10-17 22:58:23.679 +0100 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000040 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 com.apple.CoreFoundation 0x92a25c03 CFSetApplyFunction + 83 1 com.apple.framework.IOKit 0x95557ad4 __IOHIDManagerInitialEnumCallback + 69 2 com.apple.CoreFoundation 0x92a2442b __CFRunLoopDoSources0 + 1563 3 com.apple.CoreFoundation 0x92a21eef __CFRunLoopRun + 1071 4 com.apple.CoreFoundation 0x92a213c4 CFRunLoopRunSpecific + 452 5 com.apple.CoreFoundation 0x92a211f1 CFRunLoopRunInMode + 97 6 com.apple.HIToolbox 0x98eb5e04 RunCurrentEventLoopInMode + 392 7 com.apple.HIToolbox 0x98eb5af5 ReceiveNextEventCommon + 158 8 com.apple.HIToolbox 0x98eb5a3e BlockUntilNextEventMatchingListInMode + 81 9 com.apple.AppKit 0x9971b595 _DPSNextEvent + 847 10 com.apple.AppKit 0x9971add6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156 11 com.apple.AppKit 0x996dd1f3 -[NSApplication run] + 821 12 QtGuiVBox 0x019f19e1 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1505 13 QtCoreVBox 0x018083b1 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65 14 QtCoreVBox 0x018086fa QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 170 15 QtGuiVBox 0x01eea9e5 QDialog::exec() + 261 16 VirtualBox.dylib 0x011234b8 TrustedMain + 1108104 17 VirtualBox.dylib 0x01126d68 TrustedMain + 1122616 18 VirtualBox.dylib 0x010fac19 TrustedMain + 942057 19 VirtualBox.dylib 0x010f9b3d TrustedMain + 937741 20 VirtualBox.dylib 0x010f81dd TrustedMain + 931245 21 VirtualBox.dylib 0x010f85b8 TrustedMain + 932232 22 VirtualBox.dylib 0x0109d4f8 TrustedMain + 559304 23 VirtualBox.dylib 0x0101521e TrustedMain + 1518 24 ...virtualbox.app.VirtualBoxVM 0x00002e7e start + 2766 25 ...virtualbox.app.VirtualBoxVM 0x000024b5 start + 261 26 ...virtualbox.app.VirtualBoxVM 0x000023e5 start + 53 ==== And please somebody fix the code so that you can just delimit large blocks of code at the start and the end without indenting every line manually by 4 spaces.

    Read the article

  • Event on SQL Server 2008 Disk IO and the new Complex Event Processing (StreamInsight) feature in R2

    - by tonyrogerson
    Allan Mitchell and myself are doing a double act, Allan is becoming one of the leading guys in the UK on StreamInsight and will give an introduction to this new exciting technology; on top of that I'll being talking about SQL Server Disk IO - well, "Disk" might not be relevant anymore because I'll be talking about SSD and IOFusion - basically I'll be talking about the underpinnings - making sure you understand and get it right, how to monitor etc... If you've any specific problems or questions just ping me an email [email protected]. To register for the event see: http://sqlserverfaq.com/events/217/SQL-Server-and-Disk-IO-File-GroupsFiles-SSDs-FusionIO-InRAM-DBs-Fragmentation-Tony-Rogerson-Complex-Event-Processing-Allan-Mitchell.aspx 18:15 SQL Server and Disk IOTony Rogerson, SQL Server MVPTony's Blog; Tony on TwitterIn this session Tony will talk about RAID levels, how SQL server writes to and reads from disk, the effect SSD has and will talk about other options for throughput enhancement like Fusion IO. He will look at the effect fragmentation has and how to minimise the impact, he will look at the File structure of a database and talk about what benefits multiple files and file groups bring. We will also touch on Database Mirroring and the effect that has on throughput, how to get a feeling for the throughput you should expect.19:15 Break19:45 Complex Event Processing (CEP)Allan Mitchell, SQL Server MVPhttp://sqlis.com/sqlisStreamInsight is Microsoft’s first foray into the world of Complex Event Processing (CEP) and Event Stream Processing (ESP).  In this session I want to show an introduction to this technology.  I will show how and why it is useful.  I will get us used to some new terminology but best of all I will show just how easy it is to start building your first CEP/ESP application.

    Read the article

  • Speaker at developer conferences and user group meetings

    Catching up on a couple of sessions I did in the past. This article gives an overview of some of my activities. Mainly at the annual German Visual FoxPro Developer Conference also known as SQL-Server & ASP.NET Conference in Frankfurt. The below listed entries are excerpts from the original Conference Coverage documents you'll find on UniversalThread. German Visual FoxPro Developer Conference 2002 (1 session - Vendor session about Active FoxPro Pages 3.0) German Visual FoxPro Developer Conference 2003 (2.5 sessions - Visual FoxPro running on Linux) German Visual FoxPro Developer Conference 2004 (4 sessions - 2x Active FoxPro Pages, VFP on Linux, and VFP using additional databases) German Visual FoxPro Developer Conference 2005 (4 sessions - RegEx, XML, XSLT, and using free (as in beer) development tools) German Visual FoxPro Developer Conference 2006 (3 sessions - .NET interop via COM, writing own CLR host in VFP, and Active FoxPro Pages) Furthermore, I did a couple of (hopefully) interesting sessions at various user group meetings in Speyer and Stuttgart. A more comprehensive list is available under Presentations (in German language). And last but not least, back in May 2005 Microsoft Germany invited me to host a WebCast for MSDN on how to use 'Visual FoxPro mit Visual Studio 2005'. Unfortunately, I was too unexperienced and too nervous (first time ever), we experienced technical issues with the microphone, and the obviously low quality of recording demanded to replace it by a whole series on Visual FoxPro 9.0. The webcast covered the same topics I already described in other articles here on my blog. Despite the desaster I'd like to thank Ralf Westphal for his kind words afterwards - I really felt bad. Eventually, you might ask yourself why it stopped by the end of 2006... Well, new chapter in my life: Mauritius!

    Read the article

  • ASP.NET Web Forms Extensibility: Providers

    - by Ricardo Peres
    Introduction This will be the first of a number of posts on ASP.NET extensibility. At this moment I don’t know exactly how many will be and I only know a couple of subjects that I want to talk about, so more will come in the next days. I have the sensation that the providers offered by ASP.NET are not widely know, although everyone uses, for example, sessions, they may not be aware of the extensibility points that Microsoft included. This post won’t go into details of how to configure and extend each of the providers, but will hopefully give some pointers on that direction. Canonical These are the most widely known and used providers, coming from ASP.NET 1, chances are, you have used them already. Good support for invoking client side, either from a .NET application or from JavaScript. Lots of server-side controls use them, such as the Login control for example. Membership The Membership provider is responsible for managing registered users, including creating new ones, authenticating them, changing passwords, etc. ASP.NET comes with two implementations, one that uses a SQL Server database and another that uses the Active Directory. The base class is Membership and new providers are registered on the membership section on the Web.config file, as well as parameters for specifying minimum password lengths, complexities, maximum age, etc. One reason for creating a custom provider would be, for example, storing membership information in a different database engine. 1: <membership defaultProvider="MyProvider"> 2: <providers> 3: <add name="MyProvider" type="MyClass, MyAssembly"/> 4: </providers> 5: </membership> Role The Role provider assigns roles to authenticated users. The base class is Role and there are three out of the box implementations: XML-based, SQL Server and Windows-based. Also registered on Web.config through the roleManager section, where you can also say if your roles should be cached on a cookie. If you want your roles to come from a different place, implement a custom provider. 1: <roleManager defaultProvider="MyProvider"> 2: <providers> 3: <add name="MyProvider" type="MyClass, MyAssembly" /> 4: </providers> 5: </roleManager> Profile The Profile provider allows defining a set of properties that will be tied and made available to authenticated or even anonymous ones, which must be tracked by using anonymous authentication. The base class is Profile and the only included implementation stores these settings in a SQL Server database. Configured through profile section, where you also specify the properties to make available, a custom provider would allow storing these properties in different locations. 1: <profile defaultProvider="MyProvider"> 2: <providers> 3: <add name="MyProvider" type="MyClass, MyAssembly"/> 4: </providers> 5: </profile> Basic OK, I didn’t know what to call these, so Basic is probably as good as a name as anything else. Not supported client-side (doesn’t even make sense). Session The Session provider allows storing data tied to the current “session”, which is normally created when a user first accesses the site, even when it is not yet authenticated, and remains all the way. The base class and only included implementation is SessionStateStoreProviderBase and it is capable of storing data in one of three locations: In the process memory (default, not suitable for web farms or increased reliability); A SQL Server database (best for reliability and clustering); The ASP.NET State Service, which is a Windows Service that is installed with the .NET Framework (ok for clustering). The configuration is made through the sessionState section. By adding a custom Session provider, you can store the data in different locations – think for example of a distributed cache. 1: <sessionState customProvider=”MyProvider”> 2: <providers> 3: <add name=”MyProvider” type=”MyClass, MyAssembly” /> 4: </providers> 5: </sessionState> Resource A not so known provider, allows you to change the origin of localized resource elements. By default, these come from RESX files and are used whenever you use the Resources expression builder or the GetGlobalResourceObject and GetLocalResourceObject methods, but if you implement a custom provider, you can have these elements come from some place else, such as a database. The base class is ResourceProviderFactory and there’s only one internal implementation which uses these RESX files. Configuration is through the globalization section. 1: <globalization resourceProviderFactoryType="MyClass, MyAssembly" /> Health Monitoring Health Monitoring is also probably not so well known, and actually not a good name for it. First, in order to understand what it does, you have to know that ASP.NET fires “events” at specific times and when specific things happen, such as when logging in, an exception is raised. These are not user interface events and you can create your own and fire them, nothing will happen, but the Health Monitoring provider will detect it. You can configure it to do things when certain conditions are met, such as a number of events being fired in a certain amount of time. You define these rules and route them to a specific provider, which must inherit from WebEventProvider. Out of the box implementations include sending mails, logging to a SQL Server database, writing to the Windows Event Log, Windows Management Instrumentation, the IIS 7 Trace infrastructure or the debugger Trace. Its configuration is achieved by the healthMonitoring section and a reason for implementing a custom provider would be, for example, locking down a web application in the event of a significant number of failed login attempts occurring in a small period of time. 1: <healthMonitoring> 2: <providers> 3: <add name="MyProvider" type="MyClass, MyAssembly"/> 4: </providers> 5: </healthMonitoring> Sitemap The Sitemap provider allows defining the site’s navigation structure and associated required permissions for each node, in a tree-like fashion. Usually this is statically defined, and the included provider allows it, by supplying this structure in a Web.sitemap XML file. The base class is SiteMapProvider and you can extend it in order to supply you own source for the site’s structure, which may even be dynamic. Its configuration must be done through the siteMap section. 1: <siteMap defaultProvider="MyProvider"> 2: <providers><add name="MyProvider" type="MyClass, MyAssembly" /> 3: </providers> 4: </siteMap> Web Part Personalization Web Parts are better known by SharePoint users, but since ASP.NET 2.0 they are included in the core Framework. Web Parts are server-side controls that offer certain possibilities of configuration by clients visiting the page where they are located. The infrastructure handles this configuration per user or globally for all users and this provider is responsible for just that. The base class is PersonalizationProvider and the only included implementation stores settings on SQL Server. Add new providers through the personalization section. 1: <webParts> 2: <personalization defaultProvider="MyProvider"> 3: <providers> 4: <add name="MyProvider" type="MyClass, MyAssembly"/> 5: </providers> 6: </personalization> 7: </webParts> Build The Build provider is responsible for compiling whatever files are present on your web folder. There’s a base class, BuildProvider, and, as can be expected, internal implementations for building pages (ASPX), master pages (Master), user web controls (ASCX), handlers (ASHX), themes (Skin), XML Schemas (XSD), web services (ASMX, SVC), resources (RESX), browser capabilities files (Browser) and so on. You would write a build provider if you wanted to generate code from any kind of non-code file so that you have strong typing at development time. Configuration goes on the buildProviders section and it is per extension. 1: <buildProviders> 2: <add extension=".ext" type="MyClass, MyAssembly” /> 3: </buildProviders> New in ASP.NET 4 Not exactly new since they exist since 2010, but in ASP.NET terms, still new. Output Cache The Output Cache for ASPX pages and ASCX user controls is now extensible, through the Output Cache provider, which means you can implement a custom mechanism for storing and retrieving cached data, for example, in a distributed fashion. The base class is OutputCacheProvider and the only implementation is private. Configuration goes on the outputCache section and on each page and web user control you can choose the provider you want to use. 1: <caching> 2: <outputCache defaultProvider="MyProvider"> 3: <providers> 4: <add name="MyProvider" type="MyClass, MyAssembly"/> 5: </providers> 6: </outputCache> 7: </caching> Request Validation A big change introduced in ASP.NET 4 (and refined in 4.5, by the way) is the introduction of extensible request validation, by means of a Request Validation provider. This means we are not limited to either enabling or disabling event validation for all pages or for a specific page, but we now have fine control over each of the elements of the request, including cookies, headers, query string and form values. The base provider class is RequestValidator and the configuration goes on the httpRuntime section. 1: <httpRuntime requestValidationType="MyClass, MyAssembly" /> Browser Capabilities The Browser Capabilities provider is new in ASP.NET 4, although the concept exists from ASP.NET 2. The idea is to map a browser brand and version to its supported capabilities, such as JavaScript version, Flash support, ActiveX support, and so on. Previously, this was all hardcoded in .Browser files located in %WINDIR%\Microsoft.NET\Framework(64)\vXXXXX\Config\Browsers, but now you can have a class inherit from HttpCapabilitiesProvider and implement your own mechanism. Register in on the browserCaps section. 1: <browserCaps provider="MyClass, MyAssembly" /> Encoder The Encoder provider is responsible for encoding every string that is sent to the browser on a page or header. This includes for example converting special characters for their standard codes and is implemented by the base class HttpEncoder. Another implementation takes care of Anti Cross Site Scripting (XSS) attacks. Build your own by inheriting from one of these classes if you want to add some additional processing to these strings. The configuration will go on the httpRuntime section. 1: <httpRuntime encoderType="MyClass, MyAssembly" /> Conclusion That’s about it for ASP.NET providers. It was by no means a thorough description, but I hope I managed to raise your interest on this subject. There are lots of pointers on the Internet, so I only included direct references to the Framework classes and configuration sections. Stay tuned for more extensibility!

    Read the article

< Previous Page | 249 250 251 252 253 254 255 256 257 258 259 260  | Next Page >