Wednesday, September 7, 2016

install Subversion version control server IN UBUNTU

How to install Subversion version control server (with Apache support)

  • Install Subversion and Apache 2 Module
sudo apt-get install subversion apache2 libapache2-svn
  • Enable Subversion/DAV Apache 2 Module
sudo a2enmod dav_svn
  • Configure Apache 2
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Edit the file to look something like this:
<strong><Location /svn></strong>
<strong><span>  </span>DAV svn</strong>
<strong><span>  </span>SVNPath /home/svn</strong>
<strong> </strong>
<strong><span>  </span>AuthType Basic</strong>
<strong><span>  </span>AuthName "Subversion Repository"</strong>
<strong><span>  </span>AuthUserFile /etc/apache2/dav_svn.passwd<span style="color: red">-------we have to create</span> </strong>
<strong><span>  </span>Require valid-user</strong>
<strong></Location></strong>
  • Create Subversion Repository
sudo mkdir /home/svn
sudo svnadmin create /home/svn
  • Give Apache 2 Permissions to Repository
sudo chown -R www-data /home/svn
  • Create Repository User
Replace 'username' with your username
sudo htpasswd -cm /etc/apache2/dav_svn.passwd username
Enter password when prompted.
  • Restart Apache 2
sudo /etc/init.d/apache2 restart
  • Working with the new repository
Open a terminal window and paste:
svn checkout <a href="http://username@localhost/svn" title="http://username@localhost/svn">http://username@localhost/svn</a> lucky
You will be prompted to enter the password. Now you have a working copy in the directory 'lucky'. Now lets create a file and commit it.
cd lucky
mousepad Hello.txt
Enter anything you like in the file and click save, Exit.
svn add Hello.txt
Now you added the file but it won't appear in the repository yet, you have to commit it. To commit, its as easy as doing the following:
svn commit
Now check your repository using the web browser at http://localhost/svn/.

Parser Error Message: Could not load type 'ApplicationName.Global' on IIS configuration

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Reference URL:- http://support.microsoft.com/kb/320268
When you use a virtual directory that points to a remote share to host a Microsoft ASP.NET-based application, you may receive an error message that is similar to one of the following:

To resolve this behavior, grant the FullTrust right to the remote share:
  1. On the Web server, open Administrative Tools, and then double-click Microsoft .NET Framework Configuration.
  2. Expand Runtime Security Policy, expand Machine, and then expand Code Groups.
  3. Right-click All_Code, and then click New.
  4. Select Create a new code group. Give your code group a relevant name, such as the name of the applications share. Click Next.
  5. In the Choose the condition type for this code group list, select URL.
  6. In the URL box, type the path of the share in the following format:
    file:////\\computername\sharename\*
    Note Replace computername with the name of the computer that is hosting the remote share. Replace sharename with the name of the share.
  7. Click Next. On the next page, select Use an existing permission set, and then select FullTrust.
  8. Click Next, and then click Finish.
  9. Restart Microsoft Internet Information Services (IIS) to restart the ASP.NET worker process.
If Microsoft .NET Framework Configuration is not displayed under Administrative Tools, you can install the .NET Framework SDK to add Microsoft .NET Framework Configuration. Alternatively, you can run the following command to make the change:


Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on

BY Using command

C:\WINDOWS\Microsoft.NET\Framework>v2.0.50727\CasPol.exe -m -ag 1 -url "file:////\\noc\data\*" FullTrust -exclusive on

AfterRunning above command we can see the below

Microsoft (R) .NET Framework CasPol 2.0.50727.1433
Copyright (c) Microsoft Corporation.  All rights reserved.

The operation you are performing will alter security policy.
Are you sure you want to perform this operation? (yes/no)
yes
Added union code group with "-url" membership condition to the Machine level.
Success

How to clear out corrupted definitions for a Symantec Endpoint Protection client manually





Subject

How to clear out corrupted definitions for a Symantec Endpoint Protection client manually

Content

Problem


How to fix and rebuild corrupted definitions for a Symantec Endpoint Protection (SEP) client.

Solution



DISCLAIMER:The following instructions are for the Symantec Endpoint Protection product ONLY.
If there are any other Symantec products installed on the system that share the virus definitions please contact Symantec Technical Support.



Instructions for 32-bit Operating Systems:

