[Mono-aspnet-list] Problem using a web service.
ionsol
nabble at pasichnyk.net
Sun May 10 13:16:01 EDT 2009
smsisko wrote:
>
>
> ionsol wrote:
>>
>>
>> I am also having issues with NameResolutionFailure after upgrading to
>> 2.4. I am simply making a call to pull down a JSON response using
>> WebClient. This worked perfectly before upgrading, but now it is
>> failing. I've confirmed that i can dig/nslookup/ping the address in
>> question. It appears to be an issue in 2.4.
>>
>> Is there a fix for this yet?
>>
>> Thanks,
>> Jesse
>>
>
>
> I haven't found a fix yet, I'm pretty sure it's a configuration problem,
> but I can't seem to find it.
>
> I have been able to reproduce a similar problem using this simple code in
> a asp.net application:
>
> public virtual void button1Clicked(object sender, EventArgs args)
> {
> label1.Text = Dns.GetHostEntry("72.14.205.99").HostName;
> }
>
> this gives me the following error:
>
> System.InvalidCastException: Cannot cast from source type to destination
> type.
> at System.Net.Sockets.Socket.CheckProtocolSupport () [0x00000]
> at System.Net.Sockets.Socket..cctor () [0x00000]
>
> I think this might have something to do we the profile, but I haven't
> found the problem yet.
>
> I'm not sure it is related to 2.4, I've tried downgrading my mono
> installation to 2.2, and I still have the same problem...
>
> Thanks
> smsisko
>
Yeah, if I try to connect to mysql using my domain name, or localhost, i see
that Socket related InvalidCastException that you noted. If i point my
mysql connection towards the local unix socket, it works correctly. My
issue then arises later when i try to make a WebClient call.
I noticed that in my 2.0 machine.config, the connectionManagement section is
now missing, while it existed in 2.2. I tried adding this back, but it
didn't seem to fix anything. I also tried adding it to the system.net
element in my app.config with no effect.
If you figure this out, please post your resolution. I will do the same.
Hopefully someone on the mono team can chime in with an answer... :)
-
Jesse
--
View this message in context: http://www.nabble.com/Problem-using-a-web-service.-tp23246075p23472073.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list