Sunday, December 26, 2010

HOW TO RESTRICT ACCESS TO CONTROL PANEL AND ITS COMPONENTS IN XP

If you want your user not to be able to access control panel neither be able to use any component which is located in control panel for any reason than you can easily do this by following these simple steps

1. Click on start, than run, and type gpedit.msc






2. Now expand User Configuration, than Administrative Templates, than click on Control Panel

3. Now on the right side double click on Prohibited access to the Control Panel


4. Now select Enable, and click on OK





Now Control Panel will be remove from your startmenu, no one will be able to access control panel neither any of its components.


To verify this you can perform the following

1. Double click on Date/time in taskbar
2. Type control in Run command

You will receive a error message like this

Tuesday, December 21, 2010

HOW TO DISABLE TASK MANAGER IN XP

If you ever wanted to disable task manager for any user in your local PC, than you can easily do that by following these steps.

1. Click on start, than run and type gpedit.msc






2. Now expand User configurations, than Administrative Templates, than System, than CTRL + ALT +DEL Options

3. Now on the right side double click on Remove Task Manager





4. Now Select Enable, and click on OK


You can check now by pressing CTRL + ALT + DEL, Task Manager wont start instead it will give a error like this

Sunday, December 19, 2010

TURN OFF AUTORUN FEATURE IN WINDOWS XP

If you are worried about your computer being infected with virus, than you should disable Autorun feature. Because mostly viruses come with USB in a file called autorun.inf

To disable Autorun feature in windows xp follow these simple steps.

1. Click on start, than click on run, and type gpedit.msc



2. Now expand Computer Configuration, than expand Administrative templates, than click on System


3. Now on the right hand side window, double click on Turn off Autoplay


4. Select Enabled, and below this select All drives


6. Now Click on Apply, and OK

You have successfully disabled Autorun.

Next time when you insert USB, windows won't perform any autorun action.

Also note don't open your USB drive by double clicking or pressing enter key, instead right click on it and select Explore, this way autorun.inf file will not be executed. Same precaution can be apply for HHD partitions

Saturday, December 18, 2010

HOW TO DISABLE USB PORTS IN WINDOWS XP

If you want to disable USB ports from being use by any user like in school or office, than you can do this by following some simple steps.

1. Click on start, than Run and type sysdm.cpl




2. now click on Hardware tab, and than click on Device Manager


3. Now scroll down and find Universal Serial Bus Controllers, click on + sign to expand it


4. Now right click on any USB port and click on disable.


You can disable all your USB ports from here. Windows will not load any USB device on the port which you have disabled.

Later on, If you want to re-enable any port just perform the same procedure, just click on Enable instead of Disable

Monday, December 13, 2010

WINDOWS XP HIDDEN MUSIC

Windows has a secret hidden music to listen to it just follow these simple steps

1. Goto your My computer and your windows partition normally it is C drive

2. Now double click on Windows folder

3. Double click on System32 folder

4. Now find oobe folder, and open it

5. Double click on Images

6. Now scroll down and run title.wma


Enjoy the beautiful music

:)

Saturday, December 11, 2010

ASP.NET: SERVER.TRANSFER() VS RESPONSE.REDIRECT()


Since I started ASP.NET I had always been in the confusion that what is the difference between Server.Transfer() and Response.Redirect(). Tried a lot but dint got succeed to find out the right description. And this thing gets more irritating when it comes to giving interviews. As I am an ASP.Net programmer interviewer expects I should know it, and I should have, However; if you search it over the internet you’ll find lots of posts same was the case with me but none of them solve my issue.

So I decide to write the post on it so that no one will do the donkey work which I did. I am writing this post for beginner and intermediate audience in ASP.Net.

Server.Transfer()
Response.Redirect()
Does not allow to navigate to url outside the current server and current site, it requires virtual path and if you try to do so following exception will occur

Invalid path for child request 'http://….'. A virtual path is expected
Allows navigate to the URL outside the current server.
Does not cause round trip (postback)
Cause round trip (postback)
Does not show the redirected URL. Means you are running a website at following URL.


You have got two web pages default.aspx, URL.aspx.

If you navigate from default.aspx to url.aspx, URL in address bar will still remains same even argument in query string will not be shown.


Explanation: When a user opens browser, type in the request in the address bar, and hit enter request goes to server and at the same time browser is also aware of the fact that what the URL is.

As we know that Server.Transfer() does not cause post back and directly redirects form the server side to the requested page that is why URL in the address bar does not update.


URL in the address bar change accordingly when using Response.Redirect().