For Windows 2000/2003/XP
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, typing in smc -stop, and pushing Enter.
    1. Click the Start button and then click Run
    2. Type services.msc and click OK
    3. Right-click Symantec Endpoint Protection and click Stop.
    4. Minimize the Services window

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\Program Files\Common Files\Symantec Shared\VirusDefs\
      - Delete all files and subfolders
    • Delete the downloaded data in the "C:\Documents and Settings\All Users\Application Data\Symantec\Liveupdate\downloads"

      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button and then click Run
    2. Type regedit and click OK
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection service and click Start.

For Windows Vista/Server 2008/Windows7
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter
    1. Click the Start button.
    2. In the search bar type services and then press Enter.
      Note: If the User Account Control prompt pops up click Continue.
    3. Right-click Symantec Endpoint Protection and click Stop.

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
       
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\ProgramData\Symantec\Definitions\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button
    2. Type regedit and press Enter
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection and click Start.
Instructions for 64-bit Operating Systems:

For Windows 2000/2003/XP
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter.
    1. Click the Start button and then click Run
    2. Type services.msc and click OK
    3. Right-click Symantec Endpoint Protection and click Stop.
    4. Minimize the Services window

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\Program Files (x86)\Common Files\Symantec Shared\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button and then click Run
    2. Type regedit and click OK
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection service and click Start.

For Windows Vista/Server 2008/Windows 7
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter.
    1. Click the Start button.
    2. In the search bar type services and then press Enter.
      Note: If the User Account Control prompt pops up click Continue.
    3. Right-click Symantec Endpoint Protection and click Stop.
      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\ProgramData\Symantec\Definitions\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button
    2. Type regedit and press Enter
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection and click Start.


References
In some instances, Symantec Technical Support may recommend the use of an unsupported tool that automates the removal of corrupted SEP definitions. For details please see Using the "Rx4DefsSEP" utility at http://www.symantec.com/business/support/index?page=content&id=TECH93036&locale=en_US


Technical Information
How to disable Tamper Protection:
  • Open and log into the Symantec Endpoint Protection Manager console
  • Click the Clients view.
  • Select the appropriate group.
  • Under the Policies tab, in the "Settings" section, click General Settings.
  • Under the Tamper Protection tab, uncheck Protect Symantec security software from being tampered with or shut down.
  • Click OK.


IMPORTANT: Once definitions will be purged, the following popup message will appear:
"Virus definitions are missing on this computer. This computer will remain unprotected until definitions are downloaded from the network. Contact your system administrator for help updating your virus definitions."
This message will keep showing (after every smc -stop/smc -start or session opening), even when Symantec Endpoint Protection will receive/apply new set of definitions, until "Symantec Endpoint Protection" service is restarted. To avoid this, it is possible either:
 - to drop JDB file to update client then restart "Symantec Endpoint Protection" service
 - to use Rx4DefsSEP
 - to use a script which is checking Antivirus/Antispyware definition status and restart "Symantec Endpoint Protection" service if appropriate
NOTE: this behavior is as designed.

   

 


Article URL http://www.symantec.com/docs/TECH103176






Outlook(scanpst.exe) Recovery

Content

To work around this problem, use the Inbox Repair Tool (Scanpst.exe) to repair your personal mail file. To do this, follow these steps:
  1. Exit Outlook .
  2. Click Start
    Collapse this imageExpand this image
    , and then click Control Panel.
  3. Click User Accounts and Family Safety or User Accounts.

    Note If you do not see User Accounts and Family Safety or User Accounts, go to the next step.
  4. Click Mail.
  5. Click Data Files, click Personal Folders, and then click Settings.
  6. Note the text in the Filename box.

    Note If you cannot view all the text, click in the Filename box, and then press the RIGHT ARROW key repeatedly.
  7. Click OK, and then click Close two times.
  8. Click Start
    Collapse this imageExpand this image
    , type %ProgramFiles%\Microsoft Office\Office12\ in the Start Search box, and then press ENTER.
  9. Double-click Scanpst.
  10. In the Enter the name of the file you want to scan box, type the path and file name of the Outlook .pst file that you noted in step 6.
  11. Click Start.
  12. When the Inbox Repair Tool finishes, click OK.

Adding Mac to windows Domain

