Sunday, March 25, 2012
connection pooling problem w/ ASP.NET 2.0 and SQL 2005 64 bit?
I just deployed my new ASP.NET 2.0 / C# web app to "production". I have a
web server running Windows 2003, all the latest updates, etc. As mentioned,
the web app is running under ASP.NET 2 and C3. On a separate server, I am
running SQL Server 2005 64 bit, Standard Edition (SP1).
Note, I have separate development and test environments that mimic the above
setup. That is I have a dev web server accessing a separate dev database
server; the only difference is that the db server is SQL 2005 32 bit, Std
Edition; same in test.
My production web app is experiencing connection pooling problems. If I
bring up the activity monitor on the production db server while I am
exercising some of the web pages, I can watch the connections grow to the
100 max (the default for asp.net) very quickly (just one person hitting a
page that exercises a database query) and then the .NET app will eventually
throw an error:
Message: Timeout expired. The timeout period elapsed prior to obtaining a
connection from the pool. This may have occurred because all pooled
connections were in use and max pool size was reached.
Source: System.Data...
Some things to consider:
1) Before everyone jumps to the conclusion about datareaders, please bear in
mind that the EXACT same .NET code is on dev and test web servers; I am NOT
able to get the connections to max out on dev or test; whereas on production
web server, I can easily get it to max out. It's not a code issue. Yes, I
know all about closing DataReader connections explicitly, blah, blah. It's
not the code.
2) There are 2 major difference on the db server; however
a) the production server is 64 bit; my other db servers are 32 bit
b) I actually spent quite a bit of time today on my production db server in
an effort to get linked server stuff working. So, there are some definite
things I did on the prod server db that I have *not* done on dev or test sql
boxes, such as
- turning on MS DTC security config settings (in Component Services); there
are many MS blogs about this and the following MSKB:
http://support.microsoft.com/kb/899191
- enabling named pipes
So, I'm thinking I have 2 straws to grasp at:
A) call Microsoft tech support to see if there's anything that google hasn't
turned up
B) uninstall SQL Server 2005 on my production db server and reinstall using
a 32 bit version. Of course, since this is production. I bought 64 bit SQL,
so would I be "allowed" to downgrade to 32 bit? The only additional disc
media I have are MSDN discs.Hi,
Thanks for using Microsoft Managed Newsgroup.
From your description, I understand that:
Your ASP.NET 2.0 web application with SQL Server 2005 64 bit SP1 was
running on a production environment. The database server was on a separated
machine. You found that the connections grew quickly to reach the max
connection limit on your SQL Server and then any new connecion was timeout.
However no problem appeared on your test and development environment.
If I have misunderstood, please let me know.
For further research, I would like your answering me several questions:
1. How long had the SQL Server been normally running before the problem
appeared?
2. What are the situations of CPU and memory usage at that time?
3. Could you see some errors in the Event logs?
Also, I would like to collect the following information from you:
1. MPSReport:
Please help create a MPSReport on the problematic machine, which will
collect
ERRORLOG, Windows event log and other helpful information about the SQL
Server. To
create a MPSReport, please visit the following web site:
<http://www.microsoft.com/downloads/details.aspx?FamilyId=CEBF3C7C-7CA5-408F
-88B7-F9
C79B7306C0&displaylang=en>.
And look for MPSRPT_SQL.EXE. Download it and run it on the machine. Dismiss
the
prompted dialog boxes and the readme window (usually a Notepad) after you
read
them. After the Command Prompt window closes itself, collect the cab file
the tool
has generated and sent it to me.
2. SQL Error log:
By default, they are located at: C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG -- Send all the files under this folder with zip
format to me.
3. Server Configurations:
Use sqlcmd or osql to run the following batch and send the output file to
me:
Under command prompt: sqlcmd -S ServerName\InstanceName -E -o C:\output.txt
exec sp_configure 'show advanced', 1
reconfigure with override
exec sp_configure
go
4. SQL Trace file
Use SQL Profiler to monitor your SQL Server to see what are the SQLs or SPs
being executed at that time.
I will create a web file space for your uploading the large files. However
you may need to leave me your email so that I can mail you the password.
If it is not convenient for you to leave your email here, you can send an
email to me (changliw@.microsoft.com).
Note: Our managed newsgroup is focused on break/fix issues that are neither
urgent nor complex. If the issue is urgent to your business, it is
recommended that you contact Microsoft Customer Support Services (CSS) via
telephone so that a dedicated Support Professional can assist you in a more
efficient manner. Please be advised that contacting phone support will be a
charged call.
To obtain the phone numbers for specific technology request please take a
look at the web site listed below.
http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi,
Just check with you to see if you need further assistance on this issue.
We appreciate your posting back at your convenience and let us know the
issue status.
If you have any other questions or concerns, please feel free to let us
know. It is always our pleasure to be of assistance.
Charles Wang
Microsoft Online Community Support
Saturday, February 25, 2012
Connection Error from ASP.Net under IIS: provider: Named Pipes Provider, error: 40
We experience the 40 error when our Asp.net code runs under IIS and uses named pipes to a sql server 2005 named instance.
We've tried all suggestions found on blogs and KB articles such as making sure the named pipes protocol is enabled, making sure the Browser service is started, making sure Allow Remote Connections is enabled, making sure we're not using Asp.Net 2.0 membership providers, and the list goes on and on.
We boiled it down to a simple test scenario. We open a SqlConnection to the sql 2005 box in the code with the intention of binding a datareader to a gridview, but it never gets that far because the connection.Open() fails.
If we run this test application as a virtual directory in IIS and Asp.Net 2.0, the connection.Open() fails.
If we run this test application from Visual Studio .Net using Cassini (PWS), the connection.Open() succeeds and binds to the gridview.
What could be causing the connection to fail under IIS but succeed under Cassini? We've tried setting IIS to run as a domain user and with digest authentication enabled. That made no difference.
Any help or insight is appreciated!
Could you try to answer the following questions though some of them may be already implied by your post?
(1) Is this remote connection or local connection?
(2) Is the account that runing your visual studio.net the the same as your IIS. Do you impersonate client connection in IIS?
(3) Can you make direct connection to your backend sqlserver from your virtual studio or sql server management studio?
(4) Can you try connecting using TCP instead? If not, what is the error code?
|||(1) Is this remote connection or local connection?
-Remote connection
(2) Is the account that runing your visual studio.net the the same as your IIS. Do you impersonate client connection in IIS?
-Same account, windows authentication. No impersonation
(3) Can you make direct connection to your backend sqlserver from your virtual studio or sql server management studio?
-Management Studio works, Cassini works.. IIS does not
(4) Can you try connecting using TCP instead? If not, what is the error code?
TCP gives "server actively refused connection" error
|||Does your connection string like "servername\instancename" or something else?
The TCP failure indicates either the server TCP listener is not up or client uses different TCP port to connect. So please check whether the TCP is enabled or not. Restart the server after the configuration change. Then check if the connection string has instancename specified. Once you find out which port the server is listening on, you can also use "tcp
ervername,port" to connection to the server.
Tuesday, February 14, 2012
Connecting to SQLServer 2000 from ASP.NET
The SQL Server resides on a seperate development server from the IIS5.1 on
Windows XP SP2 on development PCs which host the ASP.NET application.
I would like to use Integrated Windows Authentication like
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=DBName;Data Source=DevServer1
My problems!
1) ASP.NET would be running on development PCs as
MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
Dev PC, I can't think of a way to add this user (which is on a different
machine) as a Windows user
2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\Machine.config as
follows
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="MyDomain\AUser"
password="password"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="20"
maxIoThreads="20"
/>
However, when I launch the ASP.NET application from IE (before it even get
to the stage to connect to SQLServer, I get the error on IE saying
Application Unavailable, and in the Event Viewer, I get
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1084
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be started. The error code for the failure is
80004005. This error can be caused when the worker process account has
insufficient rights to read the .NET Framework files. Please ensure that the
.NET Framework is correctly installed and that the ACLs on the installation
directory allow access to the configured account.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1007
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be launched because the username and/or password
supplied in the processModel section of the config file are invalid.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
How could I fix this? I am 100% sure I have entered the correct username
and password under machine.config and I did do an iisreset as well!The problem may not be the username and password, but in the rights
MyDomain\MyUser has. For instance, I know the user has to have "Log in
as batch job" user rights. One way to track down these problems is to
turn on security auditing in the local security policy and look at
what turns up in the event log.
Another solution I have used is to let ASP.NET execute as the local
ASPNET account but set the password to a known password. In other
words, instead of:
userName="machine" password="AutoGenerate"
in machine.config, use:
userName="machine" password="longpassword"
Then on the database server, create a local ASPNET account with the
same password. For rights, you'll need "Access this computer from the
network", and "log on as batch job". You can deny local login. You'll
need to add ASPNET as a login to SQL Server and grant access to the
correct databases of course.
HTH,
--
Scott
http://www.OdeToCode.com
On Thu, 22 Apr 2004 22:49:31 +0100, "Patrick"
<patl@.reply.newsgroup.msn.com> wrote:
>I have an ASP.NET application that connects to a SQL Server database.
>The SQL Server resides on a seperate development server from the IIS5.1 on
>Windows XP SP2 on development PCs which host the ASP.NET application.
>I would like to use Integrated Windows Authentication like
> Integrated Security=SSPI;Persist Security Info=False;Initial
>Catalog=DBName;Data Source=DevServer1
>My problems!
>1) ASP.NET would be running on development PCs as
>MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
>Dev PC, I can't think of a way to add this user (which is on a different
>machine) as a Windows user
>2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
>2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\Machine.config as
>follows
> <processModel
> enable="true"
> timeout="Infinite"
> idleTimeout="Infinite"
> shutdownTimeout="0:00:05"
> requestLimit="Infinite"
> requestQueueLimit="5000"
> restartQueueLimit="10"
> memoryLimit="60"
> webGarden="false"
> cpuMask="0xffffffff"
> userName="MyDomain\AUser"
> password="password"
> logLevel="Errors"
> clientConnectedCheck="0:00:05"
> comAuthenticationLevel="Connect"
> comImpersonationLevel="Impersonate"
> responseDeadlockInterval="00:03:00"
> maxWorkerThreads="20"
> maxIoThreads="20"
> />
>However, when I launch the ASP.NET application from IE (before it even get
>to the stage to connect to SQLServer, I get the error on IE saying
>Application Unavailable, and in the Event Viewer, I get
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1084
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be started. The error code for the failure is
>80004005. This error can be caused when the worker process account has
>insufficient rights to read the .NET Framework files. Please ensure that the
>.NET Framework is correctly installed and that the ACLs on the installation
>directory allow access to the configured account.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1007
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be launched because the username and/or password
>supplied in the processModel section of the config file are invalid.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>How could I fix this? I am 100% sure I have entered the correct username
>and password under machine.config and I did do an iisreset as well!
>|||Hi Patrick,
How are things going currently?
I am just checking on your progress regarding the information that was sent you. Thanks for Scott's kind
help on your issue. Have you tried the solutions provided to you? I wonder how the testing is going. If you
encounter any difficulty, please do not hesitate to let us know.
The issue seems to be security related in ASP.NET. I saw you ask this question in another ASPNET queue
but not sure how are things going there.Please post here and let me know the status of your issue.
Looking forward to hearing from you soon
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi Patrick,
I followed with my previous post and ask if there is any headway on your side?
Per Scott's suggestion, I also believe the issue is not located in SQL Server side but in the side of the
improper rights the MyDomain\MyUser has. I'm not sure if you have implemented the following setting in
your Machine.config file:
<identity impersonate="true" userName="MyDomain\aspUser1" password="password"/>
If the ASP.NET application and SQL Server are deployed on the different machines, you may need to use
impersonate="true" to let your ASP.Net application impersonate the fixed identity.
Please let us know if this helps solve your problem.
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.
Connecting to SQLServer 2000 from ASP.NET
The SQL Server resides on a seperate development server from the IIS5.1 on
Windows XP SP2 on development PCs which host the ASP.NET application.
I would like to use Integrated Windows Authentication like
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=DBName;Data Source=DevServer1
My problems!
1) ASP.NET would be running on development PCs as
MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
Dev PC, I can't think of a way to add this user (which is on a different
machine) as a Windows user
2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\Machine.config as
follows
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="MyDomain\AUser"
password="password"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="20"
maxIoThreads="20"
/>
However, when I launch the ASP.NET application from IE (before it even get
to the stage to connect to SQLServer, I get the error on IE saying
Application Unavailable, and in the Event Viewer, I get
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1084
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be started. The error code for the failure is
80004005. This error can be caused when the worker process account has
insufficient rights to read the .NET Framework files. Please ensure that the
.NET Framework is correctly installed and that the ACLs on the installation
directory allow access to the configured account.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1007
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be launched because the username and/or password
supplied in the processModel section of the config file are invalid.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
How could I fix this? I am 100% sure I have entered the correct username
and password under machine.config and I did do an iisreset as well!The problem may not be the username and password, but in the rights
MyDomain\MyUser has. For instance, I know the user has to have "Log in
as batch job" user rights. One way to track down these problems is to
turn on security auditing in the local security policy and look at
what turns up in the event log.
Another solution I have used is to let ASP.NET execute as the local
ASPNET account but set the password to a known password. In other
words, instead of:
userName="machine" password="AutoGenerate"
in machine.config, use:
userName="machine" password="longpassword"
Then on the database server, create a local ASPNET account with the
same password. For rights, you'll need "Access this computer from the
network", and "log on as batch job". You can deny local login. You'll
need to add ASPNET as a login to SQL Server and grant access to the
correct databases of course.
HTH,
Scott
http://www.OdeToCode.com
On Thu, 22 Apr 2004 22:49:31 +0100, "Patrick"
<patl@.reply.newsgroup.msn.com> wrote:
>I have an ASP.NET application that connects to a SQL Server database.
>The SQL Server resides on a seperate development server from the IIS5.1 on
>Windows XP SP2 on development PCs which host the ASP.NET application.
>I would like to use Integrated Windows Authentication like
> Integrated Security=SSPI;Persist Security Info=False;Initial
>Catalog=DBName;Data Source=DevServer1
>My problems!
>1) ASP.NET would be running on development PCs as
>MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
>Dev PC, I can't think of a way to add this user (which is on a different
>machine) as a Windows user
>2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
>2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\Machine.config as
>follows
> <processModel
> enable="true"
> timeout="Infinite"
> idleTimeout="Infinite"
> shutdownTimeout="0:00:05"
> requestLimit="Infinite"
> requestQueueLimit="5000"
> restartQueueLimit="10"
> memoryLimit="60"
> webGarden="false"
> cpuMask="0xffffffff"
> userName="MyDomain\AUser"
> password="password"
> logLevel="Errors"
> clientConnectedCheck="0:00:05"
> comAuthenticationLevel="Connect"
> comImpersonationLevel="Impersonate"
> responseDeadlockInterval="00:03:00"
> maxWorkerThreads="20"
> maxIoThreads="20"
> />
>However, when I launch the ASP.NET application from IE (before it even get
>to the stage to connect to SQLServer, I get the error on IE saying
>Application Unavailable, and in the Event Viewer, I get
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1084
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be started. The error code for the failure is
>80004005. This error can be caused when the worker process account has
>insufficient rights to read the .NET Framework files. Please ensure that th
e
>.NET Framework is correctly installed and that the ACLs on the installation
>directory allow access to the configured account.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1007
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be launched because the username and/or password
>supplied in the processModel section of the config file are invalid.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>How could I fix this? I am 100% sure I have entered the correct username
>and password under machine.config and I did do an iisreset as well!
>|||Hi Patrick,
How are things going currently?
I am just checking on your progress regarding the information that was sent
you. Thanks for Scott's kind
help on your issue. Have you tried the solutions provided to you? I wonder h
ow the testing is going. If you
encounter any difficulty, please do not hesitate to let us know.
The issue seems to be security related in ASP.NET. I saw you ask this quest
ion in another ASPNET queue
but not sure how are things going there.Please post here and let me know the
status of your issue.
Looking forward to hearing from you soon
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Hi Patrick,
I followed with my previous post and ask if there is any headway on your sid
e?
Per Scott's suggestion, I also believe the issue is not located in SQL Serve
r side but in the side of the
improper rights the MyDomain\MyUser has. I'm not sure if you have implement
ed the following setting in
your Machine.config file:
<identity impersonate="true" userName="MyDomain\aspUser1" password="password
"/>
If the ASP.NET application and SQL Server are deployed on the different mach
ines, you may need to use
impersonate="true" to let your ASP.Net application impersonate the fixed ide
ntity.
Please let us know if this helps solve your problem.
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.
Connecting to SQLServer 2000 from ASP.NET
The SQL Server resides on a seperate development server from the IIS5.1 on
Windows XP SP2 on development PCs which host the ASP.NET application.
I would like to use Integrated Windows Authentication like
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=DBName;Data Source=DevServer1
My problems!
1) ASP.NET would be running on development PCs as
MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
Dev PC, I can't think of a way to add this user (which is on a different
machine) as a Windows user
2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G\Machine.config as
follows
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="MyDomain\AUser"
password="password"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="20"
maxIoThreads="20"
/>
However, when I launch the ASP.NET application from IE (before it even get
to the stage to connect to SQLServer, I get the error on IE saying
Application Unavailable, and in the Event Viewer, I get
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1084
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be started. The error code for the failure is
80004005. This error can be caused when the worker process account has
insufficient rights to read the .NET Framework files. Please ensure that the
..NET Framework is correctly installed and that the ACLs on the installation
directory allow access to the configured account.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1007
User: N/A
Computer: MachineName
Description:
aspnet_wp.exe could not be launched because the username and/or password
supplied in the processModel section of the config file are invalid.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
How could I fix this? I am 100% sure I have entered the correct username
and password under machine.config and I did do an iisreset as well!
The problem may not be the username and password, but in the rights
MyDomain\MyUser has. For instance, I know the user has to have "Log in
as batch job" user rights. One way to track down these problems is to
turn on security auditing in the local security policy and look at
what turns up in the event log.
Another solution I have used is to let ASP.NET execute as the local
ASPNET account but set the password to a known password. In other
words, instead of:
userName="machine" password="AutoGenerate"
in machine.config, use:
userName="machine" password="longpassword"
Then on the database server, create a local ASPNET account with the
same password. For rights, you'll need "Access this computer from the
network", and "log on as batch job". You can deny local login. You'll
need to add ASPNET as a login to SQL Server and grant access to the
correct databases of course.
HTH,
Scott
http://www.OdeToCode.com
On Thu, 22 Apr 2004 22:49:31 +0100, "Patrick"
<patl@.reply.newsgroup.msn.com> wrote:
>I have an ASP.NET application that connects to a SQL Server database.
>The SQL Server resides on a seperate development server from the IIS5.1 on
>Windows XP SP2 on development PCs which host the ASP.NET application.
>I would like to use Integrated Windows Authentication like
> Integrated Security=SSPI;Persist Security Info=False;Initial
>Catalog=DBName;Data Source=DevServer1
>My problems!
>1) ASP.NET would be running on development PCs as
>MachineName\IUSR_MachineName and under SQL Server Enterprise Manager on the
>Dev PC, I can't think of a way to add this user (which is on a different
>machine) as a Windows user
>2.1) I managed to add MyDomain\AUser as a SQL user in Enterprise Manager.
>2.2) I tried to get my ASP.NET to run as MyDomain\AUser by editing
>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONF IG\Machine.config as
>follows
> <processModel
> enable="true"
> timeout="Infinite"
> idleTimeout="Infinite"
> shutdownTimeout="0:00:05"
> requestLimit="Infinite"
> requestQueueLimit="5000"
> restartQueueLimit="10"
> memoryLimit="60"
> webGarden="false"
> cpuMask="0xffffffff"
> userName="MyDomain\AUser"
> password="password"
> logLevel="Errors"
> clientConnectedCheck="0:00:05"
> comAuthenticationLevel="Connect"
> comImpersonationLevel="Impersonate"
> responseDeadlockInterval="00:03:00"
> maxWorkerThreads="20"
> maxIoThreads="20"
> />
>However, when I launch the ASP.NET application from IE (before it even get
>to the stage to connect to SQLServer, I get the error on IE saying
>Application Unavailable, and in the Event Viewer, I get
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1084
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be started. The error code for the failure is
>80004005. This error can be caused when the worker process account has
>insufficient rights to read the .NET Framework files. Please ensure that the
>.NET Framework is correctly installed and that the ACLs on the installation
>directory allow access to the configured account.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>
>Event Type: Error
>Event Source: ASP.NET 1.1.4322.0
>Event Category: None
>Event ID: 1007
>User: N/A
>Computer: MachineName
>Description:
>aspnet_wp.exe could not be launched because the username and/or password
>supplied in the processModel section of the config file are invalid.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>How could I fix this? I am 100% sure I have entered the correct username
>and password under machine.config and I did do an iisreset as well!
>
|||Hi Patrick,
How are things going currently?
I am just checking on your progress regarding the information that was sent you. Thanks for Scott's kind
help on your issue. Have you tried the solutions provided to you? I wonder how the testing is going. If you
encounter any difficulty, please do not hesitate to let us know.
The issue seems to be security related in ASP.NET. I saw you ask this question in another ASPNET queue
but not sure how are things going there.Please post here and let me know the status of your issue.
Looking forward to hearing from you soon
Best regards,
Billy Yao
Microsoft Online Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.
|||Hi Patrick,
I followed with my previous post and ask if there is any headway on your side?
Per Scott's suggestion, I also believe the issue is not located in SQL Server side but in the side of the
improper rights the MyDomain\MyUser has. I'm not sure if you have implemented the following setting in
your Machine.config file:
<identity impersonate="true" userName="MyDomain\aspUser1" password="password"/>
If the ASP.NET application and SQL Server are deployed on the different machines, you may need to use
impersonate="true" to let your ASP.Net application impersonate the fixed identity.
Please let us know if this helps solve your problem.
Best regards,
Billy Yao
Microsoft Online Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.