.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Others >> Post New QuestionBookmark and Share Subscribe to Forum

Integrate Web project with windows project

Posted By: seattlegirl     Posted Date: March 06, 2012    Points:5   Category :Others
Is it possible to pass some value from a web project to a windows project ?If yes please give example.

Responses
Author: Mahesh             
Posted Date: March 07, 2012     Points: 20   

Hi,
You can invoke windows application and pass values to windows application provided
that both web and windows application's are on the same server and you had full
permission to call that exe(windows application), to give permissions follow
following steps,

1. Open IIS manager.
2. Expand the “Application Pools” node.
3. Right click the coresponding application pool, and then select “Properties”.
4. Click the “Identity” tab, and select the “Local System” identity in the “Predefined” dropdown list.

then you can call exe as and pass command line parameters to it,

string locn = ConfigurationManager.AppSettings["EXELOC"];
Process myProcess = new Process();
try
{
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.FileName = locn + "DoComplexTask.exe";
myProcess.StartInfo.Arguments = "100 false";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Thanks,
Mahesh



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend