Cant connect to local MVC 4 api server with WP8 emulator - asp.net-mvc

I have a little game project that uses a MVC 4 api server, however since I installed windows 8 / VS12 / WP8 SDK I havent been able to access the server from my app in the emulator, I can however access the deployed webserver.
Is there some sort of default firewall that would prevent me from contacting a localhost server? I just get a NotFound exception when I try, the localhost server works fine in my browser to retrieve some xml object
I have the same code working in windows 7 with vs2010 and wp7 sdk.
To connect to the server I use http://restsharp.org/

The emulator is running in Hyper-V, which is a virtual machine. It runs it's own network, and thus your PCs "localhost" isn't available from inside the virtual machine.

You don't have to set up a full IIS... you can go about with IIS express ( the visual studio way when you run the Web api solution ).
You need to do 2 things, first one check
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx - only the part called 'Quick solution with IIS Express' ( parts 1 to 4 )
Second one, add a Microsoft Firewall rule to allow access from the VM to the IIS express.
Firewall > Advanced Settings > Rules for incoming > New port rule

Related

Firebird database connection by FireDAC after Windows 10 update

I have some delphi applications with connection to Firebird database by FireDAC technology. It works fine, but after Windows 10 update 1803, cannot connect to database when I call application stored in network path (example: \comp1\share\myapp.exe or Q:\myapp.exe, Q: is mapped server path). Error status is 335544721 with illegal parameter.
The same build of application stored on local path works fine. Can anybody help Me?
I've got the same problem!! The reason is the Firebird version 1.5.x (maybe 2.5 too?). Windows Update 1803 blocks the communication between client and server. The only solution is to migrate to Firebird 3.0.x (or to uninstall the update - not a really good option).
I had the same problem with my delphi application I developed a couple years ago, after an update to windows 10 in one of my machines it suddenly drops the connection to the firebird server (2.50 in superserver mode) installed on a windows 7 host, while my other hosts (win xp, win 2003, win 7 and 8.1) connects normally, when I ping or telnet to the server adresse from win10 (telnet 192.168.1.X 3050) the connection establishes, I have tried everything like enabling Smbv1 and disabling v2 and v3, run it under a VM (win 7) machine inside win10 I was surprised to not being able to connect too, then I realised that it wasn't a network hardware configuration problem, but for unexplained reasons WINDOWS DEFENDER, I just disabled it and then my app was able to connect.
And don't rely on firebird's returned error messages they don't discribe the real issue, and can mislead you.
I forgot to mention that I did enabled some services before disabling win defender, wich were disabled after windows update 1803:
Set both Function Discovery Services to Automatic and Start Them
SSDP Discovery set to automatic.
UPnP Device Host set to automatic.

Ngrok + IIS Express and Windows Authentication

Im trying to expose a web application I have developed in ASP.NET MVC 5 through ngrok and Im having no luck with the Windows Authentication. My plan was to test the app using other VMs with IE8 (insert rage here) and a few mobile devices connecting through ngrok.
My setup details are as follows.
VM with Server 2008 (Domain Controller), Visual Studio 2013, SQL etc and development tools
Domain XYZ setup in VM with test users
The Web App is running by F5'ing VS in IIS Express and uses Windows Authentication. IIS express is configured to support Windows Authentication.
I have configured ngrok bindings in the applicationhost config file and also run the netsh command "netsh http add urlacl url=URLPLUSPORT user=everyone"
I can access and use/debug the app fine on the VM using localhost, this has always worked. However, when I run ngrok and then access the app from outside the VM I get the login credential prompt (was expecting this). I enter the correct user/password and I still get 401 Unauthorised and cannot access the app.
Can anyone help? Do I need any extra configuration to allow the authentication to pass through? Is this even possible?
I am pretty much stumped right now and the ngrok site is down although I cant imagine there is much documentation on this scenario :(
Thanks for your help

WAMPSERVER localhost leads me to IIS

I have installed wampserver and when I click on localhost it show me IIS, even I disabled IIS in Control Panel, and when I test 80 port it gives me nothing, just the Apache and PHP of wampserver, please help me what should I do ?
When IIS is installed it also normally comes with some other features that use port 80.
Check for these as well
Web Deploy 2.0 (Web Deployment Agent Service)
MS Sql Server Reporting service.
BranchCache ( Windows 8.1 )
SQL Server VSS Writer

Azure Mobile Service hosted locally on IIS Express not acessable from a remote machine on same subnet

Implementing the steps here: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-how-to-configure-iis-express/
I tried to access the mobile service REST interface from iOS, Android and Windows based applications running on a remote machine performing GETs and POSTS all requests result in an "authorization has been denied for this request" response.
I am able to navigate to the mobile service website from the remote machine mentioned above, which is on the same subnet as the mobile service, however when clicking on the "try it out" link I am prompted to enter credentials. I tried entering the mobile service key, windows credentials and the credentials used when setting up the database none worked all resulted in a re-prompt for credentials.
The same Android and Windows applications work without issue when running on the machine the mobile service is running on. I have to use 10.0.2.2 for android app running in the emulator to get the loopback to work but otherwise the code is unchanged.
The azure mobile service is running in the debugger using Visual Studio 2013 with Update 3. Visual Studio was launched as an admin.
All three apps iOS, Android and Windows can access the same mobile service when its running in Azure (Cloud).
I have read that the mobile service, running in IISExpress, allows anonymous requests originating from localhost but I have not seen any mention about how to configure authentication when accessing remotely or if any adjustments are needed to authenticate properly.
Any ideas?
Remote access for IIS Express is initially blocked
On Vista and Win7 or Win 8 run the following command with administratice Privileges
netsh http add urlacl url=http://xxxxx:port/ user=everyone

Use IIS as local web server to debug in my visual studio

I've an asp.net MVC website which use somme DLL that work only in 32 bits or only in 64 bits(sql lite).
Since our server are running in 64 bits, I would like to run all my code in 64 bits. The problem is that the Visual studio development server is running in 32 bits in all case.
So I come to use a Local IIS Web server.
The problem is that with an asp.net MVC website, it's mandatory to have the website at the root of the URL.
So I wish to have something like "mywebsite.lo"(with a entry in my hosts file) or "localhost:9999" as project url.
But if I try to put this, when I create the virtual directory, I got this error:
Unable to create the virtual directory. Could not find the server 'mywebsite.lo' on the local machine. Creating a virtual directory is only supported on the local IIS server.
So I created myself the website with the correct binding responding to 'mywebsite.lo'. Now if I click on Create Virtual Directory, I got a successfull message. If But when I run the website, I got a message saying : Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
In order to debug in visual studio with a local IIS, then Visual Studio must be running as an administrator, are you doing that?
I made a dummy mistake: The application pool was in .Net 2.x :/

Resources