IIS client cannot access remote DB
am 22.09.2005 05:35:13 von Roger
Hi,
I'm completely stumped with an issue of authentication.
I have an ASP.net application which is supposed to retrieve data from a
remote database. It is supposed to access the database using the domain
credential of the user that is accessing the page.
When I access the aspx page from a client, it generates an error: "An error
has occured: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection." When I access the aspx page on the IIS
server itself, the data is rendered correctly. The weird part is, after
opening the page on the IIS server, the client will be able to open the page
correctly for some time. I presume this has to do with application pooling
on the connection. After that, it goes back to the same old error until I
'open a channel' via the server again.
Tests have confirmed that local data access (putting a SQL server onto the
IIS server and retrieving data from there using the same settings as below)
poses absolutely no problem from either a client or the IIS server.
I have been testing with a domain user, whom is administrator on both the
client and the IIS server. I have no access to a domain admin account to do
testing.
Configuration:
IIS server: WS2003 SP1, IIS 6
DB server: SQL 2000 SP3
Client: XP SP2, IE 6 SP2
My current settings are:
1. machine.config processmodel user="SYSTEM"
2. web.config of the site has authentication mode="Windows" and indentity
impersonate="true"
3. The connectionstring in the aspx page uses integrated security=SSPI
4. Security on the virtual directory is set to Windows Integrated Security
5. The virtual directory has been set as an application, and the application
pool is set to DefaultAppPool
6. The identity of the DefaultAppPool is Network Service
Any help or insights is really appreciated.
Regards,
Roger.
Re: IIS client cannot access remote DB
am 22.09.2005 13:00:46 von reb01501
Roger wrote:
> Hi,
>
> I'm completely stumped with an issue of authentication.
>
> I have an ASP.net application
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.
But, read on.
> which is supposed to retrieve data from
> a remote database. It is supposed to access the database using the
> domain credential of the user that is accessing the page.
>
> Configuration:
> IIS server: WS2003 SP1, IIS 6
> DB server: SQL 2000 SP3
> Client: XP SP2, IE 6 SP2
>
> My current settings are:
> 1. machine.config processmodel user="SYSTEM"
> 2. web.config of the site has authentication mode="Windows" and
> indentity impersonate="true"
This will fail if you do not open the application in IIS Manager and disable
Anonymous in the Security tab.
If that is not the problem, do a search for your problem at
support.microsoft.com (the Knowledge Base), and if that does not provide
your answer, post to the aspnet newsgroup.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: IIS client cannot access remote DB
am 23.09.2005 04:00:00 von Roger
Bob,
Thanks for the reply, and the hint to try the other newsgroup.
I have anonymous access disabled, and use only windows integrated security.
I've already done an extensive search in support, and unless I use the wrong
keywords, I have not been able to find an answer to this problem.
I will move this posting to microsoft.public.dotnet.framework.aspnet.
Cheers,
Roger.
"Bob Barrows [MVP]" wrote in message
news:usR9eT2vFHA.2956@TK2MSFTNGP09.phx.gbl...
> Roger wrote:
>> Hi,
>>
>> I'm completely stumped with an issue of authentication.
>>
>> I have an ASP.net application
>
> There was no way for you to know it, but this is a classic asp newsgroup.
> While you may be lucky enough to find a dotnet-knowledgeable person here
> who
> can answer your question, you can eliminate the luck factor by posting
> your
> question to a group where those dotnet-knowledgeable people hang out. I
> suggest microsoft.public.dotnet.framework.aspnet.
>
> But, read on.
>
>> which is supposed to retrieve data from
>> a remote database. It is supposed to access the database using the
>> domain credential of the user that is accessing the page.
>>
>
>> Configuration:
>> IIS server: WS2003 SP1, IIS 6
>> DB server: SQL 2000 SP3
>> Client: XP SP2, IE 6 SP2
>>
>> My current settings are:
>> 1. machine.config processmodel user="SYSTEM"
>> 2. web.config of the site has authentication mode="Windows" and
>> indentity impersonate="true"
>
> This will fail if you do not open the application in IIS Manager and
> disable Anonymous in the Security tab.
>
> If that is not the problem, do a search for your problem at
> support.microsoft.com (the Knowledge Base), and if that does not provide
> your answer, post to the aspnet newsgroup.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>