ClickOnce Not Obeying Installation Folder for Localhost - proxy

I'm testing a ClickOnce application deployment. I have setup a virtual directory on my machine (running IIS). I have specified http://localhost/SampleApplication as the Installation Folder URL in the Publish tab of Visual Studio. However, when I publish the application I get the following error:
Warning: Files could not be downloaded
from http://chrish/SampleApplication/.
The remote server returned an error:
(407) Proxy Authentication Required.
Publish success.
Warning: Unable to
view published application at
http://chrish/SampleApplication/publish.htm.
http://chrish/SampleApplication/publish.htm
Notice how it has changed my url from Localhost to my login name. Why? This wasn't happening a week ago.

ClickOnce installation involves verifying that the server name matches the expected name. Thus localhost always gets translated under the covers to the computer name [not the username as you suggest in your question] (one of many confusing things ClickOnce does - one side effect of this is that if you want to set up 3 download servers, you need to do 3 separate publishes and/or script the publish like this) or like this. So this is not a surprise - it's always doing that under the covers.
The 407 error relates to proxy auth. This implies downloading is being diverted via a proxy such as Microsoft ISA Server. Have a look in your IE Internet Options Connections Proxy Settings and make sure its bypassing for local addresses [such as chrish].
The reason it's reporting success is that the upload likely uses an alternate mechanism than the verification does and isn't being routed via / blocked by the proxy. (The underlying problem is that the .NET framework does not by default pass proxy credentials and you'd need to either apply a config entry for devenv or whatever does the publish or have the build process call a test step with extra code that does send the proxy credentials](http://blogs.msdn.com/jpsanders/archive/2009/03/24/httpwebrequest-webexcepton-the-remote-server-returned-an-error-407-proxy-authentication-required.aspx). See also How should I set the default proxy to use default credentials?)

ClickOnce doesn't like "localhost", but you can work around that.
If you set the Publishing Folder Location to:
C:\inetpub\wwwroot\SampleApplication\
and the Installation Folder URL to:
http://chrish/SampleApplication/
(where "chrish" is the network name of your computer) then you can publish locally.

Related

TF15013: The requested Team Foundation Server is not registered with the proxy server

I have configured TFS Proxy server and have set the source control setting of my local VS client. Also TFS Application server & TFS Proxy server both are in same network Domain.
But when i am taking get latest of any team project and second time taking the get latest of same team project at different machine but files are downloading Main server and giving below warning.
TF15013: The requested Team Foundation Server is not registered with the proxy server.
Can Anyone help me out how to resolve this issue & make fast get latest.
Thanks,
You can try to use the proxy command to configure your client to use a proxy server: see Proxy Command
eg :
c:\projects>tf proxy /add http://server:8081 /default:global /collection:http://tfsserver:8080/
If that still not work, recommend you to reconfigure the Proxy, you must use service accounts to install Team Foundation Server, and Team Foundation Server Proxy. These service accounts become the identity for the installed component.
By default, every component uses a built-in account (such as Network Service) as its service account.Built-in accounts do not use passwords and already have the Log on as a service permission, making them easier to manage, especially in a domain environment. See requirements.
After that you can reference below link to configure the TFS proxy to work with Your TFS:
https://blogs.msdn.microsoft.com/buckh/2016/10/12/how-to-configure-a-tfs-proxy-to-work-with-team-services/
Update:
TFS 2013 is Xaml build system, double chick the definition will pop up the definition to edit. TFS 2017 is vNext build system, it will redirect to web client build progress page. That's by design, not related to the source settings.
And as far as I know, there isn't the utility or third part tools can open the vNext build definition in VS directly, vNext build definition is task independent, you can edit it conveniently via web portal.

Installing ColdFusion 11 on Windows Server 2012 / IIS 8.0

I've done this many times in the past, but this is new, and I think CF11 is the problem. Not sure.
Fresh Windows Server 2012.. installed CF11. Selected "Configure All IIS Websites" during install. There's only two sites configured in IIS -- Default, and one other, which has its own name (test.mydomain.com) configured in the hosts file and in DNS. In its webroot is a single index.cfm file, and a subdirectory thereof, is an actual ColdFusion web app.
When I browse to the webroot, I get a standard Microsoft IIS page, rather than the index.cfm file. If I browse to the subdirectory, I get 404.
I've set index.cfm as the default document.
The path specified to the webroot is correct.
If I run the wsproxyconfig.exe file, it shows nothing is configured. I click Add, select IIS. In the drop-down where you configure a specific site, it says None and is not selectable. If I try to add, I get the error, "Unable to configure WebSocket Proxy Enable the required WebSocket Protocol option in IIS." I've looked all over IIS and can't find where this setting might be.
What's interesting is I can get the cfadmin page to load and function just fine (127.0.0.1/cfide/administrator)... there are no port numbers in that URL so it must be passing through IIS. So I'm not really sure what the problem is. Is it the connector? Is it something else? I'm stumped.

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

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.

Hosting WebMatrix Page

What exactly do I need from a host for my webmatrix project to work? I know Scott Hanselman from Microsoft gave out a few nice host sites but I was just wondering for fun.
In order to publish to a host from WebMatrix using Web Deploy, the host needs to be in a compliant state. First of all, it has to run WebDeploy and the remote service WMSvc has to be in a desired state (enabled and started). Delegation rules have to be set up, so that the user has permissions and the right scope to deploy various components like IIS application, database, ACLs, etc. In order to check whether a host is WebMatrix-friendly, ServerValidator tool can be used (see the article for a full list of host requirements).
If you want to publish to a host though FTP, all you need to ensure is that FTP publishing is enabled on the host.
Hope this helps.
You can use any .Net 4.0 host, but you'll need to copy a bunch of DLL files to yuor bin folder.
The exact files required depend on what libraries your site uses.
At a minimum, you'll probably need
Microsoft.Web.Infrastructure.dll
Microsoft.Web.Helpers.dll
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.Razor.dll
WebMatrix.Data.dll
WebMatrix.WebData.dll
These can be found in Program Files\Microsoft ASP.Net.
If it still doesn't work, copy any additional files from FileNotFound errors.
To publish your website from WebMatrix - your hosting provider must support one of the two publishing technologies - FTP and/or WebDeploy.
In case of FTP, you would need to manually enter the following ftp settings: FTP Server, username, password and destination url. Optionally you can also specify the site path
In case of WebDeploy, you could just get the publishsettings file for your host and import the settings. Else, you can also manually enter these settings.

Resources