Home Join Now Learn More Sign in
Home | Admin | Sign Out 
Find a Form 

Access thousands of free legal and business forms contributed by leading lawyers and other professionals

Search by key words (e.g., "Sales Contract")
Advanced search

 
Promote Your Business  
  • Contribute a legal or business form and network with thousands of potential clients, businesses, and professionals

    Upload a Form Add Your Executive Profile
Promote Your Business 
  • Contribute a legal or business form and network with thousands of potential clients, businesses, and professionals

    Upload a Form Add Your Executive Profile
Promote your business  
  • Contribute a legal or business form and network with thousands of potential clients, businesses, and professionals

    Upload a Form Add Your Executive Profile
Add your free profile  
  • Contribute a legal or business form and network with thousands of potential clients, businesses, and professionals

    Upload a Form Add Your Executive Profile
 
Connect

Terms Of Use

Submissions to this site, including any legal or business forms, posts, responses to questions or other communications by contributors are not intended as and should not be construed as legal advice. You are strongly encouraged to consult competent legal council before engaging in any action based upon content contained on this site.

These downloadable forms are only for personal use. Retransmission, redistribution, or any other commercial use is prohibited. This includes reposting forms from this site to another site offering free legal or other document forms for download.

Please note that the donator may have included different usage terms regarding this form, and you agree to abide by these terms. It is highly recommended that you have a licensed attorney review any legal documents for which you are searching in order to make sure that your needs are being properly and completely satisfied.

Your use of this site constitutes your acceptance of our terms of use and your agreement to hold this site, its officers, employees and any contributors to this site harmless for any damage you might incur from your use of any submissions contained on this site. If you do not agree to the above terms, please do not proceed.

These forms are provided to assist business owners and others in understanding important points to consider in different transactions. They are offered with the understanding that no legal advice, accounting, or other professional service is being offered by these documents or on this website. Laws vary in the different states. Agreements acceptable in one state may not be enforced the same way under the laws of another state. Also, agreements should relate specifically to the particular facts of each situation. Therefore, it is important to consult legal counsel whenever utilizing these forms. The Forms are not a substitute for legal advice YourFreeLegalForms.com is not engaged in recommending or referring members on the site or making claims about the competence, character or qualifications of its participating members.
Close

Thank you for using
Yourfreelegalforms.com


Your online source for 100% free legal and business forms.
Have a form to contribute?
Contribute a legal or business form, checklist or article and have your profile displayed on the same page as the form for free, powerfull, targeted marketing to those searching for legal forms and advice.

Advertise your business to thousands for free – Contribute a form
Form #1242

test form caps

Average user rating:  
Not Yet Rated
Rate it

sfdg


dfg
Need this form customized? Download This Form Printer Friendly Version
How to Add Windows Service in ASP.NET Application

1 - Add New Project

2 - Project Type - Visual c# - Windows - Windows Service - Give the name of the Service
This will cereate new project in the Solution.

3 - Add New Service File Add New Item - Windows Service (SearchCache.cs)

4 - Make the following changes in theb Program.cs which is starting point.
ServicesToRun = new ServiceBase[] { new SearchCache() };

5 - Add the references of the DLL (Business Layer).

6 - Add the following code in the SearchCache.cs file

---------------------------------------------------------------------------------
/*
* Author : Sunil Agrawal
* Description : This Service will update the Cache Pages for Basic Search and Advance Search
*/
#region [Using]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.IO;
using Gagla.BusinessLayer.Facade;
#endregion

namespace SearchCache
{
partial class SearchCache : ServiceBase
{
#region[Variables]
private System.Timers.Timer tmrBasicSearch;
private System.Timers.Timer tmrAdvanceSearch;
#endregion

#region[Constructor]
public SearchCache()
{
InitializeComponent();
this.tmrBasicSearch = new System.Timers.Timer();
((System.ComponentModel.ISupportInitialize)(this.tmrBasicSearch)).BeginInit();
tmrBasicSearch.Interval = 60000; //1 Minute
this.tmrBasicSearch.Elapsed += new System.Timers.ElapsedEventHandler(tmrBasicSearch_Elapsed);
((System.ComponentModel.ISupportInitialize)(this.tmrBasicSearch)).EndInit();
}
#endregion

#region[Timer Interval Events]
void tmrBasicSearch_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
tmrBasicSearch.Enabled = false;
try
{
StreamWriter sWriter = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "\\Result.txt", true);
for (int i = 0; i <= 100; i++)
{
sWriter.WriteLine(DateTime.Now.ToString() + " : " + DateTime.Now.Ticks.ToString() + " -- " + i.ToString());
}
sWriter.Close();
sWriter.Dispose();
}
catch (Exception ex)
{
WriteBasicSearchLog(DateTime.Now.ToString() + " : " + ex.Message);
}
finally
{
tmrBasicSearch.Enabled = true;
}

}
#endregion

