IIS 6 and SQL server 2000 connection problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS Server > IIS 6 and SQL server 2000 connection problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    IIS 6 and SQL server 2000 connection problem  
Cam Schwieder


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:19 PM

Hey everyone,

I have spent the last few hours trying to get my ISAPI dll to connect
to SQL server 2000 using IIS 6 connection pooling, and I have finally
got it working, but I don't understand why it works. I am hoping
someone here can help me.

Problem:
I have a basic ISAPI dll, that was using the below connection string
to connect to our database.

Provider=SQLOLEDB.1;User ID=XXXXXX;Password=XXXXXX;Data
Source=XXXXXXXXXX;Initial Catalog=XXXXXXX;Network Library=DBMSSOCN

It worked fine under IIS 6 if we had the 'Run WWW service in IIS 5.0
isolation mode' checked. However without this checked, it would fail
in the connect call with the following error

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

Solution:
Anyway, after reading the following post,
[url]http://www.google.ca/groups?hl=en&lr=&ie=UTF-8&threadm=uaSMm7bYDHA.1492%40TK2MSFTN
GP12.phx.gbl&rnum=4&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3DIIS%2B6%2Bsq
 l%2Bserver%2B1433%2BSQL%2BServer%2Bdoes%
2Bnot%2Bexist%2Bor%2Baccess%2Bdenied.[/url
]

I fixed the problem by adding the default port number (1433) to the
connection string like so

Provider=SQLOLEDB.1;User ID=XXXXXX;Password=XXXXXX;Data
Source=XXXXXXXXXX,1433;Initial Catalog=XXXXXXX;Network
Library=DBMSSOCN


This has solved my problem, and now everything is fine and dandy,
except for the fact that I have no idea why what I did had any affect
my problem.

If someone can answer this for me, I will truly be impressed!!

Thanks in advance for any feedback!
Cam Schwieder





[ Post a follow-up to this message ]



    Re: IIS 6 and SQL server 2000 connection problem  
Egbert Nierop \(MVP for IIS\)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:19 PM

"Cam Schwieder" <cschwieder@canadream.com> wrote in message
news:e5fe0098.0408270636.30095534@posting.google.com...
> Hey everyone,
>
> http://www.google.ca/groups?hl=en&l...ion_manager.htm


> Thanks in advance for any feedback!
> Cam Schwieder






[ Post a follow-up to this message ]



    Re: IIS 6 and SQL server 2000 connection problem  
Cam Schwieder


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:19 PM

Thanks for the feedback Egbert!

There is a good chance that what you said was our problem. I was assuming
that that SQL Server client would simply use the default port (1433), and
not scan the server for an open port. But when I check our configuration,
the there was an alias for TCP IP to our DB server using a dynamic port.

Thanks for the explaination, at least now I can sleep a little better at
night, 

Cam


"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
message news:ursJlZHjEHA.2992@TK2MSFTNGP12.phx.gbl...
> "Cam Schwieder" <cschwieder@canadream.com> wrote in message
> news:e5fe0098.0408270636.30095534@posting.google.com... 
>
> SQL defaults to  a default client setting using
> FILE://C:\WINDOWS\system32\cliconfg.exe
>
> If IIS6 does not allow a client to dynamically discover a remote port and
> library (named pipes/vs TCP/IP) it might be simple a bug or a security
> measure...
>
> --
> compatible web farm Session replacement for Asp and Asp.Net
> http://www.nieropwebconsult.nl/asp_session_manager.htm
>
> 
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:41 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register