Joining Active Directory
By default, you will have to enter your domain username and password every time you access a server resource when that resource is not connected to the Mac (i.e., right after bootup, after a share has been “ejected”, or if a network connection drops the connection to the server). By joining the Macintosh to Active Directory, you can log into the Mac with your Active Directory user credentials and not have to enter them every time you access a shared resource. To be able to log in to the Mac with Active Directory credentials, follow these steps.
  1. From the Utilities folder in the Applications folder, open the Directory Utility application.
  2. Once the application opens and finishes the process of detecting directory servers on the network, click the Show Advanced Settings button.
  3. When the Advanced Settings appear, click the Services icon.
  4. Click the lock to get access to the panel. You will be prompted for credentials. Enter your Macintosh username and password, then click OK.
  5. Double-click on the Active Directory line to open the Active Directory configuration.
  6. Click on the Show Advanced Options triangle.
  7. Enter the internal domain name in the Active Directory Domain field.
  8. Change the name of the Mac to a shorter name in the Computer ID field.
  9. Turn on the Create mobile account at login checkbox.
  10. Select the Administrative tab.
  11. Turn on the Prefer this domain server checkbox and enter the fully-qualified domain name of the SBS server (i.e., servername.domainname.local).
  12. Turn on the Allow administration by checkbox.
  13. Click Bind to join the Macintosh to the domain.
  14. Enter the domain administrator username and password when prompted. The Macintosh will be placed in the Computers container by default. This can be changed in Active Directory later if needed.
  15. Once the join process is complete, you will see both the Active Directory Forest and Active Directory Domain fields populated.
  16. Confirm that the Active Directory checkbox is enabled in Directory Utility and close the application.
  17. Open System Preferences and click the Accounts icon.
  18. Click the lock to make changes and enter the password for the local Mac account.
  19. Click on the Login Options icon in the navigation tree.
  20. Set Automatic Login to Disabled.
  21. Close System Preferences.
  22. Log out of the Mac account by selecting Log Out from the Apple menu. You do not need to restart the Mac to be able to log in with your Active Directory credentials.
  23. When you get the login screen, click Other.
  24. Enter your Active Directory credentials as domainname\username.
  25. You will be prompted to create a mobile account. Click Create Now.
  26. Once login completes, open System Preferences and open the Accounts pane.
  27. Click the lock to make changes.
  28. When you are prompted to enter an administrator credentials, you will need to enter information for the local Macintosh account. You will need to enter the short name as the account name. If you are not sure what the short name is, log back in as the Mac user and look for the name of the home folder. The home folder is named with the short name of the account.
  29. After you enter the authentication information, turn on the Allow user to administer this computer checkbox.
  30. You will get a message that you need to log out and log back in for the settings to take effect. Click OK.
  31. Log out and log back in with the Active Directory credentials.
  32. Open a new Finder window and select the server name in the Shared section of the navigation tree. All of the shares on the server will appear and can be selected from here. You can also use the Connect to Server method described earlier in this document to connect. The difference is that you will not be prompted to enter a username and password when you enter the network resource you wish to use.

Connect Sql Server Using Windows Authentication from a non-domain joined machine



command
"C:\Windows\System32\runas.exe /user:username@domainname /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"  "

Sometimes it is necessary to use Windows domain credentials to authenticate with a SQL Server from a non-domain joined machine. Here’s a trick from my coworker Martin Kastenbaum to pass Windows domain credentials from a non-domain joined machine. You can pass your Windows credentials to SQL Server Management Studio by making a simple modification to the shortcut you use to launch it. It's probably a wise idea to make a copy of your SSMS shortcut and make all changes to the copy, not the original.




Figure 1. SSMS 2005 shortcut on the left, SSMS 2008 shortcut on the right.
You need to modify the target, but first you should press the Change Icon… button and save the path to the icon. You’ll need to use it later.


