[Mono-aspnet-list] Problem using a web service.

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Mon May 11 00:36:45 EDT 2009


On Sun, 2009-05-10 at 04:50 -0700, smsisko wrote:

> 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] 

This was fixed after 2.4 was released. If you can get a newer System.dll
from sources (HEAD or mono-2-4 branch), it will work fine.

-Gonzalo




More information about the Mono-aspnet-list mailing list