It happens because of the fact that Response.Redirect() cause a post pack then redirects to the request page. When Response.resirect() cause a post back it takes the URL of the requested page to the client and then browser make a request the that URL.

In-order to update URL in the address bar browser requires complete cycle which starts from requesting URL from browser and sending HTML back to the browser.
Can only redirect to .aspx pages not to html pages.
Can redirect to .aspx pages and html pages.


When to Use?
Server.Transfer()
Response.Redirect()
We want to transfer current page request to another .aspx page on the same server
We want to redirect the request to some plain HTML pages on our server or to some other web server
We want to preserve server resources and avoid the unnecessary round trips to the server
We don't care about causing additional round trips to the server on each request
We want to preserve Query String and Form Variables (optionally)
We do not need to preserve Query String and Form Variables from the original request.
We don't need to show the real URL where we redirected the request in the users Web Browser
We want our users to be able to see the new redirected URL where he is redirected in his browser (and be able to bookmark it if it’s necessary)


Hope this post will be help full for you people.

HOW TO MAKE ANY FOLDER INVISIBLE XP

Hello today I am going to show you how you can make any folder invisible


1. Right click on the folder you want to make invisible, and click on rename


Like I have selected a folder, which is labeled as Taqi



2.Now while renaming it, press Alt key + from your num keypad type 255

3. Press enter

your folder will now look something like this (without text)


Now to make it completely invisible

4. Right click on the folder, and click on properties


5. Now goto customize tab




6. click on change Icon




7. Now choose the highlighted Icon (Blank Icon)

8. Click on OK, and than again OK


Your folder is now invisible

Sunday, November 21, 2010

INSURANCE: STRUCTURED SETTLEMENT ANNUITY

Hello, I am here again with a new topic 'Structured Settlement Annuity' and today I am going to tell you what Structured Settlement Annuity is. The reason behind choosing this I have choosing this topic is that I have found many people asking about it over the internet, however; it is not related to IT but it is informative. So I did my R&D and decide to share this information you people.

Structured Settlement Annuity is more often a result of legal action which happens between parties where financial award is given to one party by another party as a result court action. Generally it is in the form of payments because a court has stated up so that based on the life span of the person who won this settlement usually from the car accident or some form cause physical injury.

After legal fee are paid whatever balance of the insurance companies settlement will go into annuity and insurance company will then pay the party a payment over time. Sometimes this can be a lump sum payment (large chunk of money given o the individual), however; more often it is monthly income stream designed to replace income that may have been lost as a result of the action, as a result of legal action. This is called a Structured Settlement Annuity.

This was the short introduction about Structured Settlement Annuity. I'll cover it in detail in my upcoming posts.

DOT NET FRAMEWORK: PROVIDERS IN DOT NET

It has always been a problem when it comes to understand provider in .Net and most of the people miss conceptualized it specially beginners, same was the case with me. So I decide to a post on it. I am writing this post for beginner and intermediate level audience.
What is provider in .Net implementation?
At grass root level provider is a dll (class library) which contains the some specific implementation. For instance:
ActiveDirectoryMembershipProvider this provider is used for authenticating user from active directory in domain environment. We refer to this provider by using its fully qualified name.
System.Web.Security.ActiveDirectoryMembershipProvider

SqlMembershipProvider this provider is used for user authentication from the database created by aspnet_regsql.exe command. We refer to this provider by using its fully qualified name.
System.Web.Security.SqlMembershipProvider


This dll knows the schema of the database created by aspnet_regsql.exe command. It also contains methods to authenticate user, create user, edit user, delete user etc.
When using these providers we don’t need to worry about writing code because Microsoft has already done that job for us. All we need to do is:

1.  Specify the provider and it configuration in web.config.
2.  Specify the provider in the ASP.Net login controls so that they can utilize this provider.

You can even write your own provider let’s say you want to authenticate users from Linux domain, so u can write your own provider which has the implementation for authenticating user from Linux domain.

There are several other providers shipped with .Net framework and all of them server different purpose.


Site map                     --   System.Web.XmlSiteMapProvider

Profile                         --   System.Web.Profile.SqlProfileProvider

Session state              --   System.Web.SessionState.InProcSessionStateStore
                                    --   System.Web.SessionState.OutOfProcSessionStateStore
                                    --   System.Web.SessionState.SqlSessionStateStore


So the rule of thumb is provider is nothing but a dll which server what it is written for. Hope this post help you people, have a nice day :).

Saturday, November 20, 2010

ASP.NET: CONFIGURING MEMBERSHIP PROVIDER FOR ACTIVE DIRECTORY