Figure 2. Save the path for the icons.
Modify the shortcut’s target as follows:
SQL Server 2008 x64: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"
SQL Server 2008 x86: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"
SQL Server 2005 x64: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe -nosplash"
SQL Server 2005 x86: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe -nosplash"
The –nosplash is optional. It slightly speeds up the SMSS startup time.
Modifying the shortcut’s target messes up the icon. You’ll want to fix that by pressing the Change Icon… button again and restoring the path to the one you saved earlier. In case you didn’t save the path, the default values for the path to the icon are:
SQL Server 2008 x64: %ProgramFiles% (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe
SQL Server 2008 x86: %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe
SQL Server 2005 x64: C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe
SQL Server 2005 x86: C:\Program Files\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe
When you start SSMS from a modified shortcut, you’ll be prompted for your domain password:

Figure 3. Password Prompt
Notice that the Connect to Server dialog is misleading after making this change. Although it properly shows I’m using Windows Authentication, it incorrectly indicates that my credentials are Win7L\John, which they are not. Once I click connect, I’m connected with the Domain\Username supplied in the modified shortcut.
Figure 4. Notice that the supplied domain and username do not appear in the dialog box.
This is a handy trick for consultants who use their own laptops to connect to a client’s domain joined SQL Server.





Friday, August 19, 2016

Selenium Installation (JAVA) On Windows and MAC

Selenium Installation (JAVA)
OS : Windows and MAC
1 INSTALL JAVA ON YOUR COMPUTER
Download and install the Java Software Development Kit (JDK).
http://www.oracle.com/technetwork/java/javase/downloads/index.html

This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need to download and install the JRE separately.

1.1 JDK INSTALLATION FOR MAC OS

Note that installing the JDK on a Mac is performed on a system wide basis, for all users, and administrator privileges are required. You cannot install Java for a single user.
Installing the JDK also installs the JRE. The one exception is that the system will not replace the current JRE with a lower version. To install a lower version of the JRE, first uninstall the current version.
When you download the Java Development Kit (JDK), the associated Java Runtime Environment (JRE) is installed at the same time. The JavaFX SDK and Runtime are also installed and integrated into the standard JDK directory structure.
Depending on your processor, the downloaded file has one of the following names:
jdk-7u<version>-macosx-amd64.dmg
jdk-7u<version>-macosx-x64.dmg
Where <version> is 6 or later.
1. Download the file. Before the file can be downloaded, you must accept the license agreement.
2. From either the Downloads window of the browser, or from the file browser, double click the .dmg file to launch it.
3. A Finder window appears containing an icon of an open box and the name of the .pkg file Double click the package icon to launch the Install app.
4. The Install app displays the Introduction window. Click Continue.
4a. Note that, in some cases, a Destination Select window appears. This is a bug, as there is only one option available. If you see this window, select Install for all users of this computer to enable the continue button. Click Continue.
5. The Installation Type window appears. Click Install.
6. A window appears which says "Installer is trying to install new software. Type your password to allow this." Enter the Administrator login and password and click Install Software.
7. The software is installed and a confirmation window appears
After the software is installed, delete the dmg file if you want to save disk space.

1.2 UNINSTALL THE JDK (MAC OS)

To uninstall the JDK, you must have Administrator privileges and execute the remove command either as root or by using the sudo(8) tool.
Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format:*
    /Library/Java/JavaVirtualMachines/jdk<major>.<minor>.<macro[_update]>.jdk
For example, to uninstall 7u6:
    % rm -rf jdk1.7.0_06.jdk

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.
*The 7u4 and 7u5 releases were installed into a directory that does not follow this format. To uninstall 7u4 or 7u5, remove the 1.7.0.jdk directory from the same location.


2 INSTALL ECLIPSE IDE

Download "Eclipse IDE for Java Developers".
http://www.eclipse.org/downloads/
Be sure to choose correctly between Windows 32 Bit and 64 Bit versions.


You should be able to download a ZIP file named "eclipse-java-juno-SR1-win32-x86_64.zip" (the version number "SR1" may change over time).

Inside that ZIP file, there is an "eclipse" folder which contains all the application files. You can extract the "eclipse" folder anywhere you want in your PC; but for this tutorial, extract it to your C drive.

Unlike other popular software, no installation is required to use eclipse.
For MAC OS:



3 DOWNLOAD THE SELENIUM JAVA CLIENT DRIVER

You can download the Selenium Java Client Driver from
http://docs.seleniumhq.org/download/
You will find client drivers for other languages there, but only choose the one for Java.



This download comes as a ZIP file named "selenium-2.25.0.zip". For simplicity, extract the contents of this ZIP file on your C drive so that you would have the directory "C:\selenium-2.25.0\". This directory contains all the JAR files that we would later import on Eclipse.

4 CONFIGURE ECLIPSE IDE WITH WEB DRIVER

1. Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:\eclipse\eclipse.exe.
2. When asked to select for a workspace, just accept the default location.



3. Create a new project through File > New > Java Project. Name the project as "myproject".
4. Right-click on the newly created project and select New > Package, and name that package as "mypackage".
5. Create a new Java class under mypackage by right-clicking on it and then selecting New > Class, and then name it as "myclass". Your Eclipse IDE should look like the image below.

6. Right-click on myproject and select Properties.
7. On the Properties dialog, click on "Java Build Path".
8. Click on the Libraries tab, and then click "Add External JARs.."
9. Navigate to C:\selenium-2.25.0\ (or any other location where you saved the extracted contents of "selenium-2.25.0.zip" in step 3).
10. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now look similar to the image below.

11. Finally, click OK and we are done importing Selenium libraries into our project.