Hello,
I have set a web deploy on a local Windows 2012 server with a new Site.
I have set permissions to Administrator at IIS server level and at the Site level thru IIS Manager Permissions.
I have created an Application Pool and a Virtual Directory for MySiteApp.
My Web Deploy publish settings at VS.NET 2015:
Server: 192.168.45.60
Site name: TestSite/MySiteApp
User name: TESTSERVER\Administrator
Validate Connection on publish profile pass ok.
Added <AllowUntrustedCertificate>True</AllowUntrustedCertificate> to .pubxml
When trying to Publish to server I am receiving the error:
Error Error: The remote server returned an error: (401) Unauthorized.
Error Code: ERROR_USER_UNAUTHORIZED
At Windows Server 2012 event viewer I can see this error:
IISWMSVC_LOGIN_UNKNOWN_ERROR
An unexpected error occurred while retrieving the login information.
Exception:System.Runtime.InteropServices.COMException (0x8007000D): Invalid site name
at Microsoft.Web.Administration.Interop.IAppHostProperty.set_Value(Object value)
at Microsoft.Web.Administration.ConfigurationElementCollectionBase`1.FindElementWithCollectionKey(String elementName, String collectionKey, Object value)
at Microsoft.Web.Administration.SiteCollection.get_Item(String name)
at Microsoft.Web.Management.Server.ApplicationManagementUnit.EnsureDefinition()
at Microsoft.Web.Management.Server.ApplicationManagementUnit..ctor(IManagementContext context, String siteName, String applicationPath)
at Microsoft.Web.Management.Server.WebManagementHttpModule.CreateManagementUnit(HttpRequest request)
at Microsoft.Web.Management.Server.WebManagementHttpModule.OnApplicationPostAuthorizeRequest(Object sender, EventArgs e)
Process:WMSvc
User=TESTSERVER\Administrator
If I am changing at .pubxml as follows:
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod> to <MSDeployPublishMethod>RemoteAgent</MSDeployPublishMethod>
and add <AuthType>NTLM</AuthType>
then I am able to publish with no problems.
I guess something I did not setup correctly for publishing with WMSVC.
Thanks for any help.
Asaf