Problem with System AppDomain ....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I developed a webApp that work without problems in the webserver of my pc.
If I install my webApp in another web server, the webApp can´t transfer
values between components...

the sintax is the following...
System.AppDomain.CurrentDomain.SetData("SQLnInst",values);

The component receive the values with:
object variable =
System.AppDomain.CurrentDomain.GetData("SQLnInst").ToString();

How I can resolve that???
Regards
Ronald Morales
 
Ronald,

What is the type of values? If it is not a string, and of another type,
it is very possible that when you call ToString, it is returning the type
name. If anything, you should cast this value to the type that was
originally inserted and perform a comparison against that.

Hope this helps.
 
Hi Nicolas,

The value type that I transfer is string.....
And the variable return null value.... but, this only happen I use computers
without VS installed...
I don´t know if I need make some changes in the another IIS Server
properties...

Regards
Ronald


Nicholas Paldino said:
Ronald,

What is the type of values? If it is not a string, and of another type,
it is very possible that when you call ToString, it is returning the type
name. If anything, you should cast this value to the type that was
originally inserted and perform a comparison against that.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ronald Morales said:
I developed a webApp that work without problems in the webserver of my pc.
If I install my webApp in another web server, the webApp can´t transfer
values between components...

the sintax is the following...
System.AppDomain.CurrentDomain.SetData("SQLnInst",values);

The component receive the values with:
object variable =
System.AppDomain.CurrentDomain.GetData("SQLnInst").ToString();

How I can resolve that???
Regards
Ronald Morales
 
Back
Top