Desktop Application run from web application on server And Also Pass Argument

 →  First Publish your Desktop application on server
  
→  So Now you can run your desktop application online.
 → And After Publish Desktop application you can runt that application from your browser.


   PASSING PARAMTER TO PUBLISH DESKTOP APPLICATION FROM WEB APPLICATION



 →  First Publish your Dektop application so your publish folder contain  APPLICATIONNAME.application


 →  after that open your VS 2005 Command Propmt.

→  Run the Command mageui


 →  So Window open which shown Below screen short.




 → Now open APPLICATIONNAME.application   File from open Window  The Application File Which Resides On Server


 →  Now From Left Pannel Go on Deployment Open And Check on Allow Url Parameter ,  Screen Short Shown Below.


 →  Now in Desktop Application in Which you Need Query String paramter Just Write Down Below Code On Load.






private string GetQueryStringParameters()
    {
        NameValueCollection nameValueTable = new NameValueCollection();
        if (ApplicationDeployment.IsNetworkDeployed)
        {
            string queryString = ApplicationDeployment.CurrentDeployment.ActivationUri.Query;
            string[] arInfo = new string[4];
            char[] splitter = { '=' };
            arInfo = queryString.Split(splitter);
            return arInfo[1].ToString();
        }

        else
        {
            return "";
        }
    }

→ I need only One Argument So I Do this You Can Get collection of Argument

                                if you have any question and suggestion Then write Down in commentBox.



Prev Post                                                      All Post                                                           Next Post



Posted in |

0 comments:

Post a Comment