With the release of Visual Studio 2005 Microsoft introduce new login controls in .Net framework 2.0 so that developers do not need to write same code again and again. Microsoft has provided different providers for them to connect with different user data sources.

In this post I am going to discuss how to configure membership provider for active directory. It very common scenario that you need to create an intranet application and provide the functionality to the office employees to connect the application using domain user.

In order to connect to active directory you need to have active directory deployed. If you don’t have active directory deployed please referrer to installing active directory.

After installing active directory follow the following steps.

1.    Add the following connection string under </configSections> tag.

<connectionStrings>
      <add
                name="ADConnectionString"
connectionString="LDAP://techerz.com/CN=Users,DC=techerz,DC=com"/>
</connectionStrings>

The above connection string is pointing to our active directory and its name is ADConnectionString.

NOTE: if connection element right under the <configuration> tag following exception will occur

Parser Error Message: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.

2.    Now add following membership provider under <system.web> tag.

<membership defaultProvider="DomainLoginMembershipProvider">
        <providers>
          <add name="DomainLoginMembershipProvider"
               type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
               connectionStringName="ADConnectionString"
               connectionUsername="techerz.com\administrator"
               connectionPassword="123"/>
        </providers>
      </membership>

In the above membership provider we mentioned defaultProvider as we can use more the one providers.
In the type we mentioned that we are going to use active directory membership provider by specifying ActiveDirectoryMembershipProvider assembly information.
Note that in the connectionStringName I have use the same name I mentioned while creating connection string.
In the connectionUsername and connectionPassword I am specifying that this is the service account I am going to use while connecting to the active directory.

NOTE:  in this example I have use techerz.com as domain name, you need to ‘techerz.com’ with your domain name. If you don’t know the domain name just ping the computer on which active directory is deployed.

Ping <computer name>

It’ll return fully codified domain name like [computer name].[domain name].com. use only [domain name].com




3.    Add a new web form and name it  Destination.aspx

4.    Now add the following markup on in the landing page of your website.

<asp:Login ID="lgnAppLogin" runat="server" DestinationPageUrl="~/Destination.aspx" />

You are done with connecting with active directory. Have a nice day :).

Wednesday, November 17, 2010

HOW TO INSTALL ACTIVE DIRECTORY ON WINDOWS SERVER 2008 R2

1. Go to run type dcpromo and press OK





After you press Ok, windows will start installing binaries, this may take some time


 2. When windows finished installing binaries. you would see a window like this, Click on Next



3. Click on Next



4. Put radio button on Create a new domain in a new forest, and than click on Next


 5. Now select a domain name like corp.contoso.com, in my case it is taqi.com, than click Next




After this windows will check your network to make sure that there is no domain name which you have selected.


6. Now Windows will assign you a NetBIOS name, but you can change it to whatever you want. Click on Next


 7. Now from the drop down menu select Windows server 2008 R2, and click on Next






8. Now put check mark on DNS Server, and than click on Next


9. Click on Yes


 10. You can change the default folder for your Database, Log files and SYSVOL, to change a folder click on Browse. If you don't want to change the folder than click on Next


11. Now Choose a strong password, and click on Next


12. We are almost done, on this page you can verify all the settings, if you think there is something wrong than you may click on Back and can correct them. If every thing is OK, than click on Next


 After you click Next, the wizard will start installing Active Directory.

(THIS CAN TAKE SOME MINUTES SO BE PATIENTS)





13. Upon successfully installation of Active directory you will see this window, click on Finish


14. You will be required to restart you windows, Save all your work and than click on Restart Now


Now You have successfully installed Active Directory

:)

Tuesday, November 16, 2010

WINDOWS XP: CONTROL PANEL SHORTCUTS

If you frequently use components in control panel, you might have noticed that every time in order to open an application you first have to open control panel than the application


Do you want a shorter way to access all these components, without open control panel ??


If so, than this post will be very useful for you. As today I am going to share some shortcuts.



Component Name
Icon
Shortcut

Accessibility Option



access.cpl

Add New Hardware



 Hdwwiz.cpl

Add and Remove Program


appwiz.cpl

Date and Time Properties


Control timedate.cpl

Display properties


Control desk.cpl

Fonts



Fonts

Internet properties


Inetcpl.cpl

Joystick properties


Joy.cpl

Keyboard properties


Main.cpl keyboard

Modem properties


telephon.cpl

Mouse properties


Main.cpl

Network properties


Ncpa.cpl

Regional Settings


Intl.cpl

Scanner and Cameras


Wiaacmgr.exe

Sound properties


Mmsys.cpl

System Properties


Sysdm.cpl