Tuesday, March 27, 2012

Login failed for NT AUTHORITY\NETWORK SERVICE on a ASP.Net app

Hi,

Transferred a working ASP.Net app and database to a new machine and domain.

The app should be running as the local aspnet account (<processModel
userName="machine" password="AutoGenerate" .... /> in machine.config)

The connection string is "packet size=4096;Integrated Security=SSPI;data
source=(local); persist security info=False;initial catalog=mydb"

the newmachine\ASPNET account has a login on SQL Server, and is a user on
mydb, and is in the group db_owner.

Can someone help me get this working?

Thanks
MartinHi Martin:

Did you move from a 2000/XP machine to a 2003 machine? If so, ASP.NET
now runs under the BUILTIN\NETWORK SERVICE account instead of the
ASPNET account - you'll have to adjust the SQL login accordingly.

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 16:13:51 +0100, "Martin" <x@.y.z> wrote:

>Hi,
>Transferred a working ASP.Net app and database to a new machine and domain.
>The app should be running as the local aspnet account (<processModel
>userName="machine" password="AutoGenerate" .... /> in machine.config)
>The connection string is "packet size=4096;Integrated Security=SSPI;data
>source=(local); persist security info=False;initial catalog=mydb"
>the newmachine\ASPNET account has a login on SQL Server, and is a user on
>mydb, and is in the group db_owner.
>Can someone help me get this working?
>Thanks
>Martin
Hi Scott,

Yes, that is exactly my scenario.

However, I have also made the group newmachine\IIS_WPG as a sql login, and
made it a user of mydb and put it in role db_owner.

newmachine\IIS_WPG has NETWORK SERVICE as member already.

Any other thoughts?

Much appreciated
Martin

"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:ddi9i058fegfej0ithvsb3qe60oj0nbq22@.4ax.com...
> Hi Martin:
> Did you move from a 2000/XP machine to a 2003 machine? If so, ASP.NET
> now runs under the BUILTIN\NETWORK SERVICE account instead of the
> ASPNET account - you'll have to adjust the SQL login accordingly.
> HTH,
> --
> Scott
> http://www.OdeToCode.com
> On Thu, 19 Aug 2004 16:13:51 +0100, "Martin" <x@.y.z> wrote:
> >Hi,
> >Transferred a working ASP.Net app and database to a new machine and
domain.
> >The app should be running as the local aspnet account (<processModel
> >userName="machine" password="AutoGenerate" .... /> in machine.config)
> >The connection string is "packet size=4096;Integrated Security=SSPI;data
> >source=(local); persist security info=False;initial catalog=mydb"
> >the newmachine\ASPNET account has a login on SQL Server, and is a user on
> >mydb, and is in the group db_owner.
> >Can someone help me get this working?
> >Thanks
> >Martin
Got it working by adding the NETWORK SERVICE account directly, not just as
part of the IIS_WPG group.

I wonder why that was necessary.

Thanks again
Martin

"Martin" <x@.y.z> wrote in message
news:%23w5dTSghEHA.556@.TK2MSFTNGP10.phx.gbl...
> Hi Scott,
> Yes, that is exactly my scenario.
> However, I have also made the group newmachine\IIS_WPG as a sql login, and
> made it a user of mydb and put it in role db_owner.
> newmachine\IIS_WPG has NETWORK SERVICE as member already.
> Any other thoughts?
> Much appreciated
> Martin
> "Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
> news:ddi9i058fegfej0ithvsb3qe60oj0nbq22@.4ax.com...
> > Hi Martin:
> > Did you move from a 2000/XP machine to a 2003 machine? If so, ASP.NET
> > now runs under the BUILTIN\NETWORK SERVICE account instead of the
> > ASPNET account - you'll have to adjust the SQL login accordingly.
> > HTH,
> > --
> > Scott
> > http://www.OdeToCode.com
> > On Thu, 19 Aug 2004 16:13:51 +0100, "Martin" <x@.y.z> wrote:
> > >Hi,
> > > >Transferred a working ASP.Net app and database to a new machine and
> domain.
> > > >The app should be running as the local aspnet account (<processModel
> > >userName="machine" password="AutoGenerate" .... /> in machine.config)
> > > >The connection string is "packet size=4096;Integrated
Security=SSPI;data
> > >source=(local); persist security info=False;initial catalog=mydb"
> > > >the newmachine\ASPNET account has a login on SQL Server, and is a user
on
> > >mydb, and is in the group db_owner.
> > > >Can someone help me get this working?
> > > >Thanks
> > >Martin
> >
Hi Martin:

Glad you have everything working.

I've added IIS_WPG as a SQL Login and have had things working, I'm not
sure what problem you ran into there.

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 16:57:14 +0100, "Martin" <x@.y.z> wrote:

>Got it working by adding the NETWORK SERVICE account directly, not just as
>part of the IIS_WPG group.
>I wonder why that was necessary.
>Thanks again
>Martin
Okay Scott,

I'll bare that in mind. Thanks alot for your help on this one.

Martin

"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:dqk9i0hl3jou0kjb0gpp81qgecuihjvv1h@.4ax.com...
> Hi Martin:
> Glad you have everything working.
> I've added IIS_WPG as a SQL Login and have had things working, I'm not
> sure what problem you ran into there.
> --
> Scott
> http://www.OdeToCode.com
> On Thu, 19 Aug 2004 16:57:14 +0100, "Martin" <x@.y.z> wrote:
> >Got it working by adding the NETWORK SERVICE account directly, not just
as
> >part of the IIS_WPG group.
> >I wonder why that was necessary.
> >Thanks again
> >Martin

0 comments:

Post a Comment