Visual Studio Development Bookmark and Share   
 index > Visual Studio Debugger > Connection string with windows Passwod and username
 

Connection string with windows Passwod and username

i want built site with visual studio 2008 with sql server 2005 database.
how i can create connection string using windows username and password to automatic login in web forms?
i've try this one :
<appSettings>
    <add key ="conHRD" value ="Data Source=KungFu;Initial Catalog=Yhan Integrated Security=true;"/>
  </appSettings>

When open in IE that was an error.
Login failed for user ''. The user is not associated with a trusted SQL Server connection. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.


How i can fix that problem?
help me please.
Thanks.
Surbakti  Wednesday, October 07, 2009 10:12 AM
Hello Surbakti,

Please modify the connect string as follows (it seems that we omit a semicolon after Yhan):
     <add key ="conHRD" value ="Data Source=KungFu;Initial Catalog=Yhan; Integrated Security=true;"/>

Best regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework!
  • Marked As Answer bySurbakti Thursday, October 08, 2009 4:03 AM
  •  
Roahn Luo  Thursday, October 08, 2009 2:37 AM
Hello Surbakti,

Please modify the connect string as follows (it seems that we omit a semicolon after Yhan):
     <add key ="conHRD" value ="Data Source=KungFu;Initial Catalog=Yhan; Integrated Security=true;"/>

Best regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework!
  • Marked As Answer bySurbakti Thursday, October 08, 2009 4:03 AM
  •  
Roahn Luo  Thursday, October 08, 2009 2:37 AM

You can use google to search for other answers

Custom Search

More Threads

• WTF with debugger of VS 2008 ???
• msvsmon - windows 2008 remote debugging
• VS constantly crashing
• Problem with the Debugger
• PInvokeStackImbalance was detected
• Breakpoint does not work after a managed allocation in a windows service.
• Debug doesn't work in VS 2003
• Unable to save settings while debugging ClickOnce app
• Debugger debugs other Applications
• How to do that VS Server Explorer close Databases Connections while Debugging