File Upload Question?

Hello,

I have local IIS on my local PC.I setup a service to upload files, does some operations and return value. The problem is I can NOT access this URL from mobile. Other PC’s in the same network can access this URL. How can I fix this?

http://10.126.111.99/wcf/OCRService.svc

Thanks in advance & Best Regards.

You need to add whitelist plugins and allow you URL to access.

Also need to see “Content Access Policy

Hi @virender,

Thanks for your reply. But even I can’t access this service from mobile browser?

See URL not accessible till you not added whitelist plugins and allow URLs.

But I am trying to access this URL/Service from mobile browser, NOT inside of the mobile app.

I think its also not work without white list URLs , check console

so where to add this line of code in order to access service/URL from browser?

<meta http-equiv="Content-Security-Policy" content="connect-src 'self' http://10.126.111.99/wcf/OCRService.svc 'unsafe-eval' 'unsafe-inline'; default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">

HTML page, On Header

Add white list plugins first

see http://docs.ionic.io/docs/cordova-whitelist

But it says “f you’re using a newer version of Cordova (or the latest Ionic CLI) to develop your app, you may be experiencing http 404 errors when your app tries to make network requests.”

As I told you in my case it is NOT the app, it is the mobile browser nothing related with the app.

I also faced such type of problem and fixed after add whitelist plugins. You can try

That URL would only be accessible from inside your own network: 10.126.111.99 is an IP address assigned by your local network’s router. Your phone would only be able to connect to it if it is on WiFi and on the same network.

The other way of accessing that service is it should be hosted in public domain so that the device can connect that service from outside of your local network using edge/wifi.

hello @saravananraju,

Yes my phone is in the same network that is why it is wierd.

OK. Can you please do the remote debugging using chrome browser and see what is blocking the request.
for android,pls refer https://developer.chrome.com/devtools/docs/remote-debugging
for iOS, pls refer http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787

can I apply those to windows 7?

The problem happens when I am at the office. How can I fix this situation?