Visual Studio 2017 RC4 Webdeploy results in ERROR_USER_UNAUTHORIZED - webdeploy

Tried everything. Deploying same type of web project (Net.Core 1.1) with VS2015 at the very same location using exactly same parameters works without any problems.
Is there any known issue with release RC.4+26206?
This what my server log says:
IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED
Only Windows Administrators are allowed to connect using a server connection. Other users should use the 'Connect To Site or Application' task to be able to connect.
Process:WMSvc
User=sludr

Ok... Found a solution. Same reason as documented here: .net core web deploy requires admin permissions, so VS2017 requires right now a windows account of group Administrators to publish net core projects.
Hopefully this will be fixed soon.

Note: The official VS 2017 RTW still has this bug.

Related

Develop ASP.NET Core 2+ Application with Windows Authentication in VS Code without Admin Privilege on Windows

I am developing using VS Code on Windows.
The application is ASP.NET Core 2 or 3.
The enterprise domain is setup to use Windows Authentication.
Kestrel requires admin privilege for setspn.
I cannot figure out a way to run IIS Express from VS Code or command line.
And even if I did, I am wondering how I will be able to debug using OmniSharp?
What is your VS Code workflow to run and debug your ASP.NET Core applications against Windows Authentication?
I know the MS Visual Studio might be easier but it is not an option for me.
Please help.
Update
Unable to use Kesterel:
According to MS Docs, Kesterel only uses Negotiate for Windows Authentication and this requires setspn with admin privilege because it uses User Mode. Is there a way to go around that?
Cannot figure out how to use IIS Express:
What is the -clr version option of ASP.NET Core 2/3? The default value is v4 which seems to be for ASP.NET (i.e. Framework).
Also, even when I specify the -path option, I notice that IIS Express gives the info that it copied and used the default configuration file. By default, Windows Authentication is disabled there. Do I need to edit or create my own configuration file? What options do I need to change or make sure that I have?
Wondering how to debug in VS Code:
I know how to attach to Chrome and Node. Would you please direct me to a documentation on how to attach to IIS Express?

Lightswitch Deployment (Visual Studio 2013) Tier-3 with No Authentication

I am attempting to deploy a simple lightswitch application (HTML not Windows app) in VS 2013. I have selected to not have authentication to make the testing easier.
The IIS server and the database server are on different machines. I have followed the steps here for server setup.
However, when I go to the website after publishing, I get this error:
You do not have permission to view this directory or page.
I went to the IIS server and made sure that only Windows authentication was enabled on the application that was sent over. After reading another MS article on the 401 error, they recommended unchecking the Kernel Mode Authentication. That only prompted a username/password request, which did not work.
What am I doing wrong here? I assumed having no authentication setup in the deployment would make the website open to anyone on our network. Not the case?
Found the problem(s) with this one.
Problem #1
When I downloaded / installed Microsoft's Web Platform Installer on my IIS server, the LightSwitch application I was working on and several other seemingly random websites/apps in the IIS all had the Authentication settings disabled for every authentication type (Anon, Basic, Windows, Forms, etc.). Had to go and Enable windows authenication on several websites. Did not expect that...
Problem #2
HTML Client folder was not loaded on the machine for some reason. Removed Lightswitch app from IIS and deleted the folder. Created a package for install in VS2013 and then copied the zip file over to the IIS server. Flawless install after that... One thing to watch for it to change the default setting in IIS from 'default.htm' to 'default.aspx'.

Updating IIS website using WCF standard endpoints with Powershell

We have an ASP.Net website running under the 4.0 framework in IIS 7.5 on a Windows Server 2008 R2 box. A portion of the web site functionality utilizes WCF and has a "standardEndpoints" section in the web.config.
The website works fine and everything works fine if we want to use the IIS Management Console GUI to do things.
We would like to use powershell to make changes to the web.site but when we run "Set-WebConfigurationProperty" an error is generated indicating that the "standardEndpoints" section of the web.config can't be processed.
The hotfix referenced here is not the solution. The website works, the hotfix appears to be only for Server 2008 (not R2), and when you try to install it, it says "not applicable for this server".
We did discover by running $PSVersionTable that PowerShell was referencing version 2.0 of the CLR. We installed Powershell 3.0 and now Powershell is referencing version 4.0 of the CLR but the problem persists.
We are looking to see if there is a simple solution to this. I suspect we may not have the right version of the IIS management script dll but can't find a different one to use. If the solution gets to complicated, we will just wipe the server and start from scratch.
Thanks for any suggestions,
John

Azure Compute Emulator Admin Priviledges - Registering WCF URL

I am working on upgrading a project to Windows Azure 1.3 and I am running into an issue with hosting WCF services in an Internal Web Role. I get the following exception when trying to access the services:
HTTP could not register URL http://127.0.0.1:5111/service.svc/. Your process does not have access rights to this namespace
I did have a similar issue when working with Azure 1.0 and resolved it by with the following code:
new BasicHttpBinding() { HostNameComparisonMode = HostNameComparisonMode.Exact }
With this new issue, there seem to be a few common solutions; using the above code, runing the httpcfg tool to explictly change namespace reservation, and running as Administrator.
As far as I know, the httpcfg tool will not work for an Azure Internal WebRole because the port is dynamically assigned. Running Visual Studio as Administrator and debugging the Cloud project does not fix the problem either (Visual Studio does launch the Emulator).
It seems like the Azure Compute Emulator does not inherit the permissions from the Visual Studio process. Has anyone run into a similar problem, any ideas on fixes, work-arounds?
Karl
Okay, my suspisions were proved correct. When the Azure Compute Emeulator starts, it adds the Web Role instances in IIS, but the App Pool Identity does not have permissions to register namespaces.
I found this blog article which describes how to change the identity of the app pool when a Web Role instance is started.
http://www.wadewegner.com/2011/01/programmatically-changing-the-apppool-identity-in-a-windows-azure-web-role/
This is a less than ideal solution, but works.

SSL with Visual Studio Development Server

Is it possible to use SSL with Visual Studio Development Server (a.k.a. Web Application project)? I don't want to have to deploy IIS locally if possible. I'm running Windows 7.
NOTE: I've seen this (http://connect.microsoft.com/VisualStudio/feedback/details/354576/add-https-support-to-visual-studio-asp-net-development-server) but I was still hoping there was a workaround.
It cannot be done with VS 2008, so I've simply resorted to deploying my app to the local IIS as part of the start process with a generated cert.
We can use IIS Express with VS 2010 to develope and test web apps in SSL. Here is a complete article explaning how to use IIS Express and Visual Studion 2010 to develope websites in SSL
Working with SSL at Development Time is easier with IISExpress
Introducing IIS Express
this subject was covered here and it say's, you actually can't.
But you might take a look at this link, which might prove the contrary: (See link in comment, i'm not yet able to post more then 1 link per post ...doh)
Hope this helps.
It can be done in VS2010, I'm not sure if VS2008 supports the following approach. Configure Visual Studio to use use Microsoft IIS Express instead of the web server built in to Visual Studio.