Sunday, August 28, 2011

How to Deploy Web Services in Managed Code

 How to  Deploy Web Services in Managed Code

Visual Studio 2008


When using Visual Studio .NET to create Web services in managed code, you use a standard deployment model: you compile your project and then you deploy the resulting files to a production server. The project .dll file contains the Web services code-behind class file (.asmx.vb or .asmx.cs) along with all other class files included in your project, but not the .asmx file itself. You then deploy this single project .dll file to the production server without any source code. When the Web service receives a request, the project .dll file is loaded and executed. 



Suppose you have a simple ASP.NET Web Service project named WebService1 that contains the following: 

  • A Web service entry page named Service.asmx.
  • A code file named Service.vb (or .cs).

 When you compile the project, the following occurs:
  • Visual Studio saves all of the files in the project you modified since the last build.
  • Visual Studio copies the Service1.asmx file and the default project files to the development Web server.
  • The Service.vb (or .cs) class file and the Global.asax class file are compiled into the project .dll file, which is then copied to the server in the default \bin directory of the target virtual directory. If the project is set to compile a debug version, Visual Studio creates a project .pdb file in the \bin directory.


 To deploy the Web service to a server other than the development server, you can add a Web Setup project or you can copy the required files to the destination server. To make your Web service available to others, you will need to deploy it to a Web server that is accessible to the clients you wish to support. For more information, see Deploying Applications and Components and How to: Copy a Project.

To deploy the Web service by copying the project

  1. In Solution Explorer, select the project you want to copy.
  2. On the Website menu, click Copy Web Site.
  3. Click the icon next to the Connect to: dropdown box to open the Open Web Site dialog box.
  4. In the Open Web Site box, select the location to which you want to copy the project.
  5. Using the arrow icons, select files from the source web site to copy to the remote web site.
  6. Click Copy Web Site to copy the web site.

 

After deploying your Web service, you need to consider how to make it possible for developers to locate it if you intend others to use it. For more information, see How to: Enable Discovery for XML Web Services.



 

Thursday, June 23, 2011

Deploy SSIS Packages SQL Server 2008 R2

Use the Deploy SSIS Packages page to specify where to install Integration Services packages and their dependencies.

File system deployment

Deploy packages and dependencies in a specified folder in the file system.

SQL Server deployment

Deploy packages and dependencies in an instance of SQL Server. Use this option if SQL Server shares packages between servers. Any package dependencies are installed in the specified folder in the file system.

Validate packages after installation

Indicate whether to validate packages after installation.

Next


Go to the next page in the wizard.

Finish

How to Increase Webside in Search Engine

Most businesses don't take advantage of various techniques to increase search engine ranking, but few things on the Internet can be as beneficial as a high ranking on a search engine. A recent Forrester Research report showed that 80% of web surfers discover the new sites that they visit through search engines (such as Yahoo, Google, or MSN). According to iProspect, 85% of web users use search engines to find solutions and vendors. Properly optimizing a site to increase your search engine ranking for each page helps it to attract numerous, highly targeted visitors- visitors that may become buyers.

For the technically inclined, there are numerous places on the web to get detailed, in-depth information on how to achieve a high ranking on a search engine. However, many people don't care about the technical aspects of search engine optimization- they just want to know what is wrong with their site (and how to fix it). What follows is a practical guide that covers some of the most basic tips that can be used to increase search engine ranking. It is in no way intended to be comprehensive, but it should help the average site owner determine whether their site is optimized, and if not, how to make some simple changes to give each individual page of their site a better chance for a high ranking on a search engine.

Issue #1- The Title Bar

This is one of the most often overlooked techniques to increase search engine ranking. On your homepage, what does the title bar say? If you use Internet Explorer, this is the blue bar at the very top of the window that displays your page (it may include the words "Microsoft Internet Explorer" at the end). Does your company name appear here by itself when you have more important keywords to emphasize? Worse yet, does it say "untitled"? If you want to increase the search engine ranking for that page, this area should contain the most important keywords you see on your homepage. To check the rest of your site, click on any link from your homepage and see if the words in this title bar change for each page in your site. They should - and each title bar should contain the most important keywords from its corresponding page

Issue #2- Content