#region[Log]
public static void WriteBasicSearchLog(string logText)
{
StreamWriter writer = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "\\BasicSearchLog.txt",true);
writer.WriteLine(logText);
writer.Close();
writer.Dispose();
}
#endregion

protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
tmrBasicSearch.Enabled = true;
}

protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
}
}
}

---------------------------------------------------------------------------------

7 - Add the Installer file by double clicking on "SearchCache.cs"

8 - right click on the design view and select the option "Add Installer". This will add the file "ProjectInstaller.cs".

9 - Open the file "ProjectInstaller.Designer.cs" file and change the Name of the Service(SearchCache) in following line.
this.serviceInstaller1.ServiceName = "SearchCache";

10 - add following line in file before servicename.
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;

11 - Build the Project.

12 - Open the Visual Studio 2005 - Visual Studio Tools - Visual Studio 2005 Command Prompt - move to the Service project\bin\debug folder.

13 - Install the Service using following command
installutil -i SearchCache.exe
14 - Open Services and Start the Service
15 - You can uninstall the service by following command.
installutil -u SearchCache.exe

16 - Prepare the Inslatter by adding new project in the solution
Add New Project - Other Project Types - Setup and Deployment - Setup Project (SearchCacheInstaller)

17 - Right click on the Setup Project and select Add - Project Output

18 - Select the Project (SearchCache) from Project List.

19 - Select "Primary Output" from the list, Click Ok.

20 - Right Click on the Setup and select View - Custom Actions (This will register the Service in the Services)

21 - Right Click on the Install folder and select Add Custom Action

22 - Open Application Folder - Select Files of type (*.all)

23 - Select Promary Output from SearchCache(Active)
This will add that in the Install folder

24 - Add Supported File by Add - File - Select File(ServerConfig.xml)

25 - Compile the Setup Project

26 - Move to ProjectFolder\Debug

27 - Install the Setup by double clicking on the .MSI file(SearchCacheInstall.msi)

28 - Open the Services and Start the Service


 
Contributed by
Zinith
 
Total Forms Contributed 25
 

See All Zinith's Forms
 

Related Forms

Form of Senior Promissory Note
Unit offering summary of PPM
Complete Form of Zoning Ordinance
Non-Disclosure and Confidentiality Agreement
Beta Test License Agreement

Terms Of Use

Submissions to this site, including any legal or business forms, posts, responses to questions or other communications by contributors are not intended as and should not be construed as legal advice. You are strongly encouraged to consult competent legal council before engaging in any action based upon content contained on this site.

These downloadable forms are only for personal use. Retransmission, redistribution, or any other commercial use is prohibited. This includes reposting forms from this site to another site offering free legal or other document forms for download.

Please note that the donator may have included different usage terms regarding this form, and you agree to abide by these terms. It is highly recommended that you have a licensed attorney review any legal documents for which you are searching in order to make sure that your needs are being properly and completely satisfied.

Your use of this site constitutes your acceptance of our terms of use and your agreement to hold this site, its officers, employees and any contributors to this site harmless for any damage you might incur from your use of any submissions contained on this site. If you do not agree to the above terms, please do not proceed.

These forms are provided to assist business owners and others in understanding important points to consider in different transactions. They are offered with the understanding that no legal advice, accounting, or other professional service is being offered by these documents or on this website. Laws vary in the different states. Agreements acceptable in one state may not be enforced the same way under the laws of another state. Also, agreements should relate specifically to the particular facts of each situation. Therefore, it is important to consult legal counsel whenever utilizing these forms. The Forms are not a substitute for legal advice YourFreeLegalForms.com is not engaged in recommending or referring members on the site or making claims about the competence, character or qualifications of its participating members.
Close

Thank you for using
Yourfreelegalforms.com


Your online source for 100% free legal and business forms.
Have a form to contribute?
Contribute a legal or business form, checklist or article and have your profile displayed on the same page as the form for free, powerfull, targeted marketing to those searching for legal forms and advice.



Was this form helpful? Yes No
Need a different form? Yes No


Need a different form? Need a custom form or service?

post a request to our community.


Comments




Keywords: dfg

close