Flash can't access XML files when running under Localhost - visual-studio-2010

We have a Flex/Flash application that loads information from XML files created by a .NET application. It works fine under IIS but when I try to run it from Visual Studio 2010 or 2012 using the ASP.NET Development Server, the Flex/Flash app isn't loading the information. I brought up Fiddler and am able to see that there's an error occurring when the Flash tries to access the XML:
[Fiddler] The socket connection to localhost failed. ErrorCode: 10061. No connection could be made because the target machine actively refused it 127.0.0.1:80
I've turned off my Firewall but that didn't help. So, I'm not sure where the block is occurring. Any thoughts?
[Update: switched from Asp.NET Development Server to IIS Express and am still getting the exact same error.]
[Update2: I've verified that the XML file the Flash is trying to reach comes up fine in the browser: http://localhost:63318/ProductDetailsXML.aspx?ProductId=71]

It may have to do with it being served off of a specific port (not 80). How is your application requesting the XML file? According to your Fiddler log, it's trying port 80, but your site is running on port 63318.

Related

Web deploy failing, says DESTINATION NOT REACHABLE

I honestly don't know where to start apart from mentioning I've tried absolutely everything and I feel like banging my head against the wall!
I've configured my IIS according to the Microsoft docs and also added Web Deploy 3.6.
In my services I have the following running:
In my windows firewall I have opened port 8172:
In my IIS I have enabled remote connections:
Within IIS I have a Site which points to an empty folder, when I right click -> Deploy -> Configure Web Deploy publishing I get this:
Using this, I've set up a publish profile in VS like so:
But get this error why I try and 'Validate' the connection:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not connect to the remote computer ("server2021"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not connect to the remote computer ("server2021"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I can't even remote to this server, I'm accessing it using TeamViewer.
I've viewed EventViewer logs on my local machine and it just says the same error which VS is spitting out.
I honestly don't know what I'm doing and I'd really really appreciate any help

internal server error when trying to access asp.net core app hosted in IIS 10

I used VS2017 to create an ASP.NET core API app, just a simple one.. I didn't even make any changes to it. it was able to compile just fine, able to debug in IIS Express just fine.. you know, the default /api/values which returns {value1, value2}.. just the default..
I tried to host it in IIS 10 on Windows 10. Added an application pool which has .NET CLR version set to "No managed code", keeping everything else as default. Using VS2017, published to folder, set IIS to point to that folder, set it to use port 8080. tried accessing it in browser with 127.0.0.1:8080/api/values and.. HTTP Error 500.19 - Internal Server Error. why? what did I not do?
In command prompt, typing dotnet --info shows the version as 2.1.200, and the .net framework as 2.0.7. In fact, I was even able to run the app directly from the command prompt by typing "dotnet .dll" and it would show listening on port 5000 and I was able to use browser to access 127.0.0.1:5000/api/values and the {values1, values2} would appear in the browser. But why is it that I can't use IIS to host it?
Talking about using command prompt to run the app using kestrel, I noticed a strange thing. setting the args in configure, I was able to use urls to dynamically change the port that kestrel is listening on, and I was able to enable remote access to kestrel using dotnet .dll --urls http://*:5050 for example, and it works fine.. BUT.. when I set the port to 6000 or greater, kestrel would say it's listening on that port, but remote client would not be able to access it. has anyone encountered this? using ports in the range of 5000~5999 works fine.. why?
Ensure the following:
.NET Core Hosting Bundle installed on the hosting server - https://www.microsoft.com/net/download/all
Application Pool .NET CLR version set to "No Managed Code"
Ensure that the Application Pool Identity user has read permissions on the published folder.
For details check: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.0

How to configure the port number of IIS Express to another port other than 8080.

I've seen numerous other posts on this topic, but none that solves my problem (and I'm pulling my hair out trying to get this working!). I'm trying to create a simple one-page website in VS2013 (windows 8.1) and view the page in Firefox and I can't do it - I get "Unable to launch IIS Express Web Server"
Then I get an error message from IIS Express that says "The specified port is in use: Port 8080 is already being used by process IIS Express (process ID '6332') Recommendations: 1. Try switching to a port other than 8080 and higher than 1024. 2) Stop the application that is using port '8080'"
When I click on the Open Log File link I get:
Failed to register URL "http://localhost:8080/" for site "WebSite1" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Failed to register URL "http://localhost:63997/" for site "WebApplication2" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Failed to register URL "http://localhost:64532/" for site "WebApplication3" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Registration completed
I tried uninstalling IIS Express and VS 2013 and then reinstalling VS 2013. I even uninstalled VS2010 which was also on my machine. I've also tried changing the Project URL to use port 8090 and that doesn't help either.
Please help!
I had a similar issue. I was able to run my Project in the debug mode, but non-debug-mode project did not even start because of similar error.
In my situation the problem was that I tried to access the same port number with having standard HTTP connection and secure HTTPS connection.
There are lot of posts indicating that you should edit .../Documents/IISExpress/config/applicationhost file, but that was not working with me, because my Visual Studio Project always rewrote non-working values to the applicationhost file.
Therefore I found the resolution by redefining my Visual Studio Project Properties as follow:
Click: YourWebApp => Properties => Web (tab)
On Servers section, enter Project Url, as example: http://localhost:44301/ Note: Value 44301 has to be something which has to be unique - Not used by any other apps or in the SSL-connections in YourWebApp project
Click YourWebApp in the Solution Explorer.
Press F4 to open YourWebProject properties. On Development Server section check SSL Enabled property and SSL URL property. If the SSL enabled property is set as True, then YourWebApp uses the URL and port defined in the SSL URL field. Also this url + port has to be unique.
If SSL URL property contains the same port number than defined in step 2 ( https://localhost:44301/), then you have one port assigned both for HTTP and HTTPS connections, and that is not allowed. Then you have either change the port number as unique either on the Project URL or in the SSL URL
You can change the binding for your website by modifiy the ApplicationHost.config on
%systemdrive%:\Users\\Documents\IISExpress\config
http://msdn.microsoft.com/en-us/library/ms178109.ASPX

Cannot add web service reference to VS2008, works in VS2010

I’m having trouble adding a reference to an HTTPS web service using Visual Studio 2008, it works fine in Visual Studio 2010 but in VS2008 I get the below error.
Our IT guys tell me that the problem is that VS2008 is not using the IE proxy settings properly so the HTTPS request is getting sent to the HTTP proxy, which always denies all HTTPS requests. However, in VS2010 it works just fine.
They don't know how to fix this if that is indeed the problem.
(As an aside, I have to use VS2008 because I want to use this in an SSIS Script Task, however I've been testing this in a blank console app.)
There was an error downloading 'https://xxxxxxxxxxxx.asmx'.
The operation has timed out
Metadata contains a reference that cannot be resolved: 'https://xxxxxxxxxxxxx.asmx'.
An error occurred while making the HTTP request to https://xxxxxxxxxxxxxxxxxxx.asmx. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
This appears to be a bug in Visual Studio.

WebDeploy - just can't get it to work

I've installed Web Deploy 2.1 on a Server 2008 R2 running under VMWare.
In the IIS Manager (Management Service applet) I can see that "Enable Remote Connections" is checked and the port is set to 8172. Under "IIS Manager Permissions" I've added my Windows account (CORP\ekkis) and under the "Authentication" applet (for IIS) I have enabled "Windows Authentication".
I've also turned off the firewall.
So from the command line I test the system to work like this:
C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:dump -source:contentPath=\temp,wmsvc=192.168.0.70,username=CORP\ekkis,password=MyPass,authType=Basic -allowUntrusted=True
and get this:
Info: Using ID '9b954a0f-ff07-4e77-ba2c-d27472f5fda0' for connections to the rem
ote server.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the destination computer ("192.168.0.70") using t
he Web Management Service, but could not authorize. Make sure that you are using
the correct user name and password, that the site you are connecting to exists,
and that the credentials represent a user who has permissions to access the sit
e.
Error: Object of type 'contentPath' and path '\temp' cannot be created.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
I've also tried deploying with Visual Studio 2010 from the host OS with the following service urls (I haven't found proper documentation on how to form this url):
https://192.168.0.70/
https://192.168.0.70:8172/
https://192.168.0.70:8172/MsDeployAgentService/
https://192.168.0.70/MsDeployAgentService/
I've tried the non-secure versions as well but just cannot get it to work. What is the correct format for the url? and what permissions am I missing?
the errors from VS have varied depending on how I attempt it but below is a sample:
Could not complete the request to remote agent URL 'http://192.168.0.70:8172//MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
there really should be a guide out there to do this (yes, I've googled myself blue in the face)!
thanks - ekkis
ok, I've figured out that the correct url is:
https://192.168.0.70:8172/MsDeploy.axd
and that having the "Windows Authentication" enabled doesn't seem to make a difference. Also, having my account in the "Managers" list doesn't seem to make a difference either.
so the back end was all working fine (I've turned off the Web Deployment Agent Service). it was just the url I had wrong.

Resources