Search engines all try to list sites that contain good content. Translation: you need words on your pages to achieve a high ranking on a search engine, not flashy graphics. This text should contain the most important keywords that your potential customers would use to find you on a search engine. If you have very few or no words on a page where you wish to increase the search engine ranking, it is a good idea to add some, ideally around 250 per page. For aesthetic reasons, this is not always practical, but even 100 well-written words will give you a better opportunity for a high ranking on a search engine than none. It is also important that you make certain that the words are written in a language the search engines can read. Using your mouse, bring your cursor down to the text on one of your web pages. Clicking and holding down the left mouse button (make sure you aren't near a link) see if you can highlight just one or two words of the text. If you can, everything is most likely fine. If nothing happens, or you can only highlight a large block, it is most likely in graphic form. To increase search engine ranking in such cases, the graphic text needs to be replaced by standard HTML text to allow the search engines to read it.

Issue #3- Meta Tags

Some people believe that meta tags are the Holy Grail of achieving a high ranking on a search engine. Unfortunately, their effectiveness is limited (many engines ignore them completely), but they can play a limited role on some engines. To see if your site has meta tags, go to your home page. Click the "view" command at the top of the browser window. From the pull-down menu, select "source". This should open up another window that shows your code. Much of this may seem indecipherable, but there should be two commands there (usually near the top of the code). One of these says meta name="description" content= and will go on to describe your company and products, and one says meta name="keywords" content= and goes on to list applicable keywords for your site. If these tags are missing, have your web expert insert them. Again, this may not do much to increase search engine ranking, but it will not hurt.

Issue #4- Links

Link popularity has become increasingly important for those who wish to increase search engine ranking, with 19 of the top 20 engines using it in their ranking algorithms. Simply put, search engines give a ranking boost to sites that have links from quality, related sites. There are numerous free tools on the web that will allow you to see what sites link to yours (just type "free link popularity check" in your favorite search engine).

Conclusion

Although following the above guidelines will by no means guarantee you a high ranking on a search engine, fixing one or more of the problems should help increase your search engine ranking. For the volumes of potential customers that a search engine can send to your site, it's certainly worth the effort.

Wednesday, June 8, 2011

How to Install and Configure PHP 5 to Run with Apache on Windows

How to Install and Configure PHP 5 to Run with Apache on Windows

Steps to Setting Up PHP 5

Download PHP 5

Before you begin, get a copy of PHP 5 from the PHP download page. In particular, download the VC6 thread-safe zip package from the "Windows Binaries" section — that is, don't get the installer. For example, select the package labelled "PHP 5.2.5 zip package" if 5.2.5 is the current version.



Install PHP 5


Create a folder on your hard disk for PHP. I suggest "c:\php" although you can use other names if you wish. Personally though, I prefer to avoid names with spaces in it, like "c:\Program Files\php" to avoid potential problems with programs that cannot handle such things. I will assume that you used c:\php in this tutorial.

Extract all the files from the zip package into that folder. To do that simply double-click the zip file to open it, and drag all the files and folders to c:\php.

Upgraders: Remove the Old PHP.INI File from Your Windows Directory

If you are upgrading to PHP 5 from an older version, go to your windows directory, typically c:\windows, and delete any php.ini file that you have previously placed there.

Configuring PHP

Go to the c:\php folder and make a copy of the file "php.ini-recommended". Name the new file "php.ini". That is, you should now have a file "c:\php\php.ini", identical in content with "c:\php\php.ini-recommended".

Note: if you are using Apache 1, you should either move the php.ini file to your windows directory, "C:\Windows" on most systems, or configure your PATH environment variable to include "c:\php". If you don't know how to do the latter, just move the php.ini file to the "c:\windows" folder. You do not have to do this if you are using Apache 2, since we will include a directive later in the Apache 2 configuration file to specify the location of the php.ini file.

Use an ASCII text editor (such as Notepad, which can be found in the Accessories folder of your Start menu) to open "php.ini". You may need to make the following changes to the file, depending on your requirements

Enable Short Open Tags

Search for the line that reads:
short_open_tag = Off

If short_open_tag is set to "off", tags like "short_open_tag = On

Magic Quotes

By default, input data is not escaped with backslashes. That is, if your visitors enter an inverted comma (single quote) into your web form, the script will receive that unadorned inverted comma (single quote). This is for the most part desirable unless you have special requirements. If you want your input data to have the backslash ("\") prefix, such as, for example, to mimic your web host's settings, search for the following:
magic_quotes_gpc = Off

and replace it with:
magic_quotes_gpc = On

Do not do this unless your web host has this setting as well. Even with the setting of "Off", you can still use the addslashes() function in PHP to add the slashes for the specific pieces of data that need them.

Register Globals

A number of older scripts assume that all data sent by a form will automatically have a PHP variable of the same name. For example, if your form has an input field with a name of "something", older PHP scripts assume that the PHP processor will automatically create a variable called $something that contains the value set in that field.

If you are running such scripts, you will need to look for the following field:
register_globals = Off

and change it to the following:
register_globals = On

WARNING: Do NOT do this unless you have third party scripts that need it. When writing new scripts, it's best to always code with the assumption that the register_globals item is set to "Off".

Display Errors

On a "live" website, you typically want errors in your script to be silently logged to a PHP error file. On your own local machine, however, while you are testing and debugging a PHP script, it is probably more convenient to have error messages sent to the browser window when they appear. This way, you won't miss errors if you forget to check the error log file.

If you want PHP to display error messages in your browser window, look for the following:
display_errors = Off

And change it to:
display_errors = On

This value should always be set to "Off" for a "live" website.

Session Path

If your script uses sessions, look for the following line:
;session.save_path = "/tmp"

The session.save_path sets the folder where PHP saves its session files. Since "/tmp" does not exist on Windows, you will need to set it to a directory that does. One way is to create a folder called (say) "c:\tmp" (the way you created c:\php earlier), and point this setting to that folder. If you do that, change the line to the following:
session.save_path = "c:\tmp"

Notice that in addition to changing the path, I also removed the semi-colon (";") prefix from the line.

Alternatively, you can find out the current TEMP folder on your computer and use that. Or create a "tmp" folder in your PHP directory, like "c:\php\tmp" and set the configuration file accordingly. The possibilities are endless. If you can't decide, just create "c:\tmp" and do as I said above.

SMTP Server

If your script uses the mail() function, and you want the function to successfully send mail on your local machine, look for the following section:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

Change it to point to your SMTP server and email account. For example, if your SMTP server is "mail.example.com" and your email address is "youremail@example.com", change the code to:
[mail function]
SMTP = mail.example.com
smtp_port = 25
sendmail_from = youremail@example.com

Note that after you do this, when your script tries to use the mail() function, you will need to be connected to your ISP for the function to succeed. If you do not modify the above lines and attempt to use mail() in your script, the function will return a fail code, and display (or log) the error (depending on how you configure php.ini to handle errors).

(Note that in Apache 1.x, the smtp_port line may not be present. If so, don't include it.)


How to Configure Apache for PHP 5


There are two ways to set up Apache to use PHP: the first is to configure it to load the PHP interpreter as an Apache module. The second is to configure it to run the interpreter as a CGI binary. I will supply information for how you can accomplish both, but you should only implement one of these methods. Choose the module method if your web host also installed PHP as an Apache module, and use the CGI method if they have implemented it to run as a CGI binary.

Running PHP 5 as an Apache Module

To configure Apache to load PHP as a module to parse your PHP scripts, use an ASCII text editor to open the Apache configuration file, "httpd.conf". If you use Apache 1.x, the file is found in "c:\Program Files\Apache Group\Apache\conf\". Apache 2.0.x users can find it in "C:\Program Files\Apache Group\Apache2\conf\" while Apache 2.2.x users can find it in "C:\Program Files\Apache Software Foundation\Apache2.2\conf\". Basically, it's in the "conf" folder of wherever you installed Apache.

Search for the section of the file that has a series of "LoadModule" statements. Statements prefixed by the hash "#" sign are regarded as having been commented out.

If you are using Apache 1.x, add the following line after all the LoadModule statements:
LoadModule php5_module "c:/php/php5apache.dll"

If you are using Apache 2.0.x, add the following line after all the LoadModule statements:
LoadModule php5_module "c:/php/php5apache2.dll"

If you are using Apache 2.2.x, add the following line instead:
LoadModule php5_module "c:/php/php5apache2_2.dll"

Note carefully the use of the forward slash character ("/") instead of the traditional Windows backslash ("\"). This is not a typographical error.

If you are using Apache 1.x, search for the series of "AddModule" statements, and add the following line after all of them. You do not have to do this in any of the Apache 2 series of web servers.
AddModule mod_php5.c

Next, search for "AddType" in the file, and add the following line after the last "AddType" statement. Do this no matter which version of Apache you are using. For Apache 2.2.x, you can find the "AddType" lines in the section. Add the line just before the closing for that section.
AddType application/x-httpd-php .php

If you need to support other file types, like ".phtml", simply add them to the list, like this:
AddType application/x-httpd-php .phtml

Finally, for those using one of the Apache 2 versions, you will need to indicate the location of your PHP ini file. Add the following line to the end of your httpd.conf file.
PHPIniDir "c:/php"

Of course if you used a different directory for your PHP installation, you will need to change "c:/php" to that path. Remember to use the forward slash ("/") here again.

If you are using Apache 1, you will have already placed your php.ini file in either the Windows directory or somewhere in your PATH, so PHP should be able to find it by itself. You can of course do the same if you are using Apache 2, but I find modifying the Apache configuration file a better solution than cluttering your c:\windows directory or your PATH variable.

Thursday, April 28, 2011

How to develop a website in IIS server With Asp.net

Install the Server

Firstly Install the Server which you have like windows 2003 ,2003R2.

After the installation you install the IIS service which is into the Add/Remove Component.




After this you go into the IIS Manger

Click on Web service extension

Allowed the Active Server pages

Allowed ASP.NET




After doing this you can go to IIS service see the Websites then click on right of that then click on new Web site after this give the name of your ABC

After this go into the into the Website Properties

Click on Document

if your website main page into the index so add like index.aspx

and apply this.



After done this go into the Browser type the localhost and search you can see your website.

Monday, March 14, 2011

How to Block Webside

Easily block websites from being accessed in Safari, Firefox, or the Chrome browser

Launch the Terminal and type the following command, you will need to enter a root password:
sudo pico /etc/hosts

* Using your arrow keys navigate down and create a new line in the file
* You can block any website by following the format of:

127.0.0.1 facebook.com
127.0.0.1 myspace.com
127.0.0.1 twitter.com

* Exit and save /etc/hosts by hitting Control+O and then the Return key

Next you will need to flush your DNS cache for the changes to take effect, this is done through the Terminal as well with the following command in 10.6:

sudo dscacheutil -flushcache



Unblocking the sites is simply a matter of removing them from the /etc/hosts file and flushing your DNS cache again. This whole thing works by pointing the domains you want blocked to your machines localhost (127.0.0.1). If you wanted to be tricky you could point the blocked domain to a different IP address entirely, like 74.125.19.103 (Google.com in English). For this purpose, you can get any websites IP address by typing

nslookup domain.com

nto the Terminal.

If you want a network wide solution to blocking websites or any other network services, you’d need to modify your routers settings.

Note: This tip was covered a few years back with instructions to block websites on a Mac. I’ve gotten enough messages about the topic that I felt it was worth repeating, even though the methodology is the same.

Thursday, March 10, 2011

Installing Citrix Secure Gateway and Web Interface

Installing Web Interface 5.3

First insert the XenApp DVD and if the installation routine doesn’t automatically start run the autorun.exe located in the DVD root directory.



Click Install XenApp Server.

It may prompt for you to install .Net 3.5 Sp1. Click OK.



Click Add server roles.



Select your edition of XenApp.

Check the box to accept the license terms, then click Next.




Under Common Roles check Web Interface, then click Next.



The are no subcomponents for the Web Interface so just click Next.



Review the prerequisites that will be installed and activated, then click Next. IIS will be enabled automatically for you.



Click Install.

After the installation complete click on finish.

Tuesday, March 8, 2011

How to Install the MDaemon










MDaemon is a Windows based email and groupware server designed to fulfil the email requirementsof organisations ranging from fewer than 6 users to ones with many thousands of users. MDaemon isa reliable and easy to configure solution that, while being very reasonably priced, still offers morefeatures than virtually every other email server on the market



Installing MDaemon
Once downloaded, run the installation file.

Step through the instal ation until you get to the ‘Registration information’ step.
Registration Information
At this point, simply enter your own name and, if applicable,
your company name and then click ‘Next’. If you have
already purchased a registration key, then you can enter it
here, otherwise leave it blank and the instal er will generate a
30 day trial key for you (the trial key will act as a fully
functional MDaemon Pro licence for unlimited users).





What is your Domain Name?
This is where you tel your MDaemon server what domain
name it wil be handling email for.

IMPORTANT: you need to replace the ‘company.mail’
with your own domain name – this is later referred to as
your ‘Primary Domain’ by MDaemon. For this guide, our
domain wil be ‘company.com’. Once done, click ‘Next’.



Please Setup Your First Account
This step is straightforward. I’d recommend that you enter
the name of the person who is generally going to be
responsible for managing the MDaemon server as this first
account will become the ‘postmaster’ and wil have full
administrative rights. Note that the password needs to be
‘strong’ ie. A mix of upper and lower case letters and
numbers and at least 6 characters in length.





DNS Configuration

Leave the tick box ticked to ‘Use Windows DNS settings’. It
is assumed that the machine that you are installing MDaemon
on to already has Internet access in which case, your
Windows DNS settings should already be correct.

Please Setup Your Operating Mode
Our recommendation is to leave this option on ‘Advanced’
mode so that you can access al of MDaemon’s features.
Should you wish to switch to ‘Easy’ mode in the future, it’s
extremely easy to switch modes from MDaemon’s ‘File’
menu. Click ‘Next’.

System Service Setup
Leave this option ticked. As a service, MDaemon will operate
in the background of the PC even if a user isn’t logged into it
(an icon wil be displayed in the system tray by the clock).
This is important because your MDaemon server wil real y
need to be operating al the time so that your users can
access their email when required. Click ‘Next’




Finished

Click the ‘Finish’ button to complete the instal ation and start
MDaemon. If you need to reboot your PC, you will be
prompted to do so.



Final steps required
The fol owing are typical final configuration steps that you will need to take to complete the successful
setup of your new email system.

1. Create some new accounts for your users;
2. Configure MDaemon to dial-up your ISP when required (not needed if you use a router for
Internet access);
3. Configure MDaemon’s DomainPOP mail engine (only required if your ISP delivers all email
for your domain to a ‘catch-all’ POP3 account on their email server);
4. Configure your user’s client PCs to send and receive email through your new MDaemon
server.

Create some new accounts
For each user that is to have email, you will need to create an account on your MDaemon server. To
do this select ‘Account Manager’ from the ‘Accounts’ menu. You wil initially see two accounts listed.
One is a system account which you can ignore. The other should be the one that you created during
the instal ation wizard.

To add a new account, simply click the ‘New’ button and you’l be
presented with the screen shown here:-

Simply enter the person’s ‘Full name’, their ‘Mailbox name’ and
their ‘Account password’. By default, passwords are required to
be ‘strong’ ie. a mix of upper and lower case letters and numbers
and at least 6 characters in length.

You will notice as you type in your name, that MDaemon wil
automatically use the name to generate a mailbox name. The
default template for this is:-

$USERFIRSTINITIAL$$USERLASTNAME$

eg. Entering a full name of ‘bil bloggs’ will result in a mailbox
name of ‘bbloggs’. You can modify the template for new account
defaults at any time by selecting ‘New account defaults’ from the
‘Accounts’ menu.

Alternatively you can just enter your own mailbox name for each account as you create them.

Configure DomainPOP mail collection
(NOTE: you only need to configure this if all email for your
domain is delivered into a single ‘catch-al ’ POP3 account
by your ISP – if your ISP delivers email directly to your
server’s IP address using SMTP then you do not need to
enable MDaemon’s DomainPOP collection engine).

Select ‘DomainPOP Mail Collection’ from MDaemon’s
‘Setup’ menu. You wil be presented with the screen shown
on the right.

Tick the option to ‘Enable…’ the engine and enter the
appropriate host name, logon name and password details
for the ‘catch-all’ POP3 account at your ISP. Once done,
click ‘Apply’ and ‘OK’.

That’s it!
You should now have a fully configured and operational MDaemon mail server

Search