How to make WP8 emulator access ASP.NET debug server - asp.net

Is it possible to get the WP8 emulator to access a ASP.NET Development debug server I run on my pc?
WP8 Emulator runs inside Hyper-V and the debug server on my pc is therefore not accessible to the emulator, is it possible to do so it is?
Only solution I can come up with is create a IIS server on my machine and debug that, but its much easier running development server.

The problem isn't really "how to access the development server from the emulator", but "how to access the development server from a remote location". The emulator is 'just' another device connected to the network.
And for that, I can suggest a few links:
http://blog.waynehartman.com/archive/2010/05/30/218.aspx
Is There a Way to Make Remote Calls to ASP.NET Development Web Server?

Related

Unable to Create Azure Storage Queue Messages with ASP.NET 4.6.1 App

I have an old ASP.NET 4.6.1 app running in a VM on Azure.
I’m trying to create messages in an Azure Storage Queue and nothing is happening when I run it on production VM. However, on my dev machine, it works fine and I can create messages in the same queue that I’m trying to access from the production VM.
The call to the queue is within a try catch block and it’s not throwing any errors.
Another important point is that I had use the old/deprecated WindowsAzure.Storage NuGet package as that’s the one that seems to work on this ASP.NET MVC 4.6.1 app.
Any idea what could be the issue here? Because I don’t see any errors, I’m not sure how to go about fixing this problem.
According to MS Docs, one troubleshooting option you can try is "Redeploy Windows virtual machine to new Azure node"
The doc says,
If you have been facing difficulties troubleshooting Remote Desktop
(RDP) connection or application access to Windows-based Azure virtual
machine (VM), redeploying the VM may help.
Source: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/redeploy-to-new-node-windows
See also additional troubleshooting steps:
Restart the virtual machine
Recreate the endpoint / firewall rules / network security group
(NSG) rules
Connect from different location, such as a different Azure virtual
network
Recreate the virtual machine
There are various reasons when you cannot start or connect to an application running on an Azure virtual machine (VM). Reasons include the application not running or listening on the expected ports, the listening port blocked, or networking rules not correctly passing traffic to the application.
Source: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-app-connection
This might be network Firewall issue. Open azure portal from production vm machine. You can even try to manually see the storage and upload files from web.

Xamarin and Web API

I have been struggling with this now for couple of days. I have a Xamarin App running on Emulator, which is attempting to connect to Web API running on my local machine. I tried connecting via the IP 10.0.2.2, which I believe is the IP for connecting to local pc from emulator (please correct me if am wrong).
The API runs on IIS Express. Could someone guide me ?
First, make sure that the web service is accessible from your app browser is a good starting point.
It is really simple to do this using SharpProxy. The link of the article:

SignalR not functioning on server

I have a windows service I made through visual studio in c#.
It uses SignalR to connect to a SQl database and receive notifications.
However, when I deploy the service onto the server itself (Windows Server 2008R2), it doesn't function. This server is the server hosting the SQL server too.
This is a SELF-HOSTED SignalR service. It is not using IIS or anything of the like to run. It is packaged as a simple Windows Service. Therefore, it doesn't have issues with typical MVC, IIS hosted apps (such as /signalr/hubs pathing, web.config etc.)
On my development computer, I use the WAN IP of the sql server to connect to its database. When I run it, it does everything it's supposed to and fires off a notification everytime server changes.
On the server itself, the service installs fine, but doesn't fire off any notifications. I left the IP as the WAN IP for developmental services and was planning to change it to localhost, etc. once it works but it does not.
For now, I left the service running on my development computer, and it's working great. I'd really prefer it to be on the server itself though, since that's the computer that will always be online.
Any hints or ideas on why this works on my development computer but not the server?
Thanks!
[Edit]
I'm using Windows 7 with Visual Studio 2013 as my development setup.
The service is running on localhost:2165 (arbitrary port). I am able to access that address via a web browser on the server itself.
You don't state what your development operating system is, but if you are using WebSockets, then you need to have a minimum of Windows 8 or Windows Server 2012.
From the documentation, the supported platforms are (emphasis mine):
Supported server IIS versions
When SignalR is hosted in IIS, the following versions are supported. Note that if a client operating system is used, such as for development (Windows 8 or Windows 7), full versions of IIS or Cassini should not be used, since there will be a limit of 10 simultaneous connections imposed, which will be reached very quickly since connections are transient, frequently re-established, and are not disposed immediately upon no longer being used. IIS Express should be used on client operating systems.
Also note that for SignalR to use WebSocket, IIS 8 or IIS 8 Express must be used, the server must be using Windows 8, Windows Server 2012, or later, and WebSocket must be enabled in IIS. For information on how to enable WebSocket in IIS, see IIS 8.0 WebSocket Protocol Support.

How to deploy standalone ServiceStack website

I am working on a small website based on an example ServiceStack project. It is a standalone web app so that there is no need for IIS etc. Currently I start the server at http://localhost:8080 and opening the website in my local browsers seems to work fine.
My PC has a dedicated IP and I hope to test my server from another computer. I can successfully get a Python server running using python -m SimpleHTTPServer 8000, so network is working fine.
But the remote computer cannot access my ServiceStack server. I think there should be a simple setting somewhere to get it working. But I searched online, there is much information about IIS and ASP.Net. But my app is standalone and is independent of Asp.net. It is supposed to be running on Linux as well as on Windows. (Though I will only deploy on a Windows machine now.)
It will work fine on your local computer because the firewall doesn't block local traffic. If you want any other computer to access services running on your machine you will need to open the ports on the firewall.
This can be configured from the Windows Firewall in Control Panel

How to access ASP.NET App Over a Network Using IP Address

My asp.net web app is hosted on this URL on my local machine:
http://localhost:45433/
I want to access the same application from a different computer on the network. I tried replacing the localhost with my IP but it did not work.
any ideas!
UPDATE 1:
Now, I am getting this error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
If your application is hosted using Visual Studio's built in web development server then this server does not allow remote connections. It is for testing purposes only and accepts connections only from localhost. In order to access your application from remote clients you might need to deploy it to IIS.
First, add the application as a virtual in IIS, and as long as you can access the machine on the network, you can do:
http://<machine name>/<virtual>
I do that at work, where I can access my co-worker's web site.
HTH.
That looks a lot like a url used by the development web server in visual studio. That web server only responds to requests from the localhost. It won't work for other requests from other machines on your network.
You need to install IIS on your machine (must be a Pro version of Windows) and deploy to that IIS install to share your app on the network.
I don't think the built-in version of Cassini (VS debug server) allows remote connections.
However, the UltiDev version, built off of the same code base with a few enhancements, does, and is a much lighter-weight install than IIS (especially if you can't find your OS install DVD). It also integrates nicely with Visual Studio for debugging purposes.

Resources