locked
Error during publish - No Windows account was found with user name RRS feed

  • Question

  • When I publish the lightswitch application. I get the following error message and it says publish failed.
    Error 1 No Windows account was found with user name 'domain\username'.
     C:\Program Files\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets
    The application actually gets deployed to the IIS. However, I can not login to the application because of my authentication choice. I chose the following option for the authentication: Allow only users specified in the Users screen of the application.
    this account  'domain\username' is what I specified as the Application Administrator during the Publish configuration. It is a domain account, so it is a valid windows account. 
    Am I missing something?
    thanks.
    Volkan

    volkan

    Thursday, August 18, 2011 4:33 PM

Answers

  • In the folder that you published, tehre's a file called "Install.htm" that will explain how to add an administrative user after publishing.

    Step 5 states:

    If in the Publish wizard you chose to deploy a database script, you need to provide the default administrator login after deploying the app, using the Security Admin tool. The tool SecurityAdmin.exe, can be found under \Microsoft Visual Studio 10.0\LightSwitch\1.0\Tools\Microsoft.LightSwitch.SecurityAdmin.exe

    a. To run the tool, open a command prompt and navigate to path for the tool, then type:

     

    Microsoft.LightSwitch.SecurityAdmin.exe /createadmin /user:domainname\username /fullname:user'sfullname /config:pathtowebconfig

     

    Replace the italicized values with the Username, Fullname, and full path to the deployed web.config file for the deployed app. You must also include web.config in the path.

     

    b. For Windows authentication, no password is required. For Forms authentication, you must also include the password:

     

    Microsoft.LightSwitch.SecurityAdmin.exe /createadmin /user:username /password:password /fullname:user'sfullname /config:pathtowebconfig

     

    Replace the italicized values with the Username, Password, Fullname, and full path to the deployed web.config file for the deployed app. You must also include web.config in the path.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    Wednesday, December 28, 2011 4:21 AM
    Moderator

All replies

  • Same problem here. Publishing out over vpn. The site publishes fine, but the asp.net role provider bombs out. I am going to try to manually add the user to the db and see what happens.
    Sunday, September 11, 2011 7:23 PM
  • Did you have any luck manually adding users?  I am having the same problem.  I now have my app deployed, but can't access it since I couldn't define an admin?  Any help would be appreciated!  Thanks!
    Tuesday, December 27, 2011 10:08 PM
  • In the folder that you published, tehre's a file called "Install.htm" that will explain how to add an administrative user after publishing.

    Step 5 states:

    If in the Publish wizard you chose to deploy a database script, you need to provide the default administrator login after deploying the app, using the Security Admin tool. The tool SecurityAdmin.exe, can be found under \Microsoft Visual Studio 10.0\LightSwitch\1.0\Tools\Microsoft.LightSwitch.SecurityAdmin.exe

    a. To run the tool, open a command prompt and navigate to path for the tool, then type:

     

    Microsoft.LightSwitch.SecurityAdmin.exe /createadmin /user:domainname\username /fullname:user'sfullname /config:pathtowebconfig

     

    Replace the italicized values with the Username, Fullname, and full path to the deployed web.config file for the deployed app. You must also include web.config in the path.

     

    b. For Windows authentication, no password is required. For Forms authentication, you must also include the password:

     

    Microsoft.LightSwitch.SecurityAdmin.exe /createadmin /user:username /password:password /fullname:user'sfullname /config:pathtowebconfig

     

    Replace the italicized values with the Username, Password, Fullname, and full path to the deployed web.config file for the deployed app. You must also include web.config in the path.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    Wednesday, December 28, 2011 4:21 AM
    Moderator
  • Thanks Yann!
    Friday, December 30, 2011 3:05 PM
  • You're welcome!
    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    Monday, January 9, 2012 1:16 PM
    Moderator