I am currently writing a WinRT application that has some network access to retrieve various details, I need to be able to simulate conditions when there is no network, or a very slow network to ensure that the app works as it should under these conditions.
How do I get the tablet emulator that is part of Visual Studio 2012 to simulate these conditions?
Cheers,
Rupert
To simulate "no network" you have to disable the networking on the host computer. It seems that the simulator shares the network with the host.
In regards to a slow network connection, you likely have to do this on the host again. See this post: Network tools that simulate slow network connection
Related
Don't know if this is more realted to SuperUser, but here's my problem anyway:
I wrote a tcp server with Python for Raspberry Pi and a client with C# for a any Windows based PC. I first tested it my main PC through router and everything was working fine. Then I changed the server side (Pi) to host its own access point where everyone can connect.
I tested that with a EeePC running Win 7 Ultimate (Intel Atom, veeeeery slow) and it worked. Problems started when I moved the client software to that mini laptop; tried to connect to the server, connects normally, but when client starts to send it says "The remote host has closed the connection" (or something like that, I'm using Finnish OS).
I immediately thought that it has something to do with the Pi's access point so I connected my mini laptop to my router and tried to connect to my main PC, same thing. Then I started to worry if my client software is broken, but I took one last test and tried to connect with my main PC to the mini laptop and this time, no errors, only VERY slow connection (at least I think so, because only part of my controls went through with ultimate latency).
So where is the problem? The mini laptop aka EeePC or what? Why does it say that the remote host disconnected?
EDIT:
I founded a nano USB Wi-Fi dongle and plugged that to my main PC and then connected to Pi's access point with it. Everything worked like a charm, there was no latency at all.
It must be the mini laptop, so I give some specs:
Just installed clean copy of Win 7 Ultimate with no firewall, antivirus or anything. Installed only Service Pack 1 and Redistributable for Visual Studio 2013. Drivers are Windows default.
I am fairly new with MS Azure and developing remote apps.
Have read and viewed some learning stuff.
I use c# as my developing language, and as I have understood, its fairly simple to develop a windows application to run on an Azure server as remote app, which users anywhere on earth can run from their pc as if it was installed locally on their pc's. But in reality, it is more like, an RDP hiding behind the app.
The problem is that a database will be running on every users pc instead on the azure server. It is suppose to be like that by design, don't ask me why.
We tend to use "ms access" for the local DB, since everyone already have MS Office.
Anyway, back to the problem. What I am wondering is, how can I make my remote application on azure server communicate with the database installed locally on user(s) PC?
I have drawn a simple figure to explain what I mean.
http://snag.gy/ybyed.jpg
Back in the days when people used Modems to connect their PC's to the tubes, this would be theoretically possible (although maybe not a good idea). Nowadays, very very few PC's are connected directly to Internet.
In an Office, a PC will be connected via the company intranet to an external gateway and the PC will not be visible to anyone outside that gateway. The same is true at home, where the gateway is the router.
It would be possible with a lot of work to allow external access (from Azure) to the individual PC, but it would not be easy to set up. Further, you would need to write a piece of software to run on the PC which will listen on the correct Port for calls from Azure, will then run the appropriate SQL queries, and return the data to Azure. You might as well install SQL Server full edition on each PC.
Even if you do that, no security professional is going to let you actually open up the ports and firewalls to the internet; it's a lot of work doing that and you might as well just install random viruses on the PC - you'll get to the same point but faster and with less wasted time.
TL;DR: Not easy without a significant investment, and your PC will probably get trashed if you do.
This is actually possible by the magic of RDP protocol :)
Azure RemoteApp supports redirection for Windows machines as documented here: https://azure.microsoft.com/en-us/documentation/articles/remoteapp-redirection/
So, once you create an Azure RemoteApp collection, you can download the PowerShell cmdlets, enter your subscription ID and then you can enable drive redirection. This results in the local disk being mapped on the remote machine. You can try it out and see if performance is good enough.
The other alternative is that the database lives in an Azure storage account, as documented here: https://azure.microsoft.com/en-us/documentation/articles/remoteapp-anyapp/ .
You should NEVER store data on the Azure RemoteApp local machine.
/cd
When i disable the network in Control Panel -> Network and Internet ->Network Connections i experience very good performance from visual studio. When i enable it, performance is very slow. I have checked this for building, debugging, user interface and everything.
Why do you think this is happening and how can i get the same performance by not disabling the network.
I had the same issue , Visual studio was running like a cheetah only when the cable is unplugged , ... I did the following and it did the job
I switched my workingspace from network storage to local hard drive
unchecked Updates in Tools->Options->Enviroment and updates
It can also come from TFS running ...
I am trying to connect Windows Phone 8 emulator to the internet. I have tried all the tricks and steps given in Stack overflow or any other site but I am unable to get it.
I tried this:
Step 1 - using Hyper-V start the server, once started u can see the two new network adapters added in the (network sharing) page.
Step 2 - go to your visual studio IDE where your application runs, using Emulator run your application, once started try to open IE, it will not connect to internet.
Step 3 - now again come back to network sharing page right click on external adapter which was created newly select properties, hit on sharing tab, now check the two options to have tick mark if not tick that two options and click on OK.
Step 4 - internal adapter which was created newly will be changing the domain name from Unidentified network to your shared Domain name, once changed try to access the IE again in emulator which runs already. now i hope the internet connection works.
But once it's done it is showing:
The Windows Phone Emulator wasn't able to connect to the Windows Phone operating system:
The phone didn't respond to the connect request.
Some functionality may be disabled.
The resolution to which I found on internet was:
All you have to do is going to "Network and Internet --> Network Connections", right click on "vEthernet (Internal Ethernet Port) Windows Phone Emulator" and Enable it.
But it was already enabled .
So I don't know how to make internet work.
Some connection tools on the host can have negative effects when used with the emulator; I found having cisco VPN client installed on the host prevented the emulator from finding the internet. Other VPN clients may have similar side-effects. I simply uninstalled cisco (the inbuilt windows VPN is fine for what I need) and it worked perfectly.
I've also seen problems where it won't find the internet after the host has been suspended / resumed. In that scenario, it turned out to be bad network drivers. I installed a dedicated Intel NIC (rather than the on-board NIC on the motherboard) - problem solved.
Basically, Hyper-V is a bit fussy.
1.Check whether you are using latest internet explorer 10 or not. if not update and check it.
2.Still if it's not working, it could be the problem with your display drivers. You should have WDDM 2.0 drivers. Graphic card also goes well.
If you are using any proxy servers which require credentials for connecting to the internet, it may not probably get connected from the emulator.
This is because it doesnt support proxy authentication. The class for authentication are missing in the phone version of .Net
Please see the below post .
Not able to connect to webservice from a WP7 emulator
Hi I'm trying to access internet in emulator when I'm connected to vpn using Cisco system vpn client.
I followed this link
but couldn't get much help.
I'm using Windows8 release preview and visual studio 2012 rc.
I'm able to connect to internet using desktop browsers..
Referencing this this guide, it looks as though you probably have a bridged network configuration or have the device bound to your physical interface. This would explain the behavior you described.
You want to have the virtual machine bound to the tunnel interface created by your VPN connection. If there is a way to choose a NAT option in this dialog, try it. This would be best as it takes whatever path to the internet your computer is configured to take and doesn't require a seperate IP address to be given to your VM from the VPN server.
Using this dialog select the Tunnel/Virtual/Not Physical interface created when you connect to VPN.
Good luck!
you can ask your vpn administrator to give rights for accessing their internet to the user by which you are connecting VPN.
As pointed our earlier it might be because your VPN is restricting your access to the internet. If so, a workaround would be to have your VPN administrator setup a remote desktop you could connect to through the VPN, then run the emulator on the remote desktop to connect to the internet.
Alternatively try to disable any antivirus/firewall suite you have installed to see if it blocks the emulator.