473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dear All,

Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(
Nov 19 '05 #1
36 1958
How are you trying to connect? What's the conenction string? Are you using
Integrated Security or SQL Server Secuirity? Can you connect using teh same
conenction parameters using Query Analyzer ?
"Shaker" wrote:
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(

Nov 19 '05 #2
I have tried all type on connection string listed in the world.
Including the Connection string used by Database projects on ASP.Net, and
Data envirmennts on VB6, and ODBC and UDL,....

"CBretana" wrote:
How are you trying to connect? What's the conenction string? Are you using
Integrated Security or SQL Server Secuirity? Can you connect using teh same
conenction parameters using Query Analyzer ?
"Shaker" wrote:
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(

Nov 19 '05 #3
Okay, let's start with terminology. The IIS Server doesn't connect to
anything other than a network. It's an Operating System. Now, what IS
connecting is:

Query Analyzer
Enterprise Manager
VB6 Desktop app

All three of the applications mentioned are executables, which means that
they run under the machine's System account.

On the other hand, your ASP.Net app runs under a different account. Chances
are it runs under the default ASP.Net account, which is extremely
underpriveleged.

Okay, now, SQL Server can be connected to in one of 2 different ways:

Windows Authentication
Mixed Windows and SQL Server Authentication

When using Windows Authentication only, only Windows accounts that have been
granted the necessary database permissions can access the database. When
using Mixed mode, SQL Server accounts can also access the SQL Server,
according to the priveleges that they have been granted IN SQL Server.

So, if you're using Windows Auth only, your connection string should reflect
that, and the ASP.Net user account must be granted the necessary
permissions.

If you're using Mixed mode, the connection string should contain the name
and password of the SQL Server account that has been granted the
permissions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(

Nov 19 '05 #4
Did any of them work ok from Query analyzer, or some other tool running on
same machine? If not, you have no guarantee that they will work from code..

"Shaker" wrote:
I have tried all type on connection string listed in the world.
Including the Connection string used by Database projects on ASP.Net, and
Data envirmennts on VB6, and ODBC and UDL,....

"CBretana" wrote:
How are you trying to connect? What's the conenction string? Are you using
Integrated Security or SQL Server Secuirity? Can you connect using teh same
conenction parameters using Query Analyzer ?
"Shaker" wrote:
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(

Nov 19 '05 #5
To clarify,
Server 1
I have SQL-Server only- Remote server which allows Mixed mode behind the
firewall.

Server 2:
And IIS + SQL server,... query analyzer, VB 6, ,... All begined th firewall.

Trying to establish connection from 2 to 1.
All connnections success Except ASP.Net/ASP
The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User on
Server1), and other requiered parameters,...

This is may simplyfy the story>

"Kevin Spencer" wrote:
Okay, let's start with terminology. The IIS Server doesn't connect to
anything other than a network. It's an Operating System. Now, what IS
connecting is:

Query Analyzer
Enterprise Manager
VB6 Desktop app

All three of the applications mentioned are executables, which means that
they run under the machine's System account.

On the other hand, your ASP.Net app runs under a different account. Chances
are it runs under the default ASP.Net account, which is extremely
underpriveleged.

Okay, now, SQL Server can be connected to in one of 2 different ways:

Windows Authentication
Mixed Windows and SQL Server Authentication

When using Windows Authentication only, only Windows accounts that have been
granted the necessary database permissions can access the database. When
using Mixed mode, SQL Server accounts can also access the SQL Server,
according to the priveleges that they have been granted IN SQL Server.

So, if you're using Windows Auth only, your connection string should reflect
that, and the ASP.Net user account must be granted the necessary
permissions.

If you're using Mixed mode, the connection string should contain the name
and password of the SQL Server account that has been granted the
permissions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(


Nov 19 '05 #6
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
I have tried all type on connection string listed in the world.
Including the Connection string used by Database projects on ASP.Net, and
Data envirmennts on VB6, and ODBC and UDL,....

"CBretana" wrote:
How are you trying to connect? What's the conenction string? Are you
using
Integrated Security or SQL Server Secuirity? Can you connect using teh
same
conenction parameters using Query Analyzer ?
"Shaker" wrote:
> Dear All,
>
> I have tried to access a SQL server DB on on network A from ASP/Or
> ASP.Net
> Application
> Which is hosted on another network domain,
> Both of them are behind the firwall (all consideraation are fixed,..),
> IIS server can connect to SQL-Servers, using:
> SQL-Analyzer or
> Enterprize manager or
> VB6 desktop application hosted on (IIS) server using ADODB or
> VC# Desktop application,...
>
> But when the story comes to Acccesing SQL-Server from ISS using either
> ASP
> or ASP.Net The following error:
> "SQL Server does not exist or access denied"
>
> Is this logical, is there a way to overcome, this problem.
> I have tried a looked into many links and previous experments and did
> all
> workarouunds listed on MSISDN, but still the same problem.
>
>
> --
> MCSD not .Net yet :(

Nov 19 '05 #7
Please check my last response to Keiven.

"CBretana" wrote:
Did any of them work ok from Query analyzer, or some other tool running on
same machine? If not, you have no guarantee that they will work from code..

"Shaker" wrote:
I have tried all type on connection string listed in the world.
Including the Connection string used by Database projects on ASP.Net, and
Data envirmennts on VB6, and ODBC and UDL,....

"CBretana" wrote:
How are you trying to connect? What's the conenction string? Are you using
Integrated Security or SQL Server Secuirity? Can you connect using teh same
conenction parameters using Query Analyzer ?
"Shaker" wrote:

> Dear All,
>
> I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
> Application
> Which is hosted on another network domain,
> Both of them are behind the firwall (all consideraation are fixed,..),
> IIS server can connect to SQL-Servers, using:
> SQL-Analyzer or
> Enterprize manager or
> VB6 desktop application hosted on (IIS) server using ADODB or
> VC# Desktop application,...
>
> But when the story comes to Acccesing SQL-Server from ISS using either ASP
> or ASP.Net The following error:
> "SQL Server does not exist or access denied"
>
> Is this logical, is there a way to overcome, this problem.
> I have tried a looked into many links and previous experments and did all
> workarouunds listed on MSISDN, but still the same problem.
>
>
> --
> MCSD not .Net yet :(

Nov 19 '05 #8
Let me make sure I understand your issue.

You have two boxes:

Box A has SQL Server,
Box B has ASP.NET apps and IIS

You can reach Box A (SQL Server) from Box B via Enterprise Manager and Query
Analyzer, but not from ASP.NET apps.

Is this correct?
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(

Nov 19 '05 #9
Well, if you're still having problems, post the Connection String.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
To clarify,
Server 1
I have SQL-Server only- Remote server which allows Mixed mode behind the
firewall.

Server 2:
And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
firewall.

Trying to establish connection from 2 to 1.
All connnections success Except ASP.Net/ASP
The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
on
Server1), and other requiered parameters,...

This is may simplyfy the story>

"Kevin Spencer" wrote:
Okay, let's start with terminology. The IIS Server doesn't connect to
anything other than a network. It's an Operating System. Now, what IS
connecting is:

Query Analyzer
Enterprise Manager
VB6 Desktop app

All three of the applications mentioned are executables, which means
that
they run under the machine's System account.

On the other hand, your ASP.Net app runs under a different account.
Chances
are it runs under the default ASP.Net account, which is extremely
underpriveleged.

Okay, now, SQL Server can be connected to in one of 2 different ways:

Windows Authentication
Mixed Windows and SQL Server Authentication

When using Windows Authentication only, only Windows accounts that have
been
granted the necessary database permissions can access the database. When
using Mixed mode, SQL Server accounts can also access the SQL Server,
according to the priveleges that they have been granted IN SQL Server.

So, if you're using Windows Auth only, your connection string should
reflect
that, and the ASP.Net user account must be granted the necessary
permissions.

If you're using Mixed mode, the connection string should contain the name
and password of the SQL Server account that has been granted the
permissions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
> Dear All,
>
> I have tried to access a SQL server DB on on network A from ASP/Or
> ASP.Net
> Application
> Which is hosted on another network domain,
> Both of them are behind the firwall (all consideraation are fixed,..),
> IIS server can connect to SQL-Servers, using:
> SQL-Analyzer or
> Enterprize manager or
> VB6 desktop application hosted on (IIS) server using ADODB or
> VC# Desktop application,...
>
> But when the story comes to Acccesing SQL-Server from ISS using either
> ASP
> or ASP.Net The following error:
> "SQL Server does not exist or access denied"
>
> Is this logical, is there a way to overcome, this problem.
> I have tried a looked into many links and previous experments and did
> all
> workarouunds listed on MSISDN, but still the same problem.
>
>
> --
> MCSD not .Net yet :(


Nov 19 '05 #10
"Driver={SQL
Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
or

"DSN=DSNNAme;UID=sqlLogin;PWD=pppp"

or

"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"

or
"Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme

...
...
...
...
Ther is still many

"Michael C#" wrote:
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
I have tried all type on connection string listed in the world.
Including the Connection string used by Database projects on ASP.Net, and
Data envirmennts on VB6, and ODBC and UDL,....

"CBretana" wrote:
How are you trying to connect? What's the conenction string? Are you
using
Integrated Security or SQL Server Secuirity? Can you connect using teh
same
conenction parameters using Query Analyzer ?
"Shaker" wrote:

> Dear All,
>
> I have tried to access a SQL server DB on on network A from ASP/Or
> ASP.Net
> Application
> Which is hosted on another network domain,
> Both of them are behind the firwall (all consideraation are fixed,..),
> IIS server can connect to SQL-Servers, using:
> SQL-Analyzer or
> Enterprize manager or
> VB6 desktop application hosted on (IIS) server using ADODB or
> VC# Desktop application,...
>
> But when the story comes to Acccesing SQL-Server from ISS using either
> ASP
> or ASP.Net The following error:
> "SQL Server does not exist or access denied"
>
> Is this logical, is there a way to overcome, this problem.
> I have tried a looked into many links and previous experments and did
> all
> workarouunds listed on MSISDN, but still the same problem.
>
>
> --
> MCSD not .Net yet :(


Nov 19 '05 #11
Exactly ,
note both of them is on separate network, and each one behind it's firewall.

"Michael C#" wrote:
Let me make sure I understand your issue.

You have two boxes:

Box A has SQL Server,
Box B has ASP.NET apps and IIS

You can reach Box A (SQL Server) from Box B via Enterprise Manager and Query
Analyzer, but not from ASP.NET apps.

Is this correct?
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(


Nov 19 '05 #12
Please check My first response above to Michael C#"

"Kevin Spencer" wrote:
Well, if you're still having problems, post the Connection String.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
To clarify,
Server 1
I have SQL-Server only- Remote server which allows Mixed mode behind the
firewall.

Server 2:
And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
firewall.

Trying to establish connection from 2 to 1.
All connnections success Except ASP.Net/ASP
The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
on
Server1), and other requiered parameters,...

This is may simplyfy the story>

"Kevin Spencer" wrote:
Okay, let's start with terminology. The IIS Server doesn't connect to
anything other than a network. It's an Operating System. Now, what IS
connecting is:

Query Analyzer
Enterprise Manager
VB6 Desktop app

All three of the applications mentioned are executables, which means
that
they run under the machine's System account.

On the other hand, your ASP.Net app runs under a different account.
Chances
are it runs under the default ASP.Net account, which is extremely
underpriveleged.

Okay, now, SQL Server can be connected to in one of 2 different ways:

Windows Authentication
Mixed Windows and SQL Server Authentication

When using Windows Authentication only, only Windows accounts that have
been
granted the necessary database permissions can access the database. When
using Mixed mode, SQL Server accounts can also access the SQL Server,
according to the priveleges that they have been granted IN SQL Server.

So, if you're using Windows Auth only, your connection string should
reflect
that, and the ASP.Net user account must be granted the necessary
permissions.

If you're using Mixed mode, the connection string should contain the name
and password of the SQL Server account that has been granted the
permissions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
> Dear All,
>
> I have tried to access a SQL server DB on on network A from ASP/Or
> ASP.Net
> Application
> Which is hosted on another network domain,
> Both of them are behind the firwall (all consideraation are fixed,..),
> IIS server can connect to SQL-Servers, using:
> SQL-Analyzer or
> Enterprize manager or
> VB6 desktop application hosted on (IIS) server using ADODB or
> VC# Desktop application,...
>
> But when the story comes to Acccesing SQL-Server from ISS using either
> ASP
> or ASP.Net The following error:
> "SQL Server does not exist or access denied"
>
> Is this logical, is there a way to overcome, this problem.
> I have tried a looked into many links and previous experments and did
> all
> workarouunds listed on MSISDN, but still the same problem.
>
>
> --
> MCSD not .Net yet :(


Nov 19 '05 #13
It's definitely your Connection String. See:

http://www.connectionstrings.com/

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
"Driver={SQL
Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
or

"DSN=DSNNAme;UID=sqlLogin;PWD=pppp"

or

"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"

or
"Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme

..
..
..
..
Ther is still many

"Michael C#" wrote:
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
>I have tried all type on connection string listed in the world.
> Including the Connection string used by Database projects on ASP.Net,
> and
> Data envirmennts on VB6, and ODBC and UDL,....
>
>
>
> "CBretana" wrote:
>
>> How are you trying to connect? What's the conenction string? Are you
>> using
>> Integrated Security or SQL Server Secuirity? Can you connect using
>> teh
>> same
>> conenction parameters using Query Analyzer ?
>>
>>
>> "Shaker" wrote:
>>
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are
>> > fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using
>> > either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and
>> > did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(


Nov 19 '05 #14
Try Using this in your code...

Public Function GetConnectionString( ByVal sServer As String, _
ByVal sDatabase As String, ByVal sUserID As String, _
ByVal sPassword As String) As String

' ********** ADO Connection String ************
GetConnectionString = "Data Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=" & sServer & _
";User ID=" & sUserID & _
";Password=" & sPassword & _
";Initial Catalog=" & sDatabase
End Function
' ---------------------------------------------------------

And Pass the <Server Name> in the sServer field...
IS THE SQL Server using port 1433 (the default) ??
Or some other custom Port Number ?
If it's using anything other than 1433, then you have to pass that:
as sServer = "SQLSERVERNetBiosName:nnnn" Where nnnn = port number, or
sServer = "IPADDRESS:nnnn" like "192.168.65.201:1455"
"Shaker" wrote:
Please check My first response above to Michael C#"

"Kevin Spencer" wrote:
Well, if you're still having problems, post the Connection String.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
To clarify,
Server 1
I have SQL-Server only- Remote server which allows Mixed mode behind the
firewall.

Server 2:
And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
firewall.

Trying to establish connection from 2 to 1.
All connnections success Except ASP.Net/ASP
The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
on
Server1), and other requiered parameters,...

This is may simplyfy the story>

"Kevin Spencer" wrote:

> Okay, let's start with terminology. The IIS Server doesn't connect to
> anything other than a network. It's an Operating System. Now, what IS
> connecting is:
>
> Query Analyzer
> Enterprise Manager
> VB6 Desktop app
>
> All three of the applications mentioned are executables, which means
> that
> they run under the machine's System account.
>
> On the other hand, your ASP.Net app runs under a different account.
> Chances
> are it runs under the default ASP.Net account, which is extremely
> underpriveleged.
>
> Okay, now, SQL Server can be connected to in one of 2 different ways:
>
> Windows Authentication
> Mixed Windows and SQL Server Authentication
>
> When using Windows Authentication only, only Windows accounts that have
> been
> granted the necessary database permissions can access the database. When
> using Mixed mode, SQL Server accounts can also access the SQL Server,
> according to the priveleges that they have been granted IN SQL Server.
>
> So, if you're using Windows Auth only, your connection string should
> reflect
> that, and the ASP.Net user account must be granted the necessary
> permissions.
>
> If you're using Mixed mode, the connection string should contain the name
> and password of the SQL Server account that has been granted the
> permissions.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> What You Seek Is What You Get.
>
> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
> news:95**********************************@microsof t.com...
> > Dear All,
> >
> > I have tried to access a SQL server DB on on network A from ASP/Or
> > ASP.Net
> > Application
> > Which is hosted on another network domain,
> > Both of them are behind the firwall (all consideraation are fixed,..),
> > IIS server can connect to SQL-Servers, using:
> > SQL-Analyzer or
> > Enterprize manager or
> > VB6 desktop application hosted on (IIS) server using ADODB or
> > VC# Desktop application,...
> >
> > But when the story comes to Acccesing SQL-Server from ISS using either
> > ASP
> > or ASP.Net The following error:
> > "SQL Server does not exist or access denied"
> >
> > Is this logical, is there a way to overcome, this problem.
> > I have tried a looked into many links and previous experments and did
> > all
> > workarouunds listed on MSISDN, but still the same problem.
> >
> >
> > --
> > MCSD not .Net yet :(
>
>
>


Nov 19 '05 #15
Good lawd. Looks like your connection string from here. Try this one
(OleDb):

"Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"

If you're using Integrated Security, then you need to get rid of User ID=
and Password= and add "Integrated Security=SSPI;". I think you specified
SQL Server security, however.
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
"Driver={SQL
Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
or

"DSN=DSNNAme;UID=sqlLogin;PWD=pppp"

This is for an ODBC-style connection with a DSN set up.
or

"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"

or
"Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme

..
..
..
..
Ther is still many

"Michael C#" wrote:
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
>I have tried all type on connection string listed in the world.
> Including the Connection string used by Database projects on ASP.Net,
> and
> Data envirmennts on VB6, and ODBC and UDL,....
>
>
>
> "CBretana" wrote:
>
>> How are you trying to connect? What's the conenction string? Are you
>> using
>> Integrated Security or SQL Server Secuirity? Can you connect using
>> teh
>> same
>> conenction parameters using Query Analyzer ?
>>
>>
>> "Shaker" wrote:
>>
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are
>> > fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using
>> > either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and
>> > did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(


Nov 19 '05 #16
I wouldn't swear to it, but I think if you have a custom port (other than
1433), it has to be separated from your IP address or server name by a comma
(",") as opposed to a colon (":") in the connection string. I could be
wrong on that though...
as sServer = "SQLSERVERNetBiosName:nnnn" Where nnnn = port number, or
sServer = "IPADDRESS:nnnn" like "192.168.65.201:1455"

Nov 19 '05 #17
I'll try by tommorow,..

"Kevin Spencer" wrote:
It's definitely your Connection String. See:

http://www.connectionstrings.com/

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
"Driver={SQL
Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
or

"DSN=DSNNAme;UID=sqlLogin;PWD=pppp"

or

"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"

or
"Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme

..
..
..
..
Ther is still many

"Michael C#" wrote:
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
>I have tried all type on connection string listed in the world.
> Including the Connection string used by Database projects on ASP.Net,
> and
> Data envirmennts on VB6, and ODBC and UDL,....
>
>
>
> "CBretana" wrote:
>
>> How are you trying to connect? What's the conenction string? Are you
>> using
>> Integrated Security or SQL Server Secuirity? Can you connect using
>> teh
>> same
>> conenction parameters using Query Analyzer ?
>>
>>
>> "Shaker" wrote:
>>
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are
>> > fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using
>> > either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and
>> > did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(


Nov 19 '05 #18
I'll try by tommorow,..

"CBretana" wrote:
Try Using this in your code...

Public Function GetConnectionString( ByVal sServer As String, _
ByVal sDatabase As String, ByVal sUserID As String, _
ByVal sPassword As String) As String

' ********** ADO Connection String ************
GetConnectionString = "Data Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=" & sServer & _
";User ID=" & sUserID & _
";Password=" & sPassword & _
";Initial Catalog=" & sDatabase
End Function
' ---------------------------------------------------------

And Pass the <Server Name> in the sServer field...
IS THE SQL Server using port 1433 (the default) ??
Or some other custom Port Number ?
If it's using anything other than 1433, then you have to pass that:
as sServer = "SQLSERVERNetBiosName:nnnn" Where nnnn = port number, or
sServer = "IPADDRESS:nnnn" like "192.168.65.201:1455"
"Shaker" wrote:
Please check My first response above to Michael C#"

"Kevin Spencer" wrote:
Well, if you're still having problems, post the Connection String.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
> To clarify,
> Server 1
> I have SQL-Server only- Remote server which allows Mixed mode behind the
> firewall.
>
> Server 2:
> And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
> firewall.
>
> Trying to establish connection from 2 to 1.
> All connnections success Except ASP.Net/ASP
> The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
> on
> Server1), and other requiered parameters,...
>
> This is may simplyfy the story>
>
> "Kevin Spencer" wrote:
>
>> Okay, let's start with terminology. The IIS Server doesn't connect to
>> anything other than a network. It's an Operating System. Now, what IS
>> connecting is:
>>
>> Query Analyzer
>> Enterprise Manager
>> VB6 Desktop app
>>
>> All three of the applications mentioned are executables, which means
>> that
>> they run under the machine's System account.
>>
>> On the other hand, your ASP.Net app runs under a different account.
>> Chances
>> are it runs under the default ASP.Net account, which is extremely
>> underpriveleged.
>>
>> Okay, now, SQL Server can be connected to in one of 2 different ways:
>>
>> Windows Authentication
>> Mixed Windows and SQL Server Authentication
>>
>> When using Windows Authentication only, only Windows accounts that have
>> been
>> granted the necessary database permissions can access the database. When
>> using Mixed mode, SQL Server accounts can also access the SQL Server,
>> according to the priveleges that they have been granted IN SQL Server.
>>
>> So, if you're using Windows Auth only, your connection string should
>> reflect
>> that, and the ASP.Net user account must be granted the necessary
>> permissions.
>>
>> If you're using Mixed mode, the connection string should contain the name
>> and password of the SQL Server account that has been granted the
>> permissions.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> ..Net Developer
>> What You Seek Is What You Get.
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:95**********************************@microsof t.com...
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(
>>
>>
>>

Nov 19 '05 #19
Shaker,

I have my old ADO 2.7 reference book, and it does npt explicitly mention
the correct syntax for adding (non-Default) port number, so Michael C# could
be right...
If this IS your situation, try it with both the colon <:>, AND wit hthe
comma <,> , One of those should definitely work...

"Shaker" wrote:
I'll try by tommorow,..

"CBretana" wrote:
Try Using this in your code...

Public Function GetConnectionString( ByVal sServer As String, _
ByVal sDatabase As String, ByVal sUserID As String, _
ByVal sPassword As String) As String

' ********** ADO Connection String ************
GetConnectionString = "Data Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=" & sServer & _
";User ID=" & sUserID & _
";Password=" & sPassword & _
";Initial Catalog=" & sDatabase
End Function
' ---------------------------------------------------------

And Pass the <Server Name> in the sServer field...
IS THE SQL Server using port 1433 (the default) ??
Or some other custom Port Number ?
If it's using anything other than 1433, then you have to pass that:
as sServer = "SQLSERVERNetBiosName:nnnn" Where nnnn = port number, or
sServer = "IPADDRESS:nnnn" like "192.168.65.201:1455"
"Shaker" wrote:
Please check My first response above to Michael C#"

"Kevin Spencer" wrote:

> Well, if you're still having problems, post the Connection String.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> What You Seek Is What You Get.
>
> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
> news:C5**********************************@microsof t.com...
> > To clarify,
> > Server 1
> > I have SQL-Server only- Remote server which allows Mixed mode behind the
> > firewall.
> >
> > Server 2:
> > And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
> > firewall.
> >
> > Trying to establish connection from 2 to 1.
> > All connnections success Except ASP.Net/ASP
> > The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
> > on
> > Server1), and other requiered parameters,...
> >
> > This is may simplyfy the story>
> >
> > "Kevin Spencer" wrote:
> >
> >> Okay, let's start with terminology. The IIS Server doesn't connect to
> >> anything other than a network. It's an Operating System. Now, what IS
> >> connecting is:
> >>
> >> Query Analyzer
> >> Enterprise Manager
> >> VB6 Desktop app
> >>
> >> All three of the applications mentioned are executables, which means
> >> that
> >> they run under the machine's System account.
> >>
> >> On the other hand, your ASP.Net app runs under a different account.
> >> Chances
> >> are it runs under the default ASP.Net account, which is extremely
> >> underpriveleged.
> >>
> >> Okay, now, SQL Server can be connected to in one of 2 different ways:
> >>
> >> Windows Authentication
> >> Mixed Windows and SQL Server Authentication
> >>
> >> When using Windows Authentication only, only Windows accounts that have
> >> been
> >> granted the necessary database permissions can access the database. When
> >> using Mixed mode, SQL Server accounts can also access the SQL Server,
> >> according to the priveleges that they have been granted IN SQL Server.
> >>
> >> So, if you're using Windows Auth only, your connection string should
> >> reflect
> >> that, and the ASP.Net user account must be granted the necessary
> >> permissions.
> >>
> >> If you're using Mixed mode, the connection string should contain the name
> >> and password of the SQL Server account that has been granted the
> >> permissions.
> >>
> >> --
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft MVP
> >> ..Net Developer
> >> What You Seek Is What You Get.
> >>
> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
> >> news:95**********************************@microsof t.com...
> >> > Dear All,
> >> >
> >> > I have tried to access a SQL server DB on on network A from ASP/Or
> >> > ASP.Net
> >> > Application
> >> > Which is hosted on another network domain,
> >> > Both of them are behind the firwall (all consideraation are fixed,..),
> >> > IIS server can connect to SQL-Servers, using:
> >> > SQL-Analyzer or
> >> > Enterprize manager or
> >> > VB6 desktop application hosted on (IIS) server using ADODB or
> >> > VC# Desktop application,...
> >> >
> >> > But when the story comes to Acccesing SQL-Server from ISS using either
> >> > ASP
> >> > or ASP.Net The following error:
> >> > "SQL Server does not exist or access denied"
> >> >
> >> > Is this logical, is there a way to overcome, this problem.
> >> > I have tried a looked into many links and previous experments and did
> >> > all
> >> > workarouunds listed on MSISDN, but still the same problem.
> >> >
> >> >
> >> > --
> >> > MCSD not .Net yet :(
> >>
> >>
> >>
>
>
>

Nov 19 '05 #20
Same problem,

"Michael C#" wrote:
Good lawd. Looks like your connection string from here. Try this one
(OleDb):

"Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"

If you're using Integrated Security, then you need to get rid of User ID=
and Password= and add "Integrated Security=SSPI;". I think you specified
SQL Server security, however.
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
"Driver={SQL
Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
or

"DSN=DSNNAme;UID=sqlLogin;PWD=pppp"


This is for an ODBC-style connection with a DSN set up.
or

"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"

or
"Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme

..
..
..
..
Ther is still many

"Michael C#" wrote:
Post your connection string.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
>I have tried all type on connection string listed in the world.
> Including the Connection string used by Database projects on ASP.Net,
> and
> Data envirmennts on VB6, and ODBC and UDL,....
>
>
>
> "CBretana" wrote:
>
>> How are you trying to connect? What's the conenction string? Are you
>> using
>> Integrated Security or SQL Server Secuirity? Can you connect using
>> teh
>> same
>> conenction parameters using Query Analyzer ?
>>
>>
>> "Shaker" wrote:
>>
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are
>> > fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using
>> > either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and
>> > did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(


Nov 19 '05 #21
I have tried, But still the same problem

"CBretana" wrote:
Try Using this in your code...

Public Function GetConnectionString( ByVal sServer As String, _
ByVal sDatabase As String, ByVal sUserID As String, _
ByVal sPassword As String) As String

' ********** ADO Connection String ************
GetConnectionString = "Data Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=" & sServer & _
";User ID=" & sUserID & _
";Password=" & sPassword & _
";Initial Catalog=" & sDatabase
End Function
' ---------------------------------------------------------

And Pass the <Server Name> in the sServer field...
IS THE SQL Server using port 1433 (the default) ??
Or some other custom Port Number ?
If it's using anything other than 1433, then you have to pass that:
as sServer = "SQLSERVERNetBiosName:nnnn" Where nnnn = port number, or
sServer = "IPADDRESS:nnnn" like "192.168.65.201:1455"
"Shaker" wrote:
Please check My first response above to Michael C#"

"Kevin Spencer" wrote:
Well, if you're still having problems, post the Connection String.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
> To clarify,
> Server 1
> I have SQL-Server only- Remote server which allows Mixed mode behind the
> firewall.
>
> Server 2:
> And IIS + SQL server,... query analyzer, VB 6, ,... All begined th
> firewall.
>
> Trying to establish connection from 2 to 1.
> All connnections success Except ASP.Net/ASP
> The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User
> on
> Server1), and other requiered parameters,...
>
> This is may simplyfy the story>
>
> "Kevin Spencer" wrote:
>
>> Okay, let's start with terminology. The IIS Server doesn't connect to
>> anything other than a network. It's an Operating System. Now, what IS
>> connecting is:
>>
>> Query Analyzer
>> Enterprise Manager
>> VB6 Desktop app
>>
>> All three of the applications mentioned are executables, which means
>> that
>> they run under the machine's System account.
>>
>> On the other hand, your ASP.Net app runs under a different account.
>> Chances
>> are it runs under the default ASP.Net account, which is extremely
>> underpriveleged.
>>
>> Okay, now, SQL Server can be connected to in one of 2 different ways:
>>
>> Windows Authentication
>> Mixed Windows and SQL Server Authentication
>>
>> When using Windows Authentication only, only Windows accounts that have
>> been
>> granted the necessary database permissions can access the database. When
>> using Mixed mode, SQL Server accounts can also access the SQL Server,
>> according to the priveleges that they have been granted IN SQL Server.
>>
>> So, if you're using Windows Auth only, your connection string should
>> reflect
>> that, and the ASP.Net user account must be granted the necessary
>> permissions.
>>
>> If you're using Mixed mode, the connection string should contain the name
>> and password of the SQL Server account that has been granted the
>> permissions.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> ..Net Developer
>> What You Seek Is What You Get.
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:95**********************************@microsof t.com...
>> > Dear All,
>> >
>> > I have tried to access a SQL server DB on on network A from ASP/Or
>> > ASP.Net
>> > Application
>> > Which is hosted on another network domain,
>> > Both of them are behind the firwall (all consideraation are fixed,..),
>> > IIS server can connect to SQL-Servers, using:
>> > SQL-Analyzer or
>> > Enterprize manager or
>> > VB6 desktop application hosted on (IIS) server using ADODB or
>> > VC# Desktop application,...
>> >
>> > But when the story comes to Acccesing SQL-Server from ISS using either
>> > ASP
>> > or ASP.Net The following error:
>> > "SQL Server does not exist or access denied"
>> >
>> > Is this logical, is there a way to overcome, this problem.
>> > I have tried a looked into many links and previous experments and did
>> > all
>> > workarouunds listed on MSISDN, but still the same problem.
>> >
>> >
>> > --
>> > MCSD not .Net yet :(
>>
>>
>>

Nov 19 '05 #22
And you have established physical connectivity from Box B to Box A, and vice
versa? You can pull up SQL Server for Box B in Enterprise Manager on Box A?

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
Same problem,

"Michael C#" wrote:
Good lawd. Looks like your connection string from here. Try this one
(OleDb):

"Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"

If you're using Integrated Security, then you need to get rid of User ID=
and Password= and add "Integrated Security=SSPI;". I think you specified
SQL Server security, however.
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
> "Driver={SQL
> Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
> or
>
> "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>


This is for an ODBC-style connection with a DSN set up.
> or
>
> "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>
> or
> "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
> ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>
> ..
> ..
> ..
> ..
> Ther is still many
>
> "Michael C#" wrote:
>
>> Post your connection string.
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:29**********************************@microsof t.com...
>> >I have tried all type on connection string listed in the world.
>> > Including the Connection string used by Database projects on
>> > ASP.Net,
>> > and
>> > Data envirmennts on VB6, and ODBC and UDL,....
>> >
>> >
>> >
>> > "CBretana" wrote:
>> >
>> >> How are you trying to connect? What's the conenction string? Are
>> >> you
>> >> using
>> >> Integrated Security or SQL Server Secuirity? Can you connect using
>> >> teh
>> >> same
>> >> conenction parameters using Query Analyzer ?
>> >>
>> >>
>> >> "Shaker" wrote:
>> >>
>> >> > Dear All,
>> >> >
>> >> > I have tried to access a SQL server DB on on network A from
>> >> > ASP/Or
>> >> > ASP.Net
>> >> > Application
>> >> > Which is hosted on another network domain,
>> >> > Both of them are behind the firwall (all consideraation are
>> >> > fixed,..),
>> >> > IIS server can connect to SQL-Servers, using:
>> >> > SQL-Analyzer or
>> >> > Enterprize manager or
>> >> > VB6 desktop application hosted on (IIS) server using ADODB or
>> >> > VC# Desktop application,...
>> >> >
>> >> > But when the story comes to Acccesing SQL-Server from ISS using
>> >> > either
>> >> > ASP
>> >> > or ASP.Net The following error:
>> >> > "SQL Server does not exist or access denied"
>> >> >
>> >> > Is this logical, is there a way to overcome, this problem.
>> >> > I have tried a looked into many links and previous experments and
>> >> > did
>> >> > all
>> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >
>> >> >
>> >> > --
>> >> > MCSD not .Net yet :(
>>
>>
>>


Nov 19 '05 #23
Yes,

but note that Box B also has SQL-Server installed and IIS.

"Michael C#" wrote:
And you have established physical connectivity from Box B to Box A, and vice
versa? You can pull up SQL Server for Box B in Enterprise Manager on Box A?

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
Same problem,

"Michael C#" wrote:
Good lawd. Looks like your connection string from here. Try this one
(OleDb):

"Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"

If you're using Integrated Security, then you need to get rid of User ID=
and Password= and add "Integrated Security=SSPI;". I think you specified
SQL Server security, however.
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
> "Driver={SQL
> Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
> or
>
> "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>

This is for an ODBC-style connection with a DSN set up.

> or
>
> "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>
> or
> "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
> ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>
> ..
> ..
> ..
> ..
> Ther is still many
>
> "Michael C#" wrote:
>
>> Post your connection string.
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:29**********************************@microsof t.com...
>> >I have tried all type on connection string listed in the world.
>> > Including the Connection string used by Database projects on
>> > ASP.Net,
>> > and
>> > Data envirmennts on VB6, and ODBC and UDL,....
>> >
>> >
>> >
>> > "CBretana" wrote:
>> >
>> >> How are you trying to connect? What's the conenction string? Are
>> >> you
>> >> using
>> >> Integrated Security or SQL Server Secuirity? Can you connect using
>> >> teh
>> >> same
>> >> conenction parameters using Query Analyzer ?
>> >>
>> >>
>> >> "Shaker" wrote:
>> >>
>> >> > Dear All,
>> >> >
>> >> > I have tried to access a SQL server DB on on network A from
>> >> > ASP/Or
>> >> > ASP.Net
>> >> > Application
>> >> > Which is hosted on another network domain,
>> >> > Both of them are behind the firwall (all consideraation are
>> >> > fixed,..),
>> >> > IIS server can connect to SQL-Servers, using:
>> >> > SQL-Analyzer or
>> >> > Enterprize manager or
>> >> > VB6 desktop application hosted on (IIS) server using ADODB or
>> >> > VC# Desktop application,...
>> >> >
>> >> > But when the story comes to Acccesing SQL-Server from ISS using
>> >> > either
>> >> > ASP
>> >> > or ASP.Net The following error:
>> >> > "SQL Server does not exist or access denied"
>> >> >
>> >> > Is this logical, is there a way to overcome, this problem.
>> >> > I have tried a looked into many links and previous experments and
>> >> > did
>> >> > all
>> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >
>> >> >
>> >> > --
>> >> > MCSD not .Net yet :(
>>
>>
>>


Nov 19 '05 #24
That's all well and good, I just want to establish physical connectivity.
So, when you registered Box B with EM on Box A, what format did you use to
register the server? Did you register it using IP address,port or by name,
or what? My point here is are you sure you have the correct Port number?
Maybe you should try the default port of 1433? Or check Box B's Server
Network Utility and verify that you do indeed have the correct Port #.

Thanks

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
Yes,

but note that Box B also has SQL-Server installed and IIS.

"Michael C#" wrote:
And you have established physical connectivity from Box B to Box A, and
vice
versa? You can pull up SQL Server for Box B in Enterprise Manager on Box
A?

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
> Same problem,
>
> "Michael C#" wrote:
>
>> Good lawd. Looks like your connection string from here. Try this one
>> (OleDb):
>>
>> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>>
>> If you're using Integrated Security, then you need to get rid of User
>> ID=
>> and Password= and add "Integrated Security=SSPI;". I think you
>> specified
>> SQL Server security, however.
>>
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:00**********************************@microsof t.com...
>> > "Driver={SQL
>> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> > or
>> >
>> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >
>>
>> This is for an ODBC-style connection with a DSN set up.
>>
>> > or
>> >
>> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >
>> > or
>> > "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
>> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >
>> > ..
>> > ..
>> > ..
>> > ..
>> > Ther is still many
>> >
>> > "Michael C#" wrote:
>> >
>> >> Post your connection string.
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:29**********************************@microsof t.com...
>> >> >I have tried all type on connection string listed in the world.
>> >> > Including the Connection string used by Database projects on
>> >> > ASP.Net,
>> >> > and
>> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >
>> >> >
>> >> >
>> >> > "CBretana" wrote:
>> >> >
>> >> >> How are you trying to connect? What's the conenction string?
>> >> >> Are
>> >> >> you
>> >> >> using
>> >> >> Integrated Security or SQL Server Secuirity? Can you connect
>> >> >> using
>> >> >> teh
>> >> >> same
>> >> >> conenction parameters using Query Analyzer ?
>> >> >>
>> >> >>
>> >> >> "Shaker" wrote:
>> >> >>
>> >> >> > Dear All,
>> >> >> >
>> >> >> > I have tried to access a SQL server DB on on network A from
>> >> >> > ASP/Or
>> >> >> > ASP.Net
>> >> >> > Application
>> >> >> > Which is hosted on another network domain,
>> >> >> > Both of them are behind the firwall (all consideraation are
>> >> >> > fixed,..),
>> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> > SQL-Analyzer or
>> >> >> > Enterprize manager or
>> >> >> > VB6 desktop application hosted on (IIS) server using ADODB or
>> >> >> > VC# Desktop application,...
>> >> >> >
>> >> >> > But when the story comes to Acccesing SQL-Server from ISS
>> >> >> > using
>> >> >> > either
>> >> >> > ASP
>> >> >> > or ASP.Net The following error:
>> >> >> > "SQL Server does not exist or access denied"
>> >> >> >
>> >> >> > Is this logical, is there a way to overcome, this problem.
>> >> >> > I have tried a looked into many links and previous experments
>> >> >> > and
>> >> >> > did
>> >> >> > all
>> >> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > MCSD not .Net yet :(
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #25
The SQL server On A is far away from my side(phisically).
It is registered by name,..
It is using a differant porta other than the 1433, which is given a proper
access on Box A firewal..

On Box B (Which is not necessary) The SQL server &client network utility,
are also set to use the same Port as on Server A.

Please note,
That the SQL server On A is having it's own Many DB, already in use since
long time,...
And all of my need is to access One table on one DB,... Which is given to a
certain SQL Login User.

Do you think that this SQL-User should have an access to Master DB on Box A?

"Michael C#" wrote:
That's all well and good, I just want to establish physical connectivity.
So, when you registered Box B with EM on Box A, what format did you use to
register the server? Did you register it using IP address,port or by name,
or what? My point here is are you sure you have the correct Port number?
Maybe you should try the default port of 1433? Or check Box B's Server
Network Utility and verify that you do indeed have the correct Port #.

Thanks

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
Yes,

but note that Box B also has SQL-Server installed and IIS.

"Michael C#" wrote:
And you have established physical connectivity from Box B to Box A, and
vice
versa? You can pull up SQL Server for Box B in Enterprise Manager on Box
A?

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
> Same problem,
>
> "Michael C#" wrote:
>
>> Good lawd. Looks like your connection string from here. Try this one
>> (OleDb):
>>
>> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>>
>> If you're using Integrated Security, then you need to get rid of User
>> ID=
>> and Password= and add "Integrated Security=SSPI;". I think you
>> specified
>> SQL Server security, however.
>>
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:00**********************************@microsof t.com...
>> > "Driver={SQL
>> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> > or
>> >
>> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >
>>
>> This is for an ODBC-style connection with a DSN set up.
>>
>> > or
>> >
>> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >
>> > or
>> > "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
>> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >
>> > ..
>> > ..
>> > ..
>> > ..
>> > Ther is still many
>> >
>> > "Michael C#" wrote:
>> >
>> >> Post your connection string.
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:29**********************************@microsof t.com...
>> >> >I have tried all type on connection string listed in the world.
>> >> > Including the Connection string used by Database projects on
>> >> > ASP.Net,
>> >> > and
>> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >
>> >> >
>> >> >
>> >> > "CBretana" wrote:
>> >> >
>> >> >> How are you trying to connect? What's the conenction string?
>> >> >> Are
>> >> >> you
>> >> >> using
>> >> >> Integrated Security or SQL Server Secuirity? Can you connect
>> >> >> using
>> >> >> teh
>> >> >> same
>> >> >> conenction parameters using Query Analyzer ?
>> >> >>
>> >> >>
>> >> >> "Shaker" wrote:
>> >> >>
>> >> >> > Dear All,
>> >> >> >
>> >> >> > I have tried to access a SQL server DB on on network A from
>> >> >> > ASP/Or
>> >> >> > ASP.Net
>> >> >> > Application
>> >> >> > Which is hosted on another network domain,
>> >> >> > Both of them are behind the firwall (all consideraation are
>> >> >> > fixed,..),
>> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> > SQL-Analyzer or
>> >> >> > Enterprize manager or
>> >> >> > VB6 desktop application hosted on (IIS) server using ADODB or
>> >> >> > VC# Desktop application,...
>> >> >> >
>> >> >> > But when the story comes to Acccesing SQL-Server from ISS
>> >> >> > using
>> >> >> > either
>> >> >> > ASP
>> >> >> > or ASP.Net The following error:
>> >> >> > "SQL Server does not exist or access denied"
>> >> >> >
>> >> >> > Is this logical, is there a way to overcome, this problem.
>> >> >> > I have tried a looked into many links and previous experments
>> >> >> > and
>> >> >> > did
>> >> >> > all
>> >> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > MCSD not .Net yet :(
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #26
That depends on exactly what that user needs to do...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
The SQL server On A is far away from my side(phisically).
It is registered by name,..
It is using a differant porta other than the 1433, which is given a proper
access on Box A firewal..

On Box B (Which is not necessary) The SQL server &client network utility,
are also set to use the same Port as on Server A.

Please note,
That the SQL server On A is having it's own Many DB, already in use since
long time,...
And all of my need is to access One table on one DB,... Which is given to
a
certain SQL Login User.

Do you think that this SQL-User should have an access to Master DB on Box
A?

"Michael C#" wrote:
That's all well and good, I just want to establish physical connectivity.
So, when you registered Box B with EM on Box A, what format did you use
to
register the server? Did you register it using IP address,port or by
name,
or what? My point here is are you sure you have the correct Port number?
Maybe you should try the default port of 1433? Or check Box B's Server
Network Utility and verify that you do indeed have the correct Port #.

Thanks

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
> Yes,
>
> but note that Box B also has SQL-Server installed and IIS.
>
>
>
> "Michael C#" wrote:
>
>> And you have established physical connectivity from Box B to Box A,
>> and
>> vice
>> versa? You can pull up SQL Server for Box B in Enterprise Manager on
>> Box
>> A?
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:08**********************************@microsof t.com...
>> > Same problem,
>> >
>> > "Michael C#" wrote:
>> >
>> >> Good lawd. Looks like your connection string from here. Try this
>> >> one
>> >> (OleDb):
>> >>
>> >> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> >> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>> >>
>> >> If you're using Integrated Security, then you need to get rid of
>> >> User
>> >> ID=
>> >> and Password= and add "Integrated Security=SSPI;". I think you
>> >> specified
>> >> SQL Server security, however.
>> >>
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:00**********************************@microsof t.com...
>> >> > "Driver={SQL
>> >> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> >> > or
>> >> >
>> >> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >> >
>> >>
>> >> This is for an ODBC-style connection with a DSN set up.
>> >>
>> >> > or
>> >> >
>> >> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> >> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >> >
>> >> > or
>> >> > "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
>> >> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >> >
>> >> > ..
>> >> > ..
>> >> > ..
>> >> > ..
>> >> > Ther is still many
>> >> >
>> >> > "Michael C#" wrote:
>> >> >
>> >> >> Post your connection string.
>> >> >>
>> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> news:29**********************************@microsof t.com...
>> >> >> >I have tried all type on connection string listed in the world.
>> >> >> > Including the Connection string used by Database projects on
>> >> >> > ASP.Net,
>> >> >> > and
>> >> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "CBretana" wrote:
>> >> >> >
>> >> >> >> How are you trying to connect? What's the conenction string?
>> >> >> >> Are
>> >> >> >> you
>> >> >> >> using
>> >> >> >> Integrated Security or SQL Server Secuirity? Can you connect
>> >> >> >> using
>> >> >> >> teh
>> >> >> >> same
>> >> >> >> conenction parameters using Query Analyzer ?
>> >> >> >>
>> >> >> >>
>> >> >> >> "Shaker" wrote:
>> >> >> >>
>> >> >> >> > Dear All,
>> >> >> >> >
>> >> >> >> > I have tried to access a SQL server DB on on network A from
>> >> >> >> > ASP/Or
>> >> >> >> > ASP.Net
>> >> >> >> > Application
>> >> >> >> > Which is hosted on another network domain,
>> >> >> >> > Both of them are behind the firwall (all consideraation are
>> >> >> >> > fixed,..),
>> >> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> >> > SQL-Analyzer or
>> >> >> >> > Enterprize manager or
>> >> >> >> > VB6 desktop application hosted on (IIS) server using ADODB
>> >> >> >> > or
>> >> >> >> > VC# Desktop application,...
>> >> >> >> >
>> >> >> >> > But when the story comes to Acccesing SQL-Server from ISS
>> >> >> >> > using
>> >> >> >> > either
>> >> >> >> > ASP
>> >> >> >> > or ASP.Net The following error:
>> >> >> >> > "SQL Server does not exist or access denied"
>> >> >> >> >
>> >> >> >> > Is this logical, is there a way to overcome, this problem.
>> >> >> >> > I have tried a looked into many links and previous
>> >> >> >> > experments
>> >> >> >> > and
>> >> >> >> > did
>> >> >> >> > all
>> >> >> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > MCSD not .Net yet :(
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #27
This user is a db owner on the required DB only.

"Michael C#" wrote:
That depends on exactly what that user needs to do...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
The SQL server On A is far away from my side(phisically).
It is registered by name,..
It is using a differant porta other than the 1433, which is given a proper
access on Box A firewal..

On Box B (Which is not necessary) The SQL server &client network utility,
are also set to use the same Port as on Server A.

Please note,
That the SQL server On A is having it's own Many DB, already in use since
long time,...
And all of my need is to access One table on one DB,... Which is given to
a
certain SQL Login User.

Do you think that this SQL-User should have an access to Master DB on Box
A?

"Michael C#" wrote:
That's all well and good, I just want to establish physical connectivity.
So, when you registered Box B with EM on Box A, what format did you use
to
register the server? Did you register it using IP address,port or by
name,
or what? My point here is are you sure you have the correct Port number?
Maybe you should try the default port of 1433? Or check Box B's Server
Network Utility and verify that you do indeed have the correct Port #.

Thanks

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
> Yes,
>
> but note that Box B also has SQL-Server installed and IIS.
>
>
>
> "Michael C#" wrote:
>
>> And you have established physical connectivity from Box B to Box A,
>> and
>> vice
>> versa? You can pull up SQL Server for Box B in Enterprise Manager on
>> Box
>> A?
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:08**********************************@microsof t.com...
>> > Same problem,
>> >
>> > "Michael C#" wrote:
>> >
>> >> Good lawd. Looks like your connection string from here. Try this
>> >> one
>> >> (OleDb):
>> >>
>> >> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> >> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>> >>
>> >> If you're using Integrated Security, then you need to get rid of
>> >> User
>> >> ID=
>> >> and Password= and add "Integrated Security=SSPI;". I think you
>> >> specified
>> >> SQL Server security, however.
>> >>
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:00**********************************@microsof t.com...
>> >> > "Driver={SQL
>> >> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> >> > or
>> >> >
>> >> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >> >
>> >>
>> >> This is for an ODBC-style connection with a DSN set up.
>> >>
>> >> > or
>> >> >
>> >> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> >> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >> >
>> >> > or
>> >> > "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User
>> >> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >> >
>> >> > ..
>> >> > ..
>> >> > ..
>> >> > ..
>> >> > Ther is still many
>> >> >
>> >> > "Michael C#" wrote:
>> >> >
>> >> >> Post your connection string.
>> >> >>
>> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> news:29**********************************@microsof t.com...
>> >> >> >I have tried all type on connection string listed in the world.
>> >> >> > Including the Connection string used by Database projects on
>> >> >> > ASP.Net,
>> >> >> > and
>> >> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "CBretana" wrote:
>> >> >> >
>> >> >> >> How are you trying to connect? What's the conenction string?
>> >> >> >> Are
>> >> >> >> you
>> >> >> >> using
>> >> >> >> Integrated Security or SQL Server Secuirity? Can you connect
>> >> >> >> using
>> >> >> >> teh
>> >> >> >> same
>> >> >> >> conenction parameters using Query Analyzer ?
>> >> >> >>
>> >> >> >>
>> >> >> >> "Shaker" wrote:
>> >> >> >>
>> >> >> >> > Dear All,
>> >> >> >> >
>> >> >> >> > I have tried to access a SQL server DB on on network A from
>> >> >> >> > ASP/Or
>> >> >> >> > ASP.Net
>> >> >> >> > Application
>> >> >> >> > Which is hosted on another network domain,
>> >> >> >> > Both of them are behind the firwall (all consideraation are
>> >> >> >> > fixed,..),
>> >> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> >> > SQL-Analyzer or
>> >> >> >> > Enterprize manager or
>> >> >> >> > VB6 desktop application hosted on (IIS) server using ADODB
>> >> >> >> > or
>> >> >> >> > VC# Desktop application,...
>> >> >> >> >
>> >> >> >> > But when the story comes to Acccesing SQL-Server from ISS
>> >> >> >> > using
>> >> >> >> > either
>> >> >> >> > ASP
>> >> >> >> > or ASP.Net The following error:
>> >> >> >> > "SQL Server does not exist or access denied"
>> >> >> >> >
>> >> >> >> > Is this logical, is there a way to overcome, this problem.
>> >> >> >> > I have tried a looked into many links and previous
>> >> >> >> > experments
>> >> >> >> > and
>> >> >> >> > did
>> >> >> >> > all
>> >> >> >> > workarouunds listed on MSISDN, but still the same problem.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > MCSD not .Net yet :(
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #28
Then my first stab at it would be no. Unless they have to access extended
stored procedures or something else in the master ...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
This user is a db owner on the required DB only.

"Michael C#" wrote:
That depends on exactly what that user needs to do...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
> The SQL server On A is far away from my side(phisically).
> It is registered by name,..
> It is using a differant porta other than the 1433, which is given a
> proper
> access on Box A firewal..
>
> On Box B (Which is not necessary) The SQL server &client network
> utility,
> are also set to use the same Port as on Server A.
>
> Please note,
> That the SQL server On A is having it's own Many DB, already in use
> since
> long time,...
> And all of my need is to access One table on one DB,... Which is given
> to
> a
> certain SQL Login User.
>
> Do you think that this SQL-User should have an access to Master DB on
> Box
> A?
>
>
>
> "Michael C#" wrote:
>
>> That's all well and good, I just want to establish physical
>> connectivity.
>> So, when you registered Box B with EM on Box A, what format did you
>> use
>> to
>> register the server? Did you register it using IP address,port or by
>> name,
>> or what? My point here is are you sure you have the correct Port
>> number?
>> Maybe you should try the default port of 1433? Or check Box B's
>> Server
>> Network Utility and verify that you do indeed have the correct Port #.
>>
>> Thanks
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:D7**********************************@microsof t.com...
>> > Yes,
>> >
>> > but note that Box B also has SQL-Server installed and IIS.
>> >
>> >
>> >
>> > "Michael C#" wrote:
>> >
>> >> And you have established physical connectivity from Box B to Box A,
>> >> and
>> >> vice
>> >> versa? You can pull up SQL Server for Box B in Enterprise Manager
>> >> on
>> >> Box
>> >> A?
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:08**********************************@microsof t.com...
>> >> > Same problem,
>> >> >
>> >> > "Michael C#" wrote:
>> >> >
>> >> >> Good lawd. Looks like your connection string from here. Try
>> >> >> this
>> >> >> one
>> >> >> (OleDb):
>> >> >>
>> >> >> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> >> >> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>> >> >>
>> >> >> If you're using Integrated Security, then you need to get rid of
>> >> >> User
>> >> >> ID=
>> >> >> and Password= and add "Integrated Security=SSPI;". I think you
>> >> >> specified
>> >> >> SQL Server security, however.
>> >> >>
>> >> >>
>> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> news:00**********************************@microsof t.com...
>> >> >> > "Driver={SQL
>> >> >> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> >> >> > or
>> >> >> >
>> >> >> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >> >> >
>> >> >>
>> >> >> This is for an ODBC-style connection with a DSN set up.
>> >> >>
>> >> >> > or
>> >> >> >
>> >> >> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> >> >> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >> >> >
>> >> >> > or
>> >> >> > "Provider=MSDASQL.1;Password=ppp;Persist Security
>> >> >> > Info=True;User
>> >> >> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >> >> >
>> >> >> > ..
>> >> >> > ..
>> >> >> > ..
>> >> >> > ..
>> >> >> > Ther is still many
>> >> >> >
>> >> >> > "Michael C#" wrote:
>> >> >> >
>> >> >> >> Post your connection string.
>> >> >> >>
>> >> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> >> news:29**********************************@microsof t.com...
>> >> >> >> >I have tried all type on connection string listed in the
>> >> >> >> >world.
>> >> >> >> > Including the Connection string used by Database projects
>> >> >> >> > on
>> >> >> >> > ASP.Net,
>> >> >> >> > and
>> >> >> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "CBretana" wrote:
>> >> >> >> >
>> >> >> >> >> How are you trying to connect? What's the conenction
>> >> >> >> >> string?
>> >> >> >> >> Are
>> >> >> >> >> you
>> >> >> >> >> using
>> >> >> >> >> Integrated Security or SQL Server Secuirity? Can you
>> >> >> >> >> connect
>> >> >> >> >> using
>> >> >> >> >> teh
>> >> >> >> >> same
>> >> >> >> >> conenction parameters using Query Analyzer ?
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "Shaker" wrote:
>> >> >> >> >>
>> >> >> >> >> > Dear All,
>> >> >> >> >> >
>> >> >> >> >> > I have tried to access a SQL server DB on on network A
>> >> >> >> >> > from
>> >> >> >> >> > ASP/Or
>> >> >> >> >> > ASP.Net
>> >> >> >> >> > Application
>> >> >> >> >> > Which is hosted on another network domain,
>> >> >> >> >> > Both of them are behind the firwall (all consideraation
>> >> >> >> >> > are
>> >> >> >> >> > fixed,..),
>> >> >> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> >> >> > SQL-Analyzer or
>> >> >> >> >> > Enterprize manager or
>> >> >> >> >> > VB6 desktop application hosted on (IIS) server using
>> >> >> >> >> > ADODB
>> >> >> >> >> > or
>> >> >> >> >> > VC# Desktop application,...
>> >> >> >> >> >
>> >> >> >> >> > But when the story comes to Acccesing SQL-Server from
>> >> >> >> >> > ISS
>> >> >> >> >> > using
>> >> >> >> >> > either
>> >> >> >> >> > ASP
>> >> >> >> >> > or ASP.Net The following error:
>> >> >> >> >> > "SQL Server does not exist or access denied"
>> >> >> >> >> >
>> >> >> >> >> > Is this logical, is there a way to overcome, this
>> >> >> >> >> > problem.
>> >> >> >> >> > I have tried a looked into many links and previous
>> >> >> >> >> > experments
>> >> >> >> >> > and
>> >> >> >> >> > did
>> >> >> >> >> > all
>> >> >> >> >> > workarouunds listed on MSISDN, but still the same
>> >> >> >> >> > problem.
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > --
>> >> >> >> >> > MCSD not .Net yet :(
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #29
Did we reached to a closed road?

"Michael C#" wrote:
Then my first stab at it would be no. Unless they have to access extended
stored procedures or something else in the master ...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
This user is a db owner on the required DB only.

"Michael C#" wrote:
That depends on exactly what that user needs to do...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
> The SQL server On A is far away from my side(phisically).
> It is registered by name,..
> It is using a differant porta other than the 1433, which is given a
> proper
> access on Box A firewal..
>
> On Box B (Which is not necessary) The SQL server &client network
> utility,
> are also set to use the same Port as on Server A.
>
> Please note,
> That the SQL server On A is having it's own Many DB, already in use
> since
> long time,...
> And all of my need is to access One table on one DB,... Which is given
> to
> a
> certain SQL Login User.
>
> Do you think that this SQL-User should have an access to Master DB on
> Box
> A?
>
>
>
> "Michael C#" wrote:
>
>> That's all well and good, I just want to establish physical
>> connectivity.
>> So, when you registered Box B with EM on Box A, what format did you
>> use
>> to
>> register the server? Did you register it using IP address,port or by
>> name,
>> or what? My point here is are you sure you have the correct Port
>> number?
>> Maybe you should try the default port of 1433? Or check Box B's
>> Server
>> Network Utility and verify that you do indeed have the correct Port #.
>>
>> Thanks
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:D7**********************************@microsof t.com...
>> > Yes,
>> >
>> > but note that Box B also has SQL-Server installed and IIS.
>> >
>> >
>> >
>> > "Michael C#" wrote:
>> >
>> >> And you have established physical connectivity from Box B to Box A,
>> >> and
>> >> vice
>> >> versa? You can pull up SQL Server for Box B in Enterprise Manager
>> >> on
>> >> Box
>> >> A?
>> >>
>> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> news:08**********************************@microsof t.com...
>> >> > Same problem,
>> >> >
>> >> > "Michael C#" wrote:
>> >> >
>> >> >> Good lawd. Looks like your connection string from here. Try
>> >> >> this
>> >> >> one
>> >> >> (OleDb):
>> >> >>
>> >> >> "Provider=SQLOLEDB;Data Source=xxx.xxx.xxx.xxx,nnn;Initial
>> >> >> Catalog=DBNAME;User ID=sqlLogin;Password=pppp;"
>> >> >>
>> >> >> If you're using Integrated Security, then you need to get rid of
>> >> >> User
>> >> >> ID=
>> >> >> and Password= and add "Integrated Security=SSPI;". I think you
>> >> >> specified
>> >> >> SQL Server security, however.
>> >> >>
>> >> >>
>> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> news:00**********************************@microsof t.com...
>> >> >> > "Driver={SQL
>> >> >> > Server;Server=IP;Address=IP,port;Network=DBNETLIB; Database=DBNAME;Uid=sqlLogin;Pwd=pppp"
>> >> >> > or
>> >> >> >
>> >> >> > "DSN=DSNNAme;UID=sqlLogin;PWD=pppp"
>> >> >> >
>> >> >>
>> >> >> This is for an ODBC-style connection with a DSN set up.
>> >> >>
>> >> >> > or
>> >> >> >
>> >> >> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
>> >> >> > Info=False;User ID=sqllogin;Data Source=tcp:ip,port;Pwd=ppp"
>> >> >> >
>> >> >> > or
>> >> >> > "Provider=MSDASQL.1;Password=ppp;Persist Security
>> >> >> > Info=True;User
>> >> >> > ID=sqllogin;Data Source=IP,port;Initial Catalog=DBNAme
>> >> >> >
>> >> >> > ..
>> >> >> > ..
>> >> >> > ..
>> >> >> > ..
>> >> >> > Ther is still many
>> >> >> >
>> >> >> > "Michael C#" wrote:
>> >> >> >
>> >> >> >> Post your connection string.
>> >> >> >>
>> >> >> >> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> >> >> >> news:29**********************************@microsof t.com...
>> >> >> >> >I have tried all type on connection string listed in the
>> >> >> >> >world.
>> >> >> >> > Including the Connection string used by Database projects
>> >> >> >> > on
>> >> >> >> > ASP.Net,
>> >> >> >> > and
>> >> >> >> > Data envirmennts on VB6, and ODBC and UDL,....
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "CBretana" wrote:
>> >> >> >> >
>> >> >> >> >> How are you trying to connect? What's the conenction
>> >> >> >> >> string?
>> >> >> >> >> Are
>> >> >> >> >> you
>> >> >> >> >> using
>> >> >> >> >> Integrated Security or SQL Server Secuirity? Can you
>> >> >> >> >> connect
>> >> >> >> >> using
>> >> >> >> >> teh
>> >> >> >> >> same
>> >> >> >> >> conenction parameters using Query Analyzer ?
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "Shaker" wrote:
>> >> >> >> >>
>> >> >> >> >> > Dear All,
>> >> >> >> >> >
>> >> >> >> >> > I have tried to access a SQL server DB on on network A
>> >> >> >> >> > from
>> >> >> >> >> > ASP/Or
>> >> >> >> >> > ASP.Net
>> >> >> >> >> > Application
>> >> >> >> >> > Which is hosted on another network domain,
>> >> >> >> >> > Both of them are behind the firwall (all consideraation
>> >> >> >> >> > are
>> >> >> >> >> > fixed,..),
>> >> >> >> >> > IIS server can connect to SQL-Servers, using:
>> >> >> >> >> > SQL-Analyzer or
>> >> >> >> >> > Enterprize manager or
>> >> >> >> >> > VB6 desktop application hosted on (IIS) server using
>> >> >> >> >> > ADODB
>> >> >> >> >> > or
>> >> >> >> >> > VC# Desktop application,...
>> >> >> >> >> >
>> >> >> >> >> > But when the story comes to Acccesing SQL-Server from
>> >> >> >> >> > ISS
>> >> >> >> >> > using
>> >> >> >> >> > either
>> >> >> >> >> > ASP
>> >> >> >> >> > or ASP.Net The following error:
>> >> >> >> >> > "SQL Server does not exist or access denied"
>> >> >> >> >> >
>> >> >> >> >> > Is this logical, is there a way to overcome, this
>> >> >> >> >> > problem.
>> >> >> >> >> > I have tried a looked into many links and previous
>> >> >> >> >> > experments
>> >> >> >> >> > and
>> >> >> >> >> > did
>> >> >> >> >> > all
>> >> >> >> >> > workarouunds listed on MSISDN, but still the same
>> >> >> >> >> > problem.
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > --
>> >> >> >> >> > MCSD not .Net yet :(
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #30
We're nearing the end of the rope. It sounds like a problem with your
application or the configuration. To test this, try the following:

-Create a Windows Form app and add the following to the Form Load sub:

Dim sqlCon As SqlConnection
Dim sqlCmd As SqlCommand
Dim sqlDr As SqlDataReader
Try
sqlCon = New SqlConnection("Data Source=127.0.0.1,1433;Initial
Catalog=Northwind;User ID=USERNAME;Password=PASSWORD;")
sqlCon.Open()
sqlCmd = New SqlCommand("SELECT * FROM Orders", sqlCon)
sqlDr = sqlCmd.ExecuteReader()
While (sqlDr.Read())
Console.WriteLine(sqlDr(0))
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
If Not (sqlDr Is Nothing) Then
sqlDr.Close()
End If
If Not (sqlCmd Is Nothing) Then
sqlCmd.Dispose()
End If
If Not (sqlCon Is Nothing) Then
sqlCon.Close()
sqlCon.Dispose()
End If
End Try
' Replace 127.0.0.1,1433 in the connection string with your server's IP
address and Port #
' Replace the USERNAME and PASSWORD with your username and pwd

Run the app and see if it prints anything out in your Output window, or if a
messagebox pops up with an error message. I just ran this app here and it
works fine, so if your server can be reached from where you are via .NET,
this will tell us.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Did we reached to a closed road?

"Michael C#" wrote:
Then my first stab at it would be no. Unless they have to access
extended
stored procedures or something else in the master ...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
> This user is a db owner on the required DB only.
>
> "Michael C#" wrote:
>
>> That depends on exactly what that user needs to do...
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:E2**********************************@microsof t.com...
>> > The SQL server On A is far away from my side(phisically).
>> > It is registered by name,..
>> > It is using a differant porta other than the 1433, which is given a
>> > proper
>> > access on Box A firewal..
>> >
>> > On Box B (Which is not necessary) The SQL server &client network
>> > utility,
>> > are also set to use the same Port as on Server A.
>> >
>> > Please note,
>> > That the SQL server On A is having it's own Many DB, already in use
>> > since
>> > long time,...
>> > And all of my need is to access One table on one DB,... Which is
>> > given
>> > to
>> > a
>> > certain SQL Login User.
>> >
>> > Do you think that this SQL-User should have an access to Master DB
>> > on
>> > Box
>> > A?
>> >
>> >
>> >

Nov 19 '05 #31
As I told previously,
It is working for any desktop apllication either from .,...

My real application is very simple and does not do more than excuting a
Stored procedure.
My problem is in openning the ADO connection.
"Michael C#" wrote:
We're nearing the end of the rope. It sounds like a problem with your
application or the configuration. To test this, try the following:

-Create a Windows Form app and add the following to the Form Load sub:

Dim sqlCon As SqlConnection
Dim sqlCmd As SqlCommand
Dim sqlDr As SqlDataReader
Try
sqlCon = New SqlConnection("Data Source=127.0.0.1,1433;Initial
Catalog=Northwind;User ID=USERNAME;Password=PASSWORD;")
sqlCon.Open()
sqlCmd = New SqlCommand("SELECT * FROM Orders", sqlCon)
sqlDr = sqlCmd.ExecuteReader()
While (sqlDr.Read())
Console.WriteLine(sqlDr(0))
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
If Not (sqlDr Is Nothing) Then
sqlDr.Close()
End If
If Not (sqlCmd Is Nothing) Then
sqlCmd.Dispose()
End If
If Not (sqlCon Is Nothing) Then
sqlCon.Close()
sqlCon.Dispose()
End If
End Try
' Replace 127.0.0.1,1433 in the connection string with your server's IP
address and Port #
' Replace the USERNAME and PASSWORD with your username and pwd

Run the app and see if it prints anything out in your Output window, or if a
messagebox pops up with an error message. I just ran this app here and it
works fine, so if your server can be reached from where you are via .NET,
this will tell us.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Did we reached to a closed road?

"Michael C#" wrote:
Then my first stab at it would be no. Unless they have to access
extended
stored procedures or something else in the master ...

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
> This user is a db owner on the required DB only.
>
> "Michael C#" wrote:
>
>> That depends on exactly what that user needs to do...
>>
>> "Shaker" <Sh****@discussions.microsoft.com> wrote in message
>> news:E2**********************************@microsof t.com...
>> > The SQL server On A is far away from my side(phisically).
>> > It is registered by name,..
>> > It is using a differant porta other than the 1433, which is given a
>> > proper
>> > access on Box A firewal..
>> >
>> > On Box B (Which is not necessary) The SQL server &client network
>> > utility,
>> > are also set to use the same Port as on Server A.
>> >
>> > Please note,
>> > That the SQL server On A is having it's own Many DB, already in use
>> > since
>> > long time,...
>> > And all of my need is to access One table on one DB,... Which is
>> > given
>> > to
>> > a
>> > certain SQL Login User.
>> >
>> > Do you think that this SQL-User should have an access to Master DB
>> > on
>> > Box
>> > A?
>> >
>> >
>> >


Nov 19 '05 #32

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:AB**********************************@microsof t.com...
As I told previously,
It is working for any desktop apllication either from .,...

My real application is very simple and does not do more than excuting a
Stored procedure.
My problem is in openning the ADO connection.


OK, that's all I can do for you then.

Assuming your Connection String is at fault, the code below would be able to
prove that rather quickly and easily, by actually connecting to your remote
server using a connection string that has been tested and works. If the
code below *didn't* work, then the connection string could be eliminated as
a suspect and you could move on to checking other things, like you IIS
configuration, for instance. At any rate, best of luck .
Nov 19 '05 #33
I believe that you are running into a problem with delegation. If you are
unfamiliar with this concept, please review this link since Keith Brown can
explain it far better than I can:

http://www.pluralsight.com/wiki/defa...elegation.html

Unless you have changed the defaults, your web server is probably running as
ASPNET (pre-Server 2003), or as Network Service (Server 2003). Based upon
your connection strings, it looks like you are trying to use Windows
Authentication / Integrated Security, which means that either ASPNET or
Network Service is the identity that you are using to access your database
server. If this is true, then you need to grant the ASPNET identity from
your web server access to SQL Server.

It is also possible that you are trying to use web.config to impersonate
another identity. However, unless you are using Server 2003 and enabling
delegation (this feature is not available in earlier versions of Windows),
then your impersonation is only valid on your web server. You are not
allowed to use an impersonated identity to access a remote machine, such as
your database server. If you want to do this, make sure that you are using
Windows Server 2003 and turn this feature on for your web application.

If you have everything set up properly, try this connection string for
integrated security:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Data Source=<server>;Initial
Catalog=<database>;

I'm not 100% sure of the correct syntax for the <server> if you need to
specify a non-default port, but I'd try standard TCP/IP syntax first:
"10.16.175.255:1234".

A much simpler solution would be to simply use SQL Server authentication.
Simply pass your user id & password (without any of the Integrated Security
parameters) in your connection string. This will not be as secure as
Windows authentication, but it will work across servers.

This connection string should work for SQL Server authentication:

Provider=SQLOLEDB.1;User ID=<userid>;Data
Source=<server>;Pwd=<password>;Initial Catalog=<database>;

Hopefully this will put you on the right track.

- Erik Wynne Stepp

"Shaker" wrote:
To clarify,
Server 1
I have SQL-Server only- Remote server which allows Mixed mode behind the
firewall.

Server 2:
And IIS + SQL server,... query analyzer, VB 6, ,... All begined th firewall.

Trying to establish connection from 2 to 1.
All connnections success Except ASP.Net/ASP
The connection string: all are baesd on (IP,Port) and (UID,PWD)(SQL User on
Server1), and other requiered parameters,...

This is may simplyfy the story>

"Kevin Spencer" wrote:
Okay, let's start with terminology. The IIS Server doesn't connect to
anything other than a network. It's an Operating System. Now, what IS
connecting is:

Query Analyzer
Enterprise Manager
VB6 Desktop app

All three of the applications mentioned are executables, which means that
they run under the machine's System account.

On the other hand, your ASP.Net app runs under a different account. Chances
are it runs under the default ASP.Net account, which is extremely
underpriveleged.

Okay, now, SQL Server can be connected to in one of 2 different ways:

Windows Authentication
Mixed Windows and SQL Server Authentication

When using Windows Authentication only, only Windows accounts that have been
granted the necessary database permissions can access the database. When
using Mixed mode, SQL Server accounts can also access the SQL Server,
according to the priveleges that they have been granted IN SQL Server.

So, if you're using Windows Auth only, your connection string should reflect
that, and the ASP.Net user account must be granted the necessary
permissions.

If you're using Mixed mode, the connection string should contain the name
and password of the SQL Server account that has been granted the
permissions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(


Nov 19 '05 #34
just a thought... If the SQL server you're attempting to connect to was
installed as an MSDE instance and, during installation, you did not include
the command line parameter "DISABLENETWORKPROTOCOLS=0 " the SQL instance will
reject any attempt to connect from a network.

"Shaker" wrote:
Exactly ,
note both of them is on separate network, and each one behind it's firewall.

"Michael C#" wrote:
Let me make sure I understand your issue.

You have two boxes:

Box A has SQL Server,
Box B has ASP.NET apps and IIS

You can reach Box A (SQL Server) from Box B via Enterprise Manager and Query
Analyzer, but not from ASP.NET apps.

Is this correct?
"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Dear All,

I have tried to access a SQL server DB on on network A from ASP/Or ASP.Net
Application
Which is hosted on another network domain,
Both of them are behind the firwall (all consideraation are fixed,..),
IIS server can connect to SQL-Servers, using:
SQL-Analyzer or
Enterprize manager or
VB6 desktop application hosted on (IIS) server using ADODB or
VC# Desktop application,...

But when the story comes to Acccesing SQL-Server from ISS using either ASP
or ASP.Net The following error:
"SQL Server does not exist or access denied"

Is this logical, is there a way to overcome, this problem.
I have tried a looked into many links and previous experments and did all
workarouunds listed on MSISDN, but still the same problem.
--
MCSD not .Net yet :(


Nov 19 '05 #35

I have exactly the same problem. I have machine A running the SQL serve
and machine B running the SQL Server, IIS and ASP.NET application. Ther
is impossible to connect to the machine A SQL server database from th
ASP.NET app on machine B. However, the same code runs fine when use
from the Windows desktop (.net) application.

Moreover, the same code ran fine even from ASP.NET app until
installed the SQL Server SP3 and Analysis Services on the machine B
After that installation something got broken.

The C# code:

string sConString = "server=ServerB;database=DBOnB;uid=Peor;pwd=He lp";
SqlConnection sqlCon = new SqlConnection( sConString );
sqlCon.Open(); <<<< IT FAILS HERE WHEN CALLED FROM ASP.NET APP BU
RUNS FINE WHEN CALLED FROM DESKTOP AP
-
Peo
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Nov 19 '05 #36
Can you connect from server A to server B using QA? I'm doing the exact
same thing right now, except that I have 4 connections going simultaneously
from a single ASP.NET app. to 4 different SQL Servers, including a local
instance, all with SP 3a installed.

Did something change with your network protocols or other settings before,
during, or after the SP 3 installation? Look at the Server Network Utility
and Client Network Utility to ensure you're using the same protocols, ports,
etc.

"Peor" <Pe*********@mail.codecomments.com> wrote in message
news:Pe*********@mail.codecomments.com...

I have exactly the same problem. I have machine A running the SQL server
and machine B running the SQL Server, IIS and ASP.NET application. There
is impossible to connect to the machine A SQL server database from the
ASP.NET app on machine B. However, the same code runs fine when used
from the Windows desktop (.net) application.

Moreover, the same code ran fine even from ASP.NET app until I
installed the SQL Server SP3 and Analysis Services on the machine B.
After that installation something got broken.

The C# code:

string sConString = "server=ServerB;database=DBOnB;uid=Peor;pwd=He lp";
SqlConnection sqlCon = new SqlConnection( sConString );
sqlCon.Open(); <<<< IT FAILS HERE WHEN CALLED FROM ASP.NET APP BUT
RUNS FINE WHEN CALLED FROM DESKTOP APP

--
Peor
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #37

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: john kyari | last post by:
This is a multi-part message in MIME format --6b4c4a84-b637-44ab-a4eb-e39b30db34ab Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Dear Friend,...
3
by: dreams2text | last post by:
Check out the article titled : Dear Mr Gates, A suggestion to make the CLR Ubiquitous at http://dreams2text.blogspot.com/
8
by: Dutchy | last post by:
Dear reader, In an attempt to obtain the path to the quick-launch-folder in order to create a shortcut to my application-updates during installation , I thought to: 1- check if quick launch...
1
by: Asha | last post by:
Dear MVP, A small question to you all Lets say I have an application which gets the value from a drop down list, e.g. GetProductInfo1(ddl.selectedItem.value)...
10
by: Dean Slindee | last post by:
Does anybody know to whom I can send this letter so that it hits home before Visual Studio 2005 goes production? Dear Microsoft Visual Studio 2005 developers, This is a request for you to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.