Computer name could not be obtained

  • Thread starter Thread starter Xavier
  • Start date Start date
X

Xavier

I am getting this error when I set the ConnectionString
property of the SqlConnection object. This works fine
from one computer but it doesn't from another server.

mscorlib
Computer name could not be obtained.

System.InvalidOperationException: Computer name could not
be obtained. at System.Environment.get_MachineName() at
System.Data.SqlClient.SqlConnectionString.MachineName() at
System.Data.SqlClient.SqlConnectionString.WorkStationId()
at
System.Data.SqlClient.SqlConnectionString.CheckSetNetwork
() at
System.Data.SqlClient.SqlConnectionString.ValidateParse()
at System.Data.Common.DBConnectionString..ctor(String
connectionString, UdlSupport checkForUdl) at
System.Data.SqlClient.SqlConnectionString..ctor(String
connectionString) at
System.Data.SqlClient.SqlConnectionString.ParseString
(String connectionString) at
System.Data.SqlClient.SqlConnection.set_ConnectionString
(String value) at ASP.edit_address_aspx.Page_Init(Object
s, EventArgs e)

Any ideas?

Thanks

XC
 
Back
Top