c# - .NET 3.5CF WebRequest to Slim Framework -
I am writing a mobile application in .NET 3.5 compact framework and attempting to make a GET request for a PHP slim framework I am doing the page. If I try to access the page from a web browser on that local machine, but if I try to access it from the mobile device C # app or mobile device's web browser, then I An HTTP 404 is found, I have created a standard PHP page to display the current time and works on all the three above, hence separating the problem especially on slim pages. I also saw a look at access.log in XMPP which looks like this: The machine is first from the local and the other Handheld device and as you can see, the first request is successfully completed And has returned 404 to it later. Slim PHP code looks like this: and C # looks like this: It is important to keep in mind that I am not a web developer so I apologize if this is clearly obvious. The speed is also the essence of this project so if someone can suggest alternative alternative php structure that has proved to be useful to them, then I would appreciate it very much. Finally, for just one quick information, this project will be web based applications and one hand mobile application that will communicate with a web service. I am trying to get the web service written in PHP by Slim so that it can be hosted on Linux box to cut costs. Again, if anyone has any suggestions / options then I would be equally grateful. Thanks
[20 / Mar / 2013: 17: 07: 38 +0000] "Received / Slim Test / HTTP / 1.1 "200 21" - "" Mozilla / 4.0 (compatible; MSI 6.0; Windows NT 5.1; SV1; NAT CLR 2.0.50727; NAT CLR 3.0.04506.648; NTL CLR 3.5.21022) "[20 / March / 2013] : 17: 09: 37 +0000] "GET http://10.0.2.15/SlimTest/ HTTP / 1.1" 404 523 "-" "-
$ app-> Receive ('/', function () {resonates "it gets the route";});
string webResponse = ""; Try {HttpWebRequest Request = (HttpWebRequest) WebRequest.Create ("http://10.0.2.15/SlimTest/"); WebResponse response = Request GetResponse (); (Streammreamer stream reader = New stream reader (using Gaterespanstream ()) {webResponse = streamReader.ReadToEnd (); }} Hold (Exception Pre) {Message Box. Show (ex.Message); }
Comments
Post a Comment