Pages

Thursday, November 28, 2013

7 Best Ways to Lose Weight in 1 Week By Meenu Bahuguna

Well, it is weekend, time to party non-stop and with that binging non-stop. But, that does not mean you are doomed to gain weight. What if you enjoy your weekend and at the same time lose 2 kilos, Surprised? Well do not be! Your weight issues are actually within your own control.
Here, I give you the simplest ways by which you can surely lose 2 kilos in a week. There are no fad diets, no rigorous exercises; it’s all about you or to be precise a ‘slim’ you in 7 days.

Breathing!

Yes simply by breathing, you can lose two kilos in a week. Amazing it is, but true! What you need is mere patience and 10 minutes. ‘Kapalabhathi Pranayam’ is a breathing exercise to shed those extra kilos. With just 10 minutes of daily practice, it harmonises and balances your body bringing it to a healthy state.

Good Bye Foods- Welcome Whole Foods

For these 7 days, stock your house with fruits, vegetables, healthy meats, grains and cereals. Explore the world of healthy, tasty snacks and appetisers, ready to satisfy your cravings and your body!

How to Query Active Directory using LDAP in SQL Server 2000 / 2005

Step 1:- Add a linked server for the Active Directory
Syntax: exec sp_addlinkedserver ‘ADSI’, ‘Active Directory Services 2.5′, ‘ADsDSOObject’, ‘adsdatasource’
Example: exec sp_addlinkedserver ‘ADSI’, ‘Active Directory Services 2.5′, ‘ADsDSOObject’, ‘kenstest.krsdom.com’
Note: I had to use exec sp_dropserver ‘ADSI’, droplogins in order to readd it since ADSI already existed but with an incorrect datasource.
Step 2 :- You can query the Active Directory listing (LDAP is limited to only 1000 rows returned. You may need to adjust this) Refer to  the following Microsoft link for directions on how to change the maxpagesize. http://support.microsoft.com/kb/315071
Select * from OpenQuery(ADSI, ‘Select name from ''LDAP://kenstest.krsdom.com/DC=krsdom,DC=com’’ where objectClass =''Computer’’ and memberOf = ''CN=AdminSecurity,DC=krsdom,DC=com’’’)
Note1: All quotes in the query are single quotes.
Note2: Used DSQuery.exe to find proper syntax for  memberOf
Ran Dsquery * dc=krsdom, dc=com –attr * -limit 2000 >c:\ad.txt and then searched for AdminSecurity in ad.txt
Here is the list of columns that can be used to query.
List of columns for querying Active Directory using LDAP.
1. countrycode
2. cn
3. msexchuseraccountcontrol
4. mailnickname
5. msexchhomeservername
6. msexchhidefromaddresslists
7. msexchalobjectversion
8. usncreated
9. objectguid
10. msexchrequireauthtosendto
11. whenchanged
12. memberof
13. accountexpires
14. displayname
15. primarygroupid
16. badpwdcount
17. objectclass
18. instancetype
19. msmqdigests
20. objectcategory
21. samaccounttype
22. whencreated
23. lastlogon
24. useraccountcontrol
25. msmqsigncertificates
26. samaccountname
27. userparameters


28. mail
29. msexchmailboxsecuritydescriptor
30. adspath
31. lockouttime
32. homemta
33. description
34. msexchmailboxguid
35. pwdlastset
36. logoncount
37. codepage
38. name
39. usnchanged
40. legacyexchangedn
41. proxyaddresses
42. userprincipalname
43. admincount
44. badpasswordtime
45. objectsid
46. msexchpoliciesincluded
47. mdbusedefaults
48. distinguishedname
49. showinaddressbook
50. givenname
51. textencodedoraddress
52. lastlogontimestamp
53. homemdb
 Query that was created for Report and collection
SELECT vc.guid, vc.Name as [Computer Name],vc.[User],sn.[Computer Model],sn.[Computer Type] FROM vComputer as vc
      JOIN Inv_AeX_HW_Serial_Number as sn ON sn._ResourceGuid = vc.Guid
      WHERE Name IN
(SELECT * FROM OpenQuery(ADSI,
'Select Name from ''LDAP://kenstest.krsdom.com/DC=krsdom,DC=com''
where objectClass=''computer'' and
memberOf=''CN=AdminSecurity,DC=krsdom,DC=com''') as ad)
ORDER BY vc.Name


Legacy ID



46050

Wednesday, November 27, 2013

Find Out If Your Outgoing Email Messages Leak Your IP Address

When you send an email to someone, the outgoing message may sometimes include the IP address of your computer that was used to send that message. The IP address is included inside the message header and, if available, it can help the recipient trace the approximate geographic location of the sender.
Not all email providers include the sender’s IP address in the outgoing email messages.
For instance, Gmail omits the sender’s IP address if you send mails through Gmail’s website or through Gmail’s mobile apps but the IP address gets included if you use a third-party program – like Microsoft Outlook or the Mail App on your iPhone – to send the message through your Gmail account. Outlook.com also hides the sender’s IP address while Yahoo Mail includes that information in the outgoing message headers.
If you would like to know if your email client is revealing your IP address to the recipients or not, you can either send an email to yourself and look at the message headers but if that sounds a bit too technical, give emailipleak.com a try.
When you open the site in your browser, it detect your computer’s IP address and creates a unique email address for you. You are required to send a blank message from your email client to that address. When the message arrives, the tool looks for your IP address in the headers of the incoming message and alerts you if a match is found.
The site’s privacy policy says that it does not collect any user information and the information is discarded immediately after any results pages are constructed.
Email IP address

A Free Screen Capture Tool Loaded with Features

ShareX is a free and open source screen capturing tool for Windows so loaded with features that it may give even commercial screen capture programs a run for their money. The tool is portable too so you can run it on your USB drive without installation.
Screen Capture for Windows
ShareX has all the necessary features that would expect in a screen capturing tool. It lets you capture fixed areas on the screen, full application windows or even freehand regions. There’s a built-in editor to help you annotate screenshot images. You can create watermarks and they are auto-added to the image after the screen capture is complete.
You can configure the app to auto-upload your screen captures to cloud destination like Google Drive, Dropbox, Picasa, Box, Flickr, Imgur and many more. When the image is uploaded, the shared URL is copied to the clipboard for quick sharing on social networks.
There’s a useful timer mode that will auto-capture screenshots of the selected region on your desktop after ‘n’ seconds and will then upload them to your favorite destination.
Add Watermark to your Screenshot Images
The tool can automatically watermark your screenshot images before uploading
ShareX also includes a screen recorder and the screencasts can be either saved as video (MP4) files or as animated GIFs. You can modify the default capture frame rate (FPS) to achieve a balance between the video quality and the video file size.

Protect your Android Phone with these Security Apps

Your mobile phone is probably your most important digital possession that holds your contacts, emails, text messages, personal photos and other confidential stuff that you would not like anyone else to see. Yet, it is so easy to lose one as you are carrying it everywhere you go.
There are a plethora of security apps in the Google Play store that help you safeguard your Android phone and offer options that increase your chances of locating your lost (or stolen) device. The Lookout app was the most popular choice for determining the location of a lost phone but with Google’s own Android Device Manager available, Lookout can be skipped (unless your phone is running an older version of Android).
The Android Device Manager shows a list of all Android phones and tablets that are connected to your Google Account and helps you locate them on a Google Map. You can ring your phone (in case it is hiding beneath the pillow) from the browser, lock the device with a custom PIN or perform a factory reset which permanently deletes all the data on your phone.
Android Device Manager requires that the device is online – connected to mobile data or Wi-Fi – for you to remotely ring, lock or erase the phone. There’re however apps like Prey andWhere’s my Droid app that let you remotely send commands to your phone via text messages.
Android Security Apps
For instance, an SMS command like “GO PREY” to your lost phone from any other mobile phone will ring the phone, record its geo-location and also captures a picture with the front camera. You can also lock your phone, erase the data, show a system notification or take a picture on-demand through commands sent via text messages.
Both Prey and Where’s My Droid can be configured to send SMS alerts to another number should someone try to change the existing SIM card of your phone. That said, you should also activate the SIM lock on your Android phone (Settings -> Security -> Setup SIM Card lock) and the device will require a password whenever it is powered on.
When you are charging your cell phone at a public station, you either have to watch the device all the time or you can activate the Anti-Theft Alarm app and relax a bit. The app will trigger a siren sound when someone disconnects the charger and your phone screen will flash continuously until the correct pin is entered. You can go a step further and configure the app to trigger an alert when someone moves the phone even a few inches from the original position.
Another Android App LockWatch records the phone’s location and captures a picture with a front camera when someone attempts to unlock the phone but enters a wrong PIN or password. This information is send to your email address and it happen silently so the intruder would never know that their activity has been recorded.
If the device gets lost or stolen, it is important that you report the matter to your carrier and the police and they are likely to ask for details like the device’s IMEI number, IMSI, SIM number, etc. It helps if you can keep a record of this information somewhere outside your phone. You can find the IMEI number by dialing *#06# or get the SIM reader app and it will instantly extract the SIM and Device info that you can save to your email account.
One more thing. You have protected your Android phone with a numeric PIN or a more complex alphanumeric password but these are obviously inconvenient as you have type the string every time you turn on the screen. A free app called SkipLock makes you life a bit easier.
The app will basically remove the lock when you are connected to one of the recognized Wi-Fi networks and restores the lock as soon as you are on 3G or a non-recognized Wi-Fi network. Thus, the phone stays unlocked when you are home but as soon as you step out, the lock becomes active. Since the SkipLock app isn’t in the Google Play Store, you’ll have to enableUnknown Sources to install the APK file on your phone.

Use Email to Convert Files into Different Formats

There exist quite a few online services that let you convert files from one format to another. You upload the source file, specify the output format and within seconds, the converted file in the desired format becomes available for download. That’s easy but there are somes limitations with this approach:
  1. When you want to convert a file, you have to upload it to the file conversion service. This is not an issue when you are converting files from the desktop but how do you upload files from iPhone, Android or any other mobile browser.
  2. Sometimes clients will send you files in obscure formats as email attachments. In order to convert those files in a format that your apps can understand, you will download the attachments to your desktop and then upload them to the file conversion service. That’s work.
Zamzar, a popular tool for converting files online, has added a new option that lets you convert files by email itself. You can forward your email attachments directly to Zamzar, without downloading them to the desktop, and they’ll be converted in no time.
convert files by email

Convert Email attachment into Different File Formats

To get started, you need to forward the input (source) files to a specific email address likeformat@zamzar.com where format represents the file type of the desired output format.
For instance, if you have a Word document that you want to convert to PDF, you can send the file as an email attachment to pdf@zamzar.com. If you have a PDF file that you want to convert into an ebook, the corresponding conversion address would be epub@zamzar.com ormobi@zamzar.com depending on your ebook reader.
Here’s a complete list of input-output file formats that are currently supported by Zamzar. You can convert documents, presentations, ebooks, videos, audio files, archives and more.
In my test, the converted files were delivered quickly and the quality of the converted files was impressive. There’s no need to create any account at Zamzar and you can convert files up to 1 MB in a single batch. You may go for a pro account to convert bigger files that starts from $7 per month.
One more thing. You can only upload files by email and initiate the conversion process but you’ll still have to visit the Zamzar website to download the converted file. It stays on Zamzar servers for about a day and their download page is actually very confusing when accessed on a mobile phone.

Convert Microsoft Office Documents to PDF Files

You spent hours preparing that Microsoft Word document, only to discover that either the recipient didn’t have the Word software on his computer, or some of the fancy fonts that you used in your Word file, were not installed on his computer. In the former case, the recipient won’t be able to open the Word document at all and in the latter case, though he can open the file, the layout that he will see will be very different from what you prepared.
While one can work around these problems, like the client can download the free programme viewers from Microsoft’s website or install the missing fonts, these hacks will not work in every situation. What if you share a complex computer automated design, CAD, document or Visio Drawing for which no free viewers are available? Don’t expect anyone to spend hundreds of dollars to buy the complete software, just to view your document.
Therefore, the most logical solution is to share documents in Adobe PDF, a universally accepted format. And like Macromedia Flash, most computers are shipped pre-installed with the free Acrobat Reader.
There are three main advantages of using PDF - the document layout is preserved, fonts can be embedded inside the PDF document and most important, a majority of users already have the software required to read PDF files. Your users will see your documents exactly as you intended, with all the fonts, formatting and graphics intact.
So, how do you create PDF files? The most popular answer would be the $500 Adobe Acrobat software but the fact is that you don’t need to spend that kind of money, just for creating PDF files. Here’s a look at various free options, that will let you convert any document to a PDF file, for free.
1. Adobe CreatePDF (www.createpdf.adobe.com) This is for users who need PDF on rare occasions. Adobe has a free online service, where you can upload any document and Adobe will convert that to PDF and send the converted file to your email address as an attachment. All you need is an email account to use this service. The first three conversions are free.
2. PDF Online (www.pdfonline.com) This is another free service that imposes no limit on the number of file conversions. They support practically every document and image format. Once you upload the raw file to their servers, the converted PDF will be available in your email inbox.
3. CutePDF Writer (www.cutepdf.com) If you dislike online services, this free software is for you. CutePDF is installed as a PDF printer on your machine. To convert a document to PDF, just print it using the normal process but choose the CutePDF printer instead of the regular printer.
4. PrimoPDF (www.primopdf.com) Like CutePDF, PrimoPDF is also a popular standalone option for creating PDF files. I like this more than CutePDF, as it doesn’t require me to download a separate GhostScript installer.
Corel WordPerfect and Sun StarOffice have native PDF printing capabilities. Microsoft Office 2003 doesn’t support PDF and following a spat with Adobe, it’s highly unlikely to see PDF in the upcoming Office 2007.
Adobe Acrobat gives you more features like comments, stamps, security options but again, if you are an average to medium user, the above list of free PDF software should suffice.

Fax Over Web – Fax Isn’t Dead

In the past decade or so, alternate communication channels like email and IMs have gained immense popularity but the good old fax machines, that transmit scanned paper documents (aka facsimile) through the traditional phone lines, are still an ubiquitous part of every business.
Thanks to internet-based fax services, it is now possible for business owners to send and receive faxes without investing in a fax instrument. Not only are these web faxing services significantly cheaper (even free) than the traditional phone line route, they also help you realise your dream of a paperless office.
Web faxing services are not only significantly cheaper than the traditional phone lines, they also help you move closer to a paperless office.
There are different ways of sending faxes over the internet — some services offer a web-based interface where you can type in the text message in a web form (similar to writing a mail in Yahoo!). Or you can send the fax as an email message to a special address given by the internet fax company. (I say special because the email address itself contains the number of the destination fax machine)
If your fax message contains formatting and images, you may upload that as a Word or PDF document to the web server of the fax service, specify the fax number and it will automatically print on the destination fax machine.
The next important question is how to choose a fax company from the hundred odd services that exist on the web — well, it depends on your budget, frequency of use (are you a heavy user?) and where you intend to send faxes (the destination city / country).
The Phone Company (www.tpc.int) is the pioneer in internet faxing. They allow you to send text messages and rich-text documents as faxes to most destinations in the world for free.
To send a fax via TPC, you just need to compose an email address with the following address:remote-printer.Line_1/Line_2 @1234.iddd.tpc.int where “1234” is the destination fax number with the international code. The Line_1 and Line_2 will create the fax cover sheet in the following format:
Please deliver this facsimile to:
Line 1
Line2
TPC covers most popular cities of the world including India — you can send faxes to clients located in Mumbai, Chennai and the national capital region (Delhi, Ghaziabad, Gurgaon, Noida, Faridabad)
TPC will send you email notification if there was a problem during the delivery of the facsimile.
If you fax a majority of documents to US or Canada, look no further than FAX Zero.com — an ad supported web-based fax service that will deliver a fax message upto three pages in length for free. You can type the text or upload it as .doc or .pdf file and hit send. The only caveat is that your fax coversheet will contain an advertisement.
Bulk users may consider subscribing to commercial services (like the ones offered by eFax.com, popFax.com or myFax.com) — other than the standard options for sending faxes, these services also provide a virtual fax number which is no different than the classical fax machine number. This number is linked to your email address and you can therefore read your fax messages online or on your cell phone anywhere in the world.

The Most Useful Email Addresses That You Should Save in your Address Book

If you have a basic mobile phone that doesn’t offer apps or even a decent web browser, you can still upload and publish content on to your favorite websites using just the email program on your phone. There’s more. You can write tweets, upload files to Dropbox, convert documents, post videos, get dictionary meanings of words – all through a simple email message.
email address
Here’re some useful email addresses that you should save in your phone’s address book. These will also come handy when you happen to be at a place where access to certain websites – like Twitter or Facebook – is restricted. You can get around those restrictions by pushing content through your email program.
1. secret@blogger.com – Previously known as Mail2Blogger, your Blogger’s blog has a secret email address and any message sent to this address will be published directly to your blog. You can post text and images upto 10 MB in size by email to your blog. You can find the email address inside the Mobile and Email settings pane of your Blogger Blog.
2. secret@photos.flickr.com – Your Flickr account offers a unique email address, you can email your photos and videos to this email address and they’ll show up in your Flickr account almost instantly. The address can be found in your Flickr settings page.
The subject line of email becomes the photo’s title while the body of the email becomes the photo’s description. You can also specify the privacy level of your upload via email itself. For instance, secret+public@photos.flickr.com will make your uploads visible to everyone while secret+private@photos.flickr.com will upload the photos privately.
3. secret@post.wordpress.com – Like Blogger, you can also publish posts to your WordPress blogs by email. The email subject is used as your post’s title while the message body and image attachments will become the post’s content.
You may also insert shortcodes in your email message to configure the tags, category, slug and other aspects of the published post. For instance, [tags a,b,c] will apply new tags, [slug your-slug] will change the default slug, [delay 2013-01-01 11:30:00 EST] will let you schedule a post and so on. Go to the My Blogs section in your WordPress.com dashboard to configure your secret post by email address.
4. secret@m.evernote.com – You can use email to file notes into your Evernote notebooks. The title of the email subject becomes the title of the note in Evernote and you can also include hashtags in the same subject line and they are automatially assigned to your note. You can use the @ symbol to send the note to a particular notebook.
For instance, an email note with the subject line “Expense Report @travel #spain” would create a note titled Expense Report in your Travel notebook, tagged with spain. Your Evernote email address is located in the Settings tab on the Evernote website.
5. secret@m.youtube.com – If the YouTube app on your mobile phone doesn’t support video uploads, in the case of Windows Phone users, you can still upload mobile videos to the YouTube website via your email program.
Go to your YouTube account settings and grab your secret upload-by-email address. To upload the video, email the video file to the email address and you’ll receive a confirmation SMS or email letting you know the video was successfully uploaded.
6. smartphones@mailchimp.com - Take a screenshot on your mobile phone and send it this email address. The service will automatically detect the device, using EXIF data, on which that screenshot was captured and it will email you the image back but after adding a nice device frame around that screenshot (examples) so it looks even more awesome.
7. wsmith@wordsmith.org – You can get the dictionary definition and synonyms of any word by sending a blank email to this email address. Make the subject line as: define myword
8. add@getpocket.com – If Pocket is you preferred Read Later service, this is one email address that will come very handy. You can save any web link or video to your Pocket list by simply emailing the URL to add@getpocket.com. The link should be included in the body of the email (not the subject) and that there can be only one URL per email.
9. trigger@ifttt.com – You can connect your Twitter account with IFTTT and you’ll then be post tweets via email itself. Once the recipe is setup, just send an email message to trigger@ifttt.com with #twitter as the subject line and your email body will be posted as a new update in your Twitter account. You can also post pictures to Twitter via email.
10. secret@emailitin.com – You can upload files to Google Drive, SkyDrive and Dropbox accounts by email with the help of IFTTT recipes. Alternatively, you can connect your cloud storage accounts to EmailItIn.com and it will provide you a unique email address. Any files sent to that email address will land up in your cloud drive. The free version however will only upload files that are 5 MB or less.
11. secret@readability.com – Your Kindle Reader has a unique email address @free.kindle.com but it only accepts documents and you cannot send web links to your Kindle email address. That’s where Readability can help. If you wish to read a web article on your Kindle, just email the URL of that article to your Readability address and it will send a daily digest of your articles to Kindle that you read on the go [Kindle Guide].
12. secret@tumblr.com – Tumblr, like WordPress and Blogger, also lets you publish content by email. Click the Settings icon in your Tumblr dashboard, click the Blog name and you’ll find your private email address in the “Post by Email” section. The title of your email becomes the title of the post but if you are posting a photo, the subject become the caption of the photo on your Tumblr blog.
13. secret@m.facebook.com – Go to your Facebook settings and you’ll find the Post-by-email address under the Mobile section. Email a photo or video to this address and it will be automatically posted to Facebook. The subject of the mail becomes the caption of your photo or video and if the email includes no photos or videos, the email subject will be your new Facebook status. Photos and videos uploaded by email are public by default.
14. documentformat@zamzar.com – Did you know that you can convert files by email? Just email the documents in any format to zamzar.com and it will send you a link where you can download the converted documents. The destination email address varies depending on the your file format. If you wish to convert a Word document to PDF, send the document to pdf@zamzar.com. For converting a WAV file to MP3, send the audio file to mp3@zamzar.com.
15. www4mail@wm.ictp.trieste.it – You can browse the web via email – just send an email to this address and put any web URL in the body of the message. The email server will retrieve the corresponding web page and sends it back to you as an email message. Such web-to-email gateways can come handy for receiving on-demand Stock quotes (for the current Google stock price, type finance.yahoo.com/q?s=GOOG), weather updates, currency exchange rates (for USD to INR, type finance.yahoo.com/q?s=USDINR=X) and more.
16. pdfconvert@pdfconvert.me – Forward any email message to this address and the service will convert the message to PDF and send it back to you almost instantly. If there are any attachments in the message, you can forward them to attachconvert@pdfconvert.me for conversion into PDF format.
17. webconvert@pdfconvert.me – You can use the web convert service to fetch web pages via email in PDF format. Just send any hyperlink (URL) to this email address and it will return the PDF version of the page. If there are multiple links in the email message, only the first link will be converted to PDF.

Convert your Emails to PDF through Email Itself

Google Chrome has a built-in PDF writer so you can easily convert any email message into a PDF file within the browser itself but if you are reading your emails on a mobile phone or a tablet, you would need some sort of a PDF conversion app.

Alternatively, you can forward the original email message to pdfconvert@pdfconvert.meand the service will send a PDF version of the message back to you in a second or two. I tried converting a plain text email message as well as one with HTML tags and the conversion was almost perfect in both instances.
If there are any Word, Excel or Powerpoint attachments inside the mail, you can forward the files to attachconvert@pdfconvert.me and they’ll come back to you in PDF format. Zamzar is another helpful service that let you convert files by email but the advantage with PDFConvert.me is that it sends you the converted PDF file by email itself, you don’t have to visit their website to download the PDF.
You may also use the service to retrieve web pages as PDFs. Just send the web address (URL) of the page in the body of the email message to webconvert@pdfconvert.me and the service will send you the full page in PDF format. This feature can be used for viewing pages that otherwise aren’t accessible due to internet filters.
The site’s privacy policy says that they store your email message on their server only during the conversion process.

Tuesday, November 26, 2013

How to succeed in life~Inspirational Quotes~Pictures

Good morning quotes, wishes, How to succeed in life,Inspirational Quotes,Pictures
How to succeed in life?
Talk – Softly; Eat – Sensibly;
Breathe – Deeply; Sleep – Sufficiently;
Dress – Smartly; Act – Fearlessly;
Work – Patiently; Think – Creatively;
Behave – Decently; Earn – Honestly;
Save – Regularly & Spend – Intelligently
This is the Success Mantra… Wish you success… Share with friends and family

Saturday, November 23, 2013

Running IIS Express without Administrative Privileges

OVERVIEW

IIS Express was designed to allow the most common web development and testing tasks to be performed without administrative privileges. This is very helpful in scenarios where developers are not running with administrative rights on their computers. Even for administrative users, this feature eliminates the User Account Control (UAC) popup window in Windows Vista and Windows 7 from interrupting workflow.
This article explains what standard users can do with IIS Express and describes the tasks that are limited to administrators.

RUNNING SITES LOCALLY

With IIS Express, standard users can run websites locally using non-reserved ports (ports greater than 1024). The default website binding for IIS Express is http://localhost:8080. By default, WebMatrix and Visual Studio 2010 SP1 Beta also configure websites to use localhost and a non-reserved port.
In contrast, administrative privileges are needed to serve content for external requests or using a reserved port such as 80 or 443.

CONFIGURING WEBSITES AND APPLICATIONS

Both IIS and IIS Express use an applicationhost.config file that contains server-wide configuration information. With IIS Express, every user owns his or her own copy of applicationhost.config, which means the user can add sites, remove sites, configure virtual directories, and so on without special privileges. IIS Express looks for an applicationhost.config file in the user’s Documents folder (for example, %userprofile%\Documents\IISExpress\config on Windows 7). IIS Express can also be pointed to a custom applicationhost.config file using the /config command-line switch. The result is that it is not necessary to be an administrator to use IIS Express with Visual Studio.
Because IIS uses a computer-wide applicationhost.config file that standard users cannot write to, the same tasks under IIS can be performed only by administrators. (Because IIS is typically used on server computers, this is generally not a restriction from the point of view of an individual developer.)

STARTING AND STOPPING SITES

With IIS Express, a standard user can start and stop his or her web server at will. This can be done using WebMatrix and Visual Studio 2010 SP1 Beta, or by using the iisexpress.exe command executable. A Windows system tray application also allows users to browse and shut down IIS Express instances.
With IIS, users cannot launch their website directly. Instead, the Worker Process Activation Service (WAS) is responsible for activating websites. Because WAS is a system service, only administrators can start or stop it.

USING SSL

Configuring access over the secure sockets layer (SSL) requires administrative privileges on IIS Express, just like it does on IIS. However, the IIS Express setup program performs the following tasks that enable standard users to use SSL with IIS Express:
  • It automatically creates and installs a self-signed SSL server certificate in the local machine store.
  • It configures HTTP.SYS to reserve ports 44300 through 44399 for SSL. Incoming SSL requests that use localhost and one of the ports in the specified range are automatically associated with the self-signed certificate.
(HTTP.SYS is an operating system component that handles SSL for IIS and IIS Express. The setup program is able to configure HTTP.SYS because setup runs under elevated privileges.)
Consequently, using SSL to test a website with IIS Express is as simple as adding a binding like the following to the site element in applicationhost.config:
<binding protocol="https" bindingInformation="*:44300:localhost" />
This works only for local traffic (localhost requests) and for the specified range of ports. Administrator privileges are required in order to configure a custom SSL certificate or to run SSL using a port outside the specified range.

SUMMARY

IIS Express enables non-administrative users to perform the following tasks:
  • Run a website locally and use a port number greater than 1024.
  • Add, remove, and modify websites, applications, and virtual directories.
  • Start and stop the web server.
  • Add SSL support to test a website using a pre-installed self-signed SSL certificate and a port between 44300 and 44399.
Administrative privileges are required in order to perform the following tasks:
  • Use a reserved port such as 80 or 443.
  • Serve requests for external traffic.
  • Configure a custom SSL certificate.
  • Run SSL using a port outside the range of 44300 to 44399.

HTTP Load Balancing using Application Request Routing

Overview

This topic leads the reader through the steps to configure Application Request Routing to load balance HTTP requests to achieve high availability and scalability. The walkthrough also highlights a couple of core features on how Application Request Routing monitors the health of the content servers and affinitizes requests from a client to a content server.

Goal

To load balance HTTP requests across several content servers using Application Request Routing, as shown below:

Prerequisites

This walkthrough requires the following prerequisites:
  • IIS 7.0 or above on Windows 2008 (any SKU) or newer.
  • Microsoft Application Request Routing Version 1 and dependent modules.
  • Minimum of two content servers with working sites and applications.
If Application Request Routing Version 1 has not been installed, it is available for download at:
  • Microsoft Application Request Routing Version 1 for IIS 7 (x86) here.
  • Microsoft Application Request Routing Version 1 for IIS 7 (x64) here.
Follow the steps outlined in this document to install Application Request Routing.
Another prerequisite is that the reader has defined and configured a server farm using the steps outlined in Define and Configure an Application Request Routing (ARR) Server Group.

Step 1 - Verify URL rewrite rules

Provided that the server farm has been created using the steps outlined in Define and Configure an Application Request Routing (ARR) Server Group, the URL rewrite rules have already been created for a simple load balancing scenario.
To verify URL rewrite rules using the UI:
1. Launch IIS Manager.

2. Select the server farm, myServerFarm, which was created in Define and Configure an Application Request Routing (ARR) Server Group.
3. The following icons are shown:
4. Double-click Routing Rules.
5. Verify that the Use URL Rewrite to inspect incoming requests checkbox is checked.
6. SSL offloading is enabled by default. When this feature is enabled, all communication between the ARR server and the application servers are done in clear text, even for HTTPS requests from clients to the ARR server. When both the ARR server and the application servers are deployed within a trusted network, such as within the same datacenter, enabling SSL offloading does not sacrifice security. Also, enabling this feature can further help to maximize the server resources on the application servers, since they do not have to spend cycles in encrypting and decrypting requests and responses.
To disable SSL offloading, uncheck the Enable SSL offloading checkbox, and then click Apply.
7. Open a browser and send several requests to the ARR server.
8. To verify that the requests are being load balanced equally between the application servers, selectmyServerFarm. Double-click Monitoring and Management.
9. In the dashboard view, verify that the requests are being evenly distributed.
To verify URL rewrite rules using the command-line:
1. Open a command prompt with administrator privileges.
2. Navigate to %windir%\system32\inetsrv.
3. To verify that the URL rewrite rules have been created correctly, enter appcmd.exe list config -section:system.webServer/rewrite/globalRules. It returns the globalRules that looks like the following:
<system.webServer> <rewrite> <globalRules> <rule name="ARR_myServerFarm_loadbalance" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <conditions> </conditions> <action type="Rewrite" url="http://myServerFarm/{R:0}" /> </rule> </globalRules> </rewrite> </system.webServer>
4. To disable SSL offloading, first remove all URL rewrite rules:
appcmd.exe clear config -section:system.webServer/rewrite/globalRules
Then, create the URL rewrite rules to forward HTTPS traffic. More specifically, with this rule, ARR forwards requests using SSL if the incoming requests are HTTPS:
appcmd.exe set config -section:system.webServer/rewrite/globalRules
/+"[name='ARR_myServerFarm_loadbalance_SSL',patternSyntax='Wildcard',stopProcessing='True']"
/commit:apphost

appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance_SSL',patternSyntax='Wildcard',stopProcessing='True'].match.url:"*"
/commit:apphost

appcmd.exe set config -section:system.webServer/rewrite/globalRules
/+"[name='ARR_myServerFarm_loadbalance_SSL',patternSyntax='Wildcard',stopProcessing='True'].conditions.[input='{HTTPS}',pattern='On']"
/commit:apphost

appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance_SSL',patternSyntax='Wildcard',stopProcessing='True'].action.type:"Rewrite"
/[name='ARR_myServerFarm_loadbalance_SSL',patternSyntax='Wildcard',stopProcessing='True'].action.url:"https://myServerFarm/{R:0}"
/commit:apphost
Finally, create the URL rewrite rules to forward HTTP traffic in clear text to the application servers:
appcmd.exe set config -section:system.webServer/rewrite/globalRules
/+"[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True']"
/commit:apphost

appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].match.url:"*"
/commit:apphost

appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action.type:"Rewrite"
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action.url:"http://myServerFarm/{R:0}"
/commit:apphost
5. To verify that the URL rewrite rules have been created correctly with SSL offloading disabled, enterappcmd.exe list config -section:system.webServer/rewrite/globalRules. It returns the globalRules that looks like the following:
<system.webServer> <rewrite> <globalRules> <rule name="ARR_myServerFarm_loadbalance_SSL" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <conditions> <add input="{HTTPS}" pattern="On" /> </conditions> <action type="Rewrite" url="https://myServerFarm/{R:0}" /> </rule> <rule name="ARR_myServerFarm_loadbalance" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <conditions> </conditions> <action type="Rewrite" url="http://myServerFarm/{R:0}" /> </rule> </globalRules> </rewrite> </system.webServer>

Step 2 - Configure health check monitoring

Application Request Routing monitors the health of the content servers in two ways:
  • Via the live traffic
  • Via an explicit URL testing
The live traffic testing is performed automatically by default when the requests are made to Application Request Routing. The explicit URL testing is an additional test that can be used with the live traffic testing. In this section, the walkthrough guides you through configuring the explicit URL testing.
To configure health check monitoring using the UI:
1. The URL testing requires a specific URL to test. To satisfy this requirement, use Notepad to create a text file named healthCheck.txt that contains the sentence "I am healthy."
2. Place the healthCheck.txt file on the application servers.
3. Verify that the healthCheck.txt is rendering properly by opening the page in a browser.
4. In IIS Manager, select the server farm, myServerFarm. The following icons are shown:
5. Double-click Health Test.
6. Enter http://(server name or FQDN of ARR server)/healthCheck.txt as the URL value.
7. Enter healthy as the Response match value. Response match is an optional test to make sure that the body of the response contains the expected string. In this case, since healthCheck.txtcontains the sentence "I am healthy.", Response match will look for the word "healthy".
8. Click Apply to save the changes.
9. To verify the functionality of health check monitoring, stop the monitored site on one of the application servers. Since the Interval (seconds) value is set to 30 seconds, wait for 30 seconds for the next health check.
10. After waiting for 30 seconds, send several requests to the ARR server.
11. To verify that all requests are going to the healthy server(s), double-click Monitoring and Management, and then refresh the dashboard by using the F5 key. Note that the runtime statistics have been reset. This is by design. You may want to send additional requests and refresh the dashboard, as needed.
12. Health monitoring is also used to detect when an unhealthy server becomes healthy. To verify this functionality, start the site that was stopped in Step 9. Again, since the Interval (seconds) value is set to 30 seconds, wait for 30 seconds for the next health check.
13. After waiting for 30 seconds, send several requests to the ARR server.
14. To verify that the requests are distributed evenly between servers, refresh the dashboard in IIS Manager. Note that the runtime statistics have been reset. This is by design. You may want to send additional requests and refresh the dashboard, as needed.
To configure health check monitoring using the command-line:
1. Open a command prompt with administrator privileges.
2. Navigate to %windir%\system32\inetsrv.
3. To set the URL to http://(server name or FQDN of ARR server)/healthCheck.txt with I am healthy. as the string to match, enter:
appcmd.exe set config -section:webFarms
/[name='myServerFarm1'].applicationRequestRouting.healthCheck.url:"http://(server
name or FQDN of ARR server)/healthCheck.txt "
/[name='myServerFarm1'].applicationRequestRouting.healthCheck.responseMatch:"I am
healthy." /commit:apphost

Step 3 - Configure client affinity

Application Request Routing provides a client affinity feature that maps a client to a content server behind Application Request Routing for the duration of a client session. When this feature is enabled, the load balancing algorithm is applied only for the very first request from the client. From that point on, all subsequent requests from the same client would be routed to the same content server for the duration of the client session. This feature is useful if the application on the content server is stateful and the client's requests must be routed to the same content server because the session management is not centralized.
To configure client affinity using the UI:
1. Launch IIS Manager.
2. Select the server farm, myServerFarm, which was created in Define and Configure an Application Request Routing (ARR) Server Group.
3. The following icons are shown:
4. Double-click Server Affinity.
5. To enable client affinity, check the Client affinity checkbox, and then click Apply.
Application Request Routing uses a cookie to enable client affinity. The Cookie name will be used to set the cookie on the client. That said, the client must accept cookies for client affinity to work properly.
6. To verify the functionality of client affinity, send several requests to the ARR server. Refresh the dashboard in IIS Manager (Monitoring and Management). Verify that the runtime statistics are changing for only one of the application servers to where the client is affinitized. You may want to send additional requests and refresh the dashboard, as needed.
To configure client affinity using the command-line:
1. Open a command prompt with administrator privileges.
2. Navigate to %windir%\system32\inetsrv.
3. To enable client affinity, enter:
appcmd.exe set config -section:webFarms
/[name='myServerFarm1'].applicationRequestRouting.affinity.useCookie:"True"
/commit:apphost

Step 4 - Disallow new connections

Disallowing new connections on a server is a graceful way of taking the server out of the server farm environment. It is more meaningful when the client affinity feature is in use, because Application Request Routing will honor the existing sessions when disallowing new connections. That is, when a client is affinitized to the server that is disallowing new connections, the client will continue to be routed to the same server and, therefore, there is no impact on the client. However, no new clients will be routed to the server that is disallowing new connections.
To disallow new connections using the UI:
1. Using the setup from Step 3 above, identify the server to which your client is affinitized.
2. Select the server farm, myServerFarm, which was created in Define and Configure an Application Request Routing (ARR) Server Group.
3. The following icons are shown:
4. Double-click Monitoring and Management.
5. Select the server to where your client is affinitized. In the Actions pane, click Disallow New Connections.

6. In the confirmation dialog box, click Yes.
7. To verify that the requests from your clients continue to get routed to the affinitized server, which is now disallowing new connections, send several requests to the ARR server. Refresh the dashboard in IIS Manager. Verify that the runtime statistics are changing only for the server to where the client is affinitized. You may want to send additional requests and refresh the dashboard, as needed.
8. To verify that new clients are not being routed to the server that is disallowing new connections, remove the cookie set by Application Request Routing by closing and restarting the browser.
9. Send several requests to the ARR server. Refresh the dashboard in IIS Manager. Verify that the runtime statistics are changing only for the servers that are Available. More specifically, verify that the runtime statistics for the server that is disallowing new connections are not changed. You may want to send additional requests and refresh the dashboard, as needed.

Summary

You have now successfully configured a number of settings for Application Request Routing to scale out and distribute the load evenly. For more advanced routing capabilities using Application Request Routing, refer to Using Application Request Routing.