SQL database works on IIS but not in client machines
-
I have a ASP.NET website it is hosted on IIS 5 and it works fine' I can browse from IIS console itself but when I open the same in another client machine, I see the page but no database it says [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. I checked the named pipes and tcp/ip on sql server and all the permissions are enabled' I cant find why it shows up on the server but not on the client plz hlp
_____________________________________________________ Yea! I could be wrong...
-
I have a ASP.NET website it is hosted on IIS 5 and it works fine' I can browse from IIS console itself but when I open the same in another client machine, I see the page but no database it says [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. I checked the named pipes and tcp/ip on sql server and all the permissions are enabled' I cant find why it shows up on the server but not on the client plz hlp
_____________________________________________________ Yea! I could be wrong...
can you provide code.., how you are conneting to the database..,
Rajesh B --> A Simple Programmer <--
-
can you provide code.., how you are conneting to the database..,
Rajesh B --> A Simple Programmer <--
I do not have the code for this application it uses an XML file where i have to give the connection details like <Connection Name="Provider" Value="1" /> <Connection Name="Server" Value="server" /> <Connection Name="Database" Value="db" /> <Connection Name="UserID" Value="user" /> <Connection Name="Password" Value="pwd" /> I do not know how the application uses this is it a connection problem then so it should not work on the server I think...
_____________________________________________________ Yea! I could be wrong...
-
I do not have the code for this application it uses an XML file where i have to give the connection details like <Connection Name="Provider" Value="1" /> <Connection Name="Server" Value="server" /> <Connection Name="Database" Value="db" /> <Connection Name="UserID" Value="user" /> <Connection Name="Password" Value="pwd" /> I do not know how the application uses this is it a connection problem then so it should not work on the server I think...
_____________________________________________________ Yea! I could be wrong...
saud_a_k wrote:
<Connection Name="UserID" Value="user" /> <Connection Name="Password" Value="pwd" />
I'm not sure whether the sa-account is enabled by default, and it might even be that 'mixed mode authentication' is disabled. Create a new console-application, somewhat similar to this;
using System;
using System.Data.SqlClient;static class SqlTester
{
public static int Main (string[] args)
{
using (SqlConnection con = new SqlConnection(args[0])
{
try
{
con.Open ();
Console.WriteLine ("Connected succesfull, your ConnectionString is correct :)");
}
catch (Exception ex)
{
Console.WriteLine ("Something went wrong:\n" + ex.ToString ());
}
}
}
}That would give you a small console app that you can use to verify the connection-details. In this specific case, check whether the customers server have;
- an account with given UserID (should be in the same place as the 'sa')
- allowed mixed mode access (not just Windows-authentication)
- whether the servers' name is correct (express versions are called different than full servers, and they might even be using a named instance)
Good luck :)
I are Troll :suss:
-
saud_a_k wrote:
<Connection Name="UserID" Value="user" /> <Connection Name="Password" Value="pwd" />
I'm not sure whether the sa-account is enabled by default, and it might even be that 'mixed mode authentication' is disabled. Create a new console-application, somewhat similar to this;
using System;
using System.Data.SqlClient;static class SqlTester
{
public static int Main (string[] args)
{
using (SqlConnection con = new SqlConnection(args[0])
{
try
{
con.Open ();
Console.WriteLine ("Connected succesfull, your ConnectionString is correct :)");
}
catch (Exception ex)
{
Console.WriteLine ("Something went wrong:\n" + ex.ToString ());
}
}
}
}That would give you a small console app that you can use to verify the connection-details. In this specific case, check whether the customers server have;
- an account with given UserID (should be in the same place as the 'sa')
- allowed mixed mode access (not just Windows-authentication)
- whether the servers' name is correct (express versions are called different than full servers, and they might even be using a named instance)
Good luck :)
I are Troll :suss:
Eddy Vluggen wrote:
an account with given UserID (should be in the same place as the 'sa') allowed mixed mode access (not just Windows-authentication) whether the servers' name is correct (express versions are called different than full servers, and they might even be using a named instance)
I checked all these options but I still get the same error I also gave the location of another server but still the page shows up on the server but not on the client
_____________________________________________________ Yea! I could be wrong...
-
Eddy Vluggen wrote:
an account with given UserID (should be in the same place as the 'sa') allowed mixed mode access (not just Windows-authentication) whether the servers' name is correct (express versions are called different than full servers, and they might even be using a named instance)
I checked all these options but I still get the same error I also gave the location of another server but still the page shows up on the server but not on the client
_____________________________________________________ Yea! I could be wrong...
saud_a_k wrote:
I checked all these options but I still get the same error
Try the connectionstring below, with the console-application from the previous post;
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
If that fails to connect, you'd at least have a more decent error-message to hunt for.
saud_a_k wrote:
I also gave the location of another server but still the page shows up on the server but not on the client
If the above method also fails, chances are that there's a connectivity-problem. That means checking if you can 'ping' the clients' server, validating the firewalls and so on. If it's not a connectivity-problem, (security-related problems) then the console-app would generate an error-message indicating where the problem is.
I are Troll :suss:
-
I have a ASP.NET website it is hosted on IIS 5 and it works fine' I can browse from IIS console itself but when I open the same in another client machine, I see the page but no database it says [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. I checked the named pipes and tcp/ip on sql server and all the permissions are enabled' I cant find why it shows up on the server but not on the client plz hlp
_____________________________________________________ Yea! I could be wrong...
I'm assuming that the IIS is hosted on the same server as the SQL db? If so, it's making a local connection whereas clients are connecting over the network - based on this make sure that: 1) you have SQL configured to allow the type of connection you are trying to use from the client (IP, pipes, etc.) 2) you have the firewall configured to allow SQL traffic (I've had this problem in the past where the MS firewall didn't automatically add a rule for SQL) Those are my initial thoughts.