Posts

Showing posts with the label C#

Deployment of Provider-Hosted App Package on Azure

Image
Provider-Hosted App on Azure  Step 1: In windows, search for Developer Command Prompt of VS2012 . Right click the icon and click on Run as administrator . Here use the msbuild command with the below parameters and values, which will build the solution and create a package. msbuild ".sln file path" /p:DeployOnBuild=true /p:DeployTarget=Package /p:Configuration=Release /p:PublishProfile=" FTP.pubxml file path"   /p:Password="usrPWD value” /p:AllowUntrustedCertificate=true /p:VisualStudioVersion=12.0 o    msbuild : path to .sln file of your solution o    DeployOnBuild : true o    DeployTarget : Package o    Configuration : Release o    PublishProfile : path to .pubxml file of FTP settings in ‘Profiles/PublishProfiles’ folder of AppWeb path in solution o    Password : value of userPWD from .publishSettings file that you have downloaded from azure web app ...

XML file creating and reading in C#

To create an XML File from C# code side you can write down a small function that would take input parameters of the values that you want be insert in as values of  an XML File. public static bool CreateXml( string JuiceName, string CookieName, int NoOfBreadPackets, int NoOfEggs) { bool IsCreated = false ; try { XmlDocument doc = new XmlDocument(); XmlNode docNode = doc.CreateXmlDeclaration( "1.0" , "UTF-8" , null ); doc.AppendChild(docNode); XmlNode MainNode = doc.CreateElement( "GroceryItems" ); doc.AppendChild(MainNode); XmlNode Node1 = doc.CreateElement( "Juice" ); string str1 = Convert.ToString(JuiceName); Node1.InnerXml = str1; MainNode.AppendChild(Node1); XmlNode Node2 = doc.CreateElement( ...