Hi All, You can modify value of 'AppSettingsSection' by below code. ConfigurationSectionGroup sectionGroup = config.SectionGroups["applicationSettings"]; ClientSettingsSection section = (ClientSettingsSection)sectionGroup.Sections["....Settings"]; section.Settings.Get("GeneratePDF...").Value.ValueXml.InnerText = urlname; config.Save(ConfigurationSaveMode.Minimal, true); -Thomas :)
Thomas_Mathews
Posts
-
How to use ConfigurationManager to modifying "applicationSettings" section of App.config using .NET (C#) Visual Studio2005 -
How to use ConfigurationManager to modifying "applicationSettings" section of App.config using .NET (C#) Visual Studio2005How to use ConfigurationManager to modifying "applicationSettings" section of App.config? Or it there any other way to do same? I have the code to modify "appSettings" section of app.config. 1) To modify key "SApp.Properties.Settings" of "appSettings" section of app.config I used below code:: ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); fileMap.ExeConfigFilename = @"D:\app.config"; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); AppSettingsSection section = (AppSettingsSection)config.GetSection("appSettings"); section.Settings["SApp.Properties.Settings"].Value = "i23"; config.Save(); 2)My App.config has below content:: <?xml version="1.0" encoding="utf-8"?> <appSettings> <add key="SApp.Properties.Settings" value="http://2344/soap/services"/> </appSettings> <applicationSettings> <Generate.Properties.Settings> <setting name="Generate_GeneratePDFServiceService" serializeAs="String"> <value>http://2435/GeneratePDFService</value> </setting> </Generate.Properties.Settings> </applicationSettings>
-
How to pass structure or complex data in IDispatch using invoke() method .A) There is a webservice and I am writing a client in c++ to invoke that webservice using IDispatch. I have taken the sample for c++ client from codeproject and below is the link [http://www.codeproject.com/KB/COM/xysoapclient.aspx? fid=13980&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=26&select=516139](http://www.codeproject.com/KB/COM/xysoapclient.aspx?<br mode=)[[^](http://www.codeproject.com/KB/COM/xysoapclient.aspx?<br mode= "New Window")] This is structure we pass in c# for calling method [System.Xml.Serialization.XmlTypeAttribute] public class BLOB { /// <remarks/> public string contentType; [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] public System.Byte[] binaryData; public string ID; public string URL; } B) Regarding writing a client in c# for webservice is pretty straight forward. In C# it is pass complex data in single argument. OR If above is complex is anyone know how to pass structure like below in IDispatch's Invoke() method. The COM Server is third party. struct tag{ char str[100]; void *p; char str1[300]; }
modified on Tuesday, January 20, 2009 2:25 AM
-
How To pass structure or complex data in IDispatch using invoke() method [modified]How To pass structure or complex data in IDispatch using invoke() method. The COM server component is third party's so I donot have control on what defined in IDL or whatever technology they used. for example I want to pass complex data or structure like below to invoke() method. struct tag{ int i[10]; char str[40]; }sample; Below is sample code to access method passing argument. // Code omitted for brevity. szMember = “On”; dispparams.rgvarg[0].vt = VT_BOOL; dispparams.rgvarg[0].bool = FALSE; dispparams.rgdispidNamedArgs = &mydispid; dispparams.cArgs = 1; dispparams.cNamedArgs = 1; hresult = GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid); hresult = pdisp->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); I need to pass one argument in IDispatch's Invoke method as below . This is sample code from c# client. I already have client C# code working. I want to pass structure which has byte array and string etc in c++ using IDispatch. How usually people pass structure as single argument in IDispatch's Invoke method() public class BLOB { /// <remarks/> public string contentType; public System.Byte[] binaryData; public string ID; public string URL; } OR If above is complex is anyone know how to pass structure like below in IDispatch's Invoke() method. The COM Server is third party. struct tag{ char str[100]; void *p; char str1[300]; }
modified on Tuesday, January 20, 2009 2:23 AM
-
How to pass structure or complex data in IDispatch using invoke() method .Thanks for the reply but my question remain unanswer. The COM component is third party's so I donot have control on what defined in IDL or whatever technology they used. I need to pass one argument in IDispatch's Invoke method as below . This is sample code from c# client. I want to pass structure which has byte array and string etc in c++ using IDispatch. How usually people pass structure as single argument in IDispatch's Invoke method() public class BLOB { /// <remarks/> public string contentType; public System.Byte[] binaryData; public string ID; public string URL; }
-
How to pass structure or complex data in IDispatch using invoke() method .How To pass structure or complex data in IDispatch using invoke() method. for example I want to pass complex data or structure like below to invoke() method. struct tag{ int i[10]; char str[40]; }sample; Below is sample code to access method passing argument. // Code omitted for brevity. szMember = “On”; dispparams.rgvarg[0].vt = VT_BOOL; dispparams.rgvarg[0].bool = FALSE; dispparams.rgdispidNamedArgs = &mydispid; dispparams.cArgs = 1; dispparams.cNamedArgs = 1; hresult = pdisp->GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid); hresult = pdisp->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
-
Invoking a Web Service using managed C++ OR VC++ .NETHow to Invoke a Web Service using managed C++ OR VC++ .NET . provide me with some link
-
Invoking a Web Service using Visual C++ .NETok.fine. Tell me how to invoke web service using managed c++ (in .NET 2003/2005)
-
Invoke a Web Service using Visual C++ .NETI want to Invoke a Web Service using Visual C++ .NET. Please provide me with information. I have sample code to invoke web service using c#. The web service method has complex data as input. Please reply.
-
Invoking a Web Service using Visual C++ .NETI want to Invoke a Web Service using Visual C++ .NET. Please provide me with information. I have sample code to invoke web service using c#. The web service method has complex data as input. Please reply. :)
-
Invoking a Web Service using Visual C++ .NETI want to Invoking a Web Service using Visual C++ .NET. Please provide me with information. I have sample code to invoke web service using c#. The web service method has complex data as input. Please reply.
-
services in Windows Server 2003 OSI tried with Admin user, local System account and tried direct path also like "\\server\public_data\hello.txt" but no use. It has problem when running as a service in win2003k and as standalone no problem. do anyone know how to give more permissions to services in win2003k os?
-
services in Windows Server 2003 OSis there any way to use it as service instead of standalone
-
services in Windows Server 2003 OSHi friends, There is problem in accessing mapped drives or remote machine from my vc++ service in Windows Server 2003 OS for example when I execute my program as services it fails but I am not facing any problem if I execute it as standalone program. I am having admin privilege. Below is the few of API I tried (where is S: is mapped drive in same domain) API: CreateFile and GetFileAttributes("S:\hello.txt") Thanks, Thomas