- Where Developers Learn, Share, & Build Careers


I am supporting a .NET 4.0 (Visual Studio 2010) web application that authenticates a SQL Server 2008 database My work intranet application has been authenticated for the database using Windows authentication. All fine and dandy if I'm developing on my host, but I'm working on a virtual machine which is not at work domains. Thus, when the project is created and runs, it throws a SqlClient.SqlException

"Logging failed. The login is from an unreliable domain and can not be used with Windows authentication. . "

My host is less in developing and leaving VM, what can I do to prevent this error and successfully verify the database so that I can build / run the web app Can i do I am willing to store my credentials locally anywhere, although preferably nowhere, which will be under TFS source control (like web config) because I can not keep the file out because other developers on the project I

I have tried to run Visual Studio as a separate user (as a user on my work domain) but I am " Trat user name or incorrect password "error.

Note, adding virtual machines are not the option of connecting through the domain (or via VPN). Keep VM away from the domain. Also keep in mind, the virtual machine is running on the computer that is on the computer, and the VM uses a shared connection. So it can use intranet, but it can not do Windows authentication on SQL Server.

You can run Visual Studio (or SQL Server Management Studio) as a user on the domain. The trick is, do you have to use ???? / Netonly A type of alternative Windows device, so that you can run on a non-domain machine as a domain user.

That is, in the command prompt, you run this command (filling your own criteria):

  runas / netonly / user: & lt; Domain & gt; \ & Lt; User_Name & gt; "& Lt; Your_Program.exe"   

Alternatively, you can create a shortcut on your desktop, and set this command as a shortcut target. When running the shortcut / command, when you get the signal and the visual studio (or the programs you prefer) will be run as a domain user.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -