Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7773799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:13:05+00:00 2026-06-01T17:13:05+00:00

I have a web application and I am trying to deploy it on a

  • 0

I have a web application and I am trying to deploy it on a webserver using MSDeploy.exe (Web Deploy 2)

I have tried 4 scenarios:

  1. Through VS2010 Publish method with following settings:

    Publish Method: Web Deploy

    Service Url: https://MyServerName:8172/MsDeploy.axd

    Site/application: MyWebSiteName

    Allow untrusted: checked

    Username: MyUsername

    Password: MyPassword

    This method works just fine.

    On MyServerName machine I have Web Management Service running; I have a website MyWebSiteName, an application MyWebAppName and MyUserName is an IIS Manager for it.

  2. Through VS2010 Publish method with following settings:

    Publish Method: Web Deploy

    Service Url: https://MyServerName:8172/MsDeploy.axd

    Site/application: MyWebSiteName/MyWebAppName

    Allow untrusted: checked

    Username: MyUsername

    Password: MyPassword

    This method works just fine.

  3. Through MSDeploy.exe command line (within a Powershell script)

    $Source = “contentPath=’…._PublishedWebsites\MyWebApp'”

    $Destination = “contentPath=MyWebSiteName,computerName=’https://fc-wapps-trial:8172/MsDeploy.axd?Site=WebSiteTest’,Username=MyUsername,Password=MyPassword,AuthType=basic”

    MSDeploy -verb:sync -source:$Source -dest:$Destination -allowUntrusted

    This method also works fine.

  4. Through MSDeploy.exe command line (within a Powershell script)

    $Source = “contentPath=’…._PublishedWebsites\MyWebApp'”

    $Destination = “iisApp=MyWebSiteName/MyWebAppName,computerName=’https://fc-wapps-trial:8172/MsDeploy.axd?Site=WebSiteTest/MyWebAppName’,Username=MyUsername,Password=MyPassword,AuthType=basic”

    MSDeploy -verb:sync -source:$Source -dest:$Destination -allowUntrusted

    This method doesn’t work. I am getting the following error.

    Error Code: ERROR_USER_UNAUTHORIZED

    More Information: Connected to the destination computer (“MyServerName”) using the 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 site.

    Error: The remote server returned an error: (401) Unauthorized.

I was looking at what is the actuall MSDeploy command that the method 2 uses and I got something like:

msdeploy.exe

-source:manifest=’…\MyWebApp.SourceManifest.xml’

-dest:auto,ComputerName=’https://MyServerName:8172/MsDeploy.axd?site=WebSiteTest’,UserName=’MyUsername’,Password=’MyPassword’,IncludeAcls=’False’,AuthType=’Basic’

-verb:sync

-disableLink:AppPoolExtension

-disableLink:ContentExtension

-disableLink:CertificateExtension

-skip:objectname=’dirPath’,absolutepath=’…\App_Data$’

-setParam:kind=’ProviderPath’,scope=’IisApp’,match=’^…\PackageTmp$’,value=WebSiteTest/WebAppTest

-setParam:kind=’ProviderPath’,scope=’setAcl’,match=’^..\PackageTmp$’,value=WebSiteTest/WebAppTest

-allowUntrusted

-retryAttempts=2

Now this doesn’t seem to be anything close to what I am using in method 4. I tried running it myself without success, but I assume I wasn’t able to properly re-create all those parameters.

So my questions are:

– What I am doing wrong in method 4?

– How can I deploy a web application as a website application in IIS7 using MSDeploy.exe command

Thanks in advance for your help

Iulian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:13:07+00:00Added an answer on June 1, 2026 at 5:13 pm

    I ran into the same issue as you did. I solved it by only use site name in
    https://computername:8172/msdeploy.axd?site={websitenameonly}. Then set your webapplication path in the parameter using -setParam IIS Web Application Name= {your web application name here} or use a parameter file. And everything deployed fine.

    It seems that the site querystring value is required to authorize the request only. I haven’t find any definitive documentation from MS on any other querystring parameters that might solve this. But I actually tested 2 cases. 1) Deploying to a web site in IIS 7.5, this parameter is required. 2) Deploying to a web application under a web site, this parameter is actually optional, but if you want to include it, then it has to be a root site.

    You actually answered your own question here just probably didn’t realize it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to deploy application using ClickOnce to a webserver running sharepoint. I can publish
I'm trying to deploy a web application using MSDeploy, on Team Build in TFS.
I'm trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010
I'm trying to deploy my mvc app into my large web application. I have
I'm trying to import a web application into IIS7 using Web Deploy. I packaged
I am trying to deploy a web application using hibernate to Jboss 4.3.2.GA but
I'm using IIS and trying to deploy a web application that needs authentication mode=Windows.
I have just completed developing my web application. I was trying to deploy it
I have a web application project. I am trying to find out why certain
I'm trying to develop a web application with Novell LDAP Authentication . I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.