Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connecting to a remote server from emulator
Message
De
22/02/2005 06:32:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/02/2005 04:09:08
Information générale
Forum:
ASP.NET
Catégorie:
.NET Compact Framework
Divers
Thread ID:
00989153
Message ID:
00989163
Vues:
41
>Has anyone solved the problem of connecting to a remote server from the pocket pc emulator when the "remote server" is sql server running on the local machine?
>
>When running the service from the emulator, there is an interminable wait and then an error is returned
>This is the error message:
>
>An unhandled exception of type ’System.Net.WebException’
>occurred in System.Web.Services.dll” …
>Unable to connect to the remote server
>
>The program has reached this line within reference.cs
>
>Object{} results = this.Invoke(“tOrdersByCustomerID”, new object [] (custID));
>
>
>Googling around I find that a lot of other people have come to the same error but I don't know that anyone else is running the test from the file server.
>
>A common comment is to ensure that all reference to local_host is replaced by a reference to the machine name. I have done that. No good. The local host web files are shared in Active Directory.
>
>Any suggestions?
>
>Godfrey

Godfrey,
Webservice proxy places uri with "localhost". Change that to IP.
ie: Web refernces\reference.cs file looks like (the file where you get the exception):
        public myWS() {
            this.Url = "http://localhost/myWebServices/myWS.asmx";
        }
change it to:
        public myWS() {
            this.Url = "http://x.x.x.x/myWebServices/myWS.asmx";
        }
Where x.x.x.x represents your computer's IP (not 127.0.0.1 - the one you get from IPConfig or your web server address).
PS: In webservice itself connection to SQL server looks like:
"Server=localhost;Integrated Security=SSPI;Initial Catalog=someDB"
IOW problem is in connecting to webservice not SQL server.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform