🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.language.delphi.dotnet
3 messages
3 total messages Started by VT Venkatesh Sat, 07 Jun 2008 13:57
How to use WebConfigurationManager.OpenWebConfiguration in delphi correctly?
#146
Author: VT Venkatesh
Date: Sat, 07 Jun 2008 13:57
23 lines
1937 bytes
Does some one have a experience in delphi with writing to Config files 
in Delphi.I am unable to convert the following code to work correctly in 
delphi.while trying to debug ,I find that config variable does not 
return any thing.Also the typecasting of  Config as 
SystemWebSectionGroup does not seem to work in  delphi
***************************************************************
//C# code
Configuration config = 
WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
         SystemWebSectionGroup systemWeb = 
(SystemWebSectionGroup)config.GetSectionGroup("system.web");
*****************************************************************
//My delphi code
var

  config : Configuration;
  systemWeb1 :SystemWebSectionGroup ;

   authorizationRules:AuthorizationRuleCollection ;
begin

  config := WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
*************************************************************************
Re: How to use WebConfigurationManager.OpenWebConfiguration in delphicorrectly?
#147
Author: John Moshakis
Date: Sun, 08 Jun 2008 17:06
38 lines
2051 bytes
VT Venkatesh wrote:

> Does some one have a experience in delphi with writing to Config
> files in Delphi.I am unable to convert the following code to work
> correctly in delphi.while trying to debug ,I find that config
> variable does not return any thing.Also the typecasting of  Config as
> SystemWebSectionGroup does not seem to work in  delphi
> *************************************************************** //C#
> code Configuration config =
> WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
> SystemWebSectionGroup systemWeb =
> (SystemWebSectionGroup)config.GetSectionGroup("system.web");
> *****************************************************************
> //My delphi code var
> 
>  config : Configuration;
>  systemWeb1 :SystemWebSectionGroup ;
> 
>   authorizationRules:AuthorizationRuleCollection ;
> begin
> 
>  config :=
> WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
> **********************************************************************
> ***

Hi Venkatesh,

What exactly are you trying to do and what do you mean the typecasting
isn't working ?

Cheers,
John



-- 
Blog: http://blog.moshine.com/
Re: How to use WebConfigurationManager.OpenWebConfiguration in delphicorrectly?
#148
Author: VT Venkatesh
Date: Mon, 09 Jun 2008 06:35
41 lines
2359 bytes
John Moshakis wrote:
> VT Venkatesh wrote:
> 
>> Does some one have a experience in delphi with writing to Config
>> files in Delphi.I am unable to convert the following code to work
>> correctly in delphi.while trying to debug ,I find that config
>> variable does not return any thing.Also the typecasting of  Config as
>> SystemWebSectionGroup does not seem to work in  delphi
>> *************************************************************** //C#
>> code Configuration config =
>> WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
>> SystemWebSectionGroup systemWeb =
>> (SystemWebSectionGroup)config.GetSectionGroup("system.web");
>> *****************************************************************
>> //My delphi code var
>>
>>  config : Configuration;
>>  systemWeb1 :SystemWebSectionGroup ;
>>
>>   authorizationRules:AuthorizationRuleCollection ;
>> begin
>>
>>  config :=
>> WebConfigurationManager.OpenWebConfiguration(virtualFolderPath);
>> **********************************************************************
>> ***
> 
> Hi Venkatesh,
> 
> What exactly are you trying to do and what do you mean the typecasting
> isn't working ?
> 
> Cheers,
> John
> 
> 
> 
Hi John
Thanks for you reply.I solved the problem .Actually it was some other 
code which was creating the problem
Venkatesh
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads