Visual studio emulator doesn't connect when used in VPN - c#

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.

Related

C# SQL database access from another PC

I am using C#, .NET Framework 4.5.2 and SQL Server 2014 Express edition (v12.0.2000). My requirement is to access this software from another PC means client system. Software is working fine in server PC not accessible in client PC.
Working until now
I followed the following two Microsoft official documents to make the database accessible on another PC:
https://learn.microsoft.com/en-us/sql/relational-databases/lesson-1-connecting-to-the-database-engine?view=sql-server-ver15
https://learn.microsoft.com/en-us/sql/relational-databases/lesson-2-connecting-from-another-computer?view=sql-server-ver15
To connect two PCs I followed this tutorial.
Result so far
I am able to access software in the network directory. I can run the .exe file of software on the client's PC. I can access the SQL Server in Microsoft SQL Server Management Studio on the client PC.
Can't do so far
The only thing that I can't do till now is my software on the client's PC is not able to access the database. It shows an error
Login failed for user
Connection string
I thought it should be a connection string error. I tried three different connection strings, let me write all here:
Data Source=.\\SQLEXPRESS;Database=dbposrpc;trusted_connection=true;
Data Source=.\\SQLEXPRESS;Initial Catalog=dbposrpc;User ID=sa;Password=12345678;
Data Source=tcp:DESKTOP-0DCQGE3,49172;Initial Catalog=dbposrpc;User ID=sa;Password=12345678;
SQLEXPRESS is the SQL Server instance name, DESKTOP-0DCQGE3 is the server PC name, 49172 is the TCP port that I selected.
For accessing a software from remote PC(Client's PC) you need to add inbound rules in Windows Defender Firewall with Advanced Security for this port the software is hosted on, then you also need to forward the port from your server PC.
The issue is resolved! All the steps I followed are perfect. You can say that if you want to connect to the client's PC using an ethernet connection. Follow the steps in question step by step. Focus on the connection string. Use the connection string of number 3. Let me write it again for clarification.
Data Source=tcp:DESKTOP-0DCQGE3,49172;Initial Catalog=dbposrpc;User ID=sa;Password=12345678;
Here SQLEXPRESS is the SQL Server instance name, DESKTOP-0DCQGE3 is the server PC name, 49172 is the TCP port that I selected as static.
How I resolved the issue?
I just cleared the solution, restarted the project again and everything worked fine for me.

Access local DB on user pc from a remote application running on "Azure Server"

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

Windows Phone 8 Emulator not connecting to internet

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

Simulate no network with Visual studio 2012 tablet emulator

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

remote debug connect fails => "no logon servers available to service logon request"

I believe I understand why I am getting this -- but could be wrong... I believe that the PC I am running msvsmon.exe (the pc to debug) is a domained PC, and I have been given it to work on without its domain server, it is offline to its domain sever. I do have local administrative account and privileges - to do all - but not attach my VS studio to the msvsmon running on this PC....
I added a 2nd lan adapter -- and have a private connection.... still no...
Can I make this 2nd Lan connection be Workgroup'ed? --- and thus by-pass the domain server logon name requirement....
Is there a setting for MsVsMon.exe -- to say hey --- this is a LAB evironment -- give up and allow the connection....
The unauthorized connection works..... but -- that I have learned is not allowing the .PDB files to match and thus no symbols!!!!!!!!
So any way -- at all?????
To have remote debugging with symbols --- any possible way?????
Thanks in advance....
best regards,
Kevin Waite
NOTE: ===> One added addition characteristic..... despite the PC being debugged is offline to its domain controleler . . . . I can create a new Admin user and successfully remote desktop to this PC - - - one would think that if I can connect for remote desktop I should be able to connect for remote debugging ..... !####!
I usually only have success with remote debugging if I'm logged on with exactly the same credentials on both machines.
This works (for me) if I'm logged on to the domain as the same user on both machines.
It also works if I create a local non-domain account with the same name and password on both machines, and ensure that I'm logged on using that on both machines.
In all other cases, I get the same problems as you do...
Unless someone has a way for 'workgroup' connection on LAN adapter #2 to
coexist on a domained controlled PC via its LAN adapter #1. This seems impossible.
From above, recall, I am trying to debug on a domained PC that is offline to its
domained controller, and the remote debug connection fails with no service available
to processes the log-on request....
And thus the only solution to connect successfully to this PC was to switch it
to a Workgroup PC for remote debug connection.
The credentials: user name and password must be identical between both the
PC with VS 2010 and the PC to be debugged running MsVsMon.exe....
The user must have on the debugged PC security privilege 'logon on to service' set.
One can archive the domained configuration for restoration by force taking a Windows
checkpoint prior to switching to workgroup configuration.
best regards,
Kevin Waite

Categories

Resources