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 8442859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:57:20+00:00 2026-06-10T08:57:20+00:00

We are running deployment scripts using pstrami. Part of the deployment is to execute

  • 0

We are running deployment scripts using pstrami. Part of the deployment is to execute database migrations. The migrations are using an connection string with Integrated Security.

When the script executes on the remote machine the migrations fail with a sql error saying Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’

The person executing the script is a domain administrator. Other deployments that we run execute the remote scripts with the user who started the process.

  • 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-10T08:57:22+00:00Added an answer on June 10, 2026 at 8:57 am

    This is the scenario:
    You run the pstrami(deployment) script from desktopA. The script pushes your installation files to serverA. Then on serverA the scripts are run remotely as the person inititating the script from desktopA. One of the steps is to run a sql database upate with fluentmigrator using a connection string paramter using “integrated security” and the database is on serverB.

    Connection string example:

    $migration_db_connection = Data Source=serverB;Initial Catalog=PropertyDb;Integrated Security=SSPI; 
    .\migrate.exe /conn "$migration_db_connection" /db SqlServer /a $migration_assembly /profile DEBUG
    

    Pstrami uses the powershell command invoke-command which uses the account you are running the script under as the default user. So, what happens is that when you run the script from desktopA as “jonDoe” it then authenticates on serverA. So your pstrami scripts run under “jonDoe” on serverA. When you execute the fluentmigrator script on serverA as “jonDoe”, fluentmigrator returns an error Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’. In IIS, you run into an interesting situation when you need to access another resource off of the IIS server and certain fairly common situations occur. When using Integrated Security, anonymous access is disabled, and impersonation is turned on, a Windows security measure kicks in and doesn’t allow your site to access resources on any network servers. (http://weblogs.asp.net/owscott/archive/2008/08/22/iis-windows-authentication-and-the-double-hop-issue.aspx)

    This is how I got around the Windows Authentication and the Double Hop problem I ran into. Run your migration scripts directly on your sql database server and include it as a server target in your pstrami environments.

    Example:

    Environment "dev" -servers @(
        Server "serverA" @("InstallWeb") 
        Server "serverB" @("RunMigrations")
        ) 
    

    More on Double Hop

    • http://www.spdoctor.net/Pages/message.aspx?name=login-failed-for-user-bdc
    • http://www.sqlservercentral.com/blogs/sqlsandwiches/2011/06/20/double-hop-of-doom/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're currently using Phing for deployment and use dbdeploy to apply any database changes.
As part of a ClickOnce deployment I'm running mage.exe mage.exe -Sign manifest file -CertFile
I'm running fabric (Django deployment to apache) and everything seems to work fine until
I'm running into an issue where my deployment loops through Recycling. From Visual Studio:
I've got TFS2010 up and running and building a webdeploy deployment package. Into my
Running my script through Devel::NYTProf showed that the following portion of code took up
Running Puppet v2.7.14 on CEntOs 6 and also using Apache/Passenger instead of WEBrick. I
Running the following line in my script gives me a Permission denied error: $config_out
Background: I am using the deployment tools in Visual Studio 2010. I right clicked
In order to run a python script on a large deployment, I need to

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.