Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Friday, March 30, 2012

Login failed for user NT AUTHORITY\NETWORK SERVICE

I cant seem to deploy a DB to my server. Can anyone actually help with this? I have been goint through lots of different things to get it to work...

So far I have added the network service account to SQL Express 2005 through the express managment console I have also given NETWORK SERVICE explicit permissions on the database files themselves.

It works great on my dev box. I'm able to login and access my secondary DB but when i try to push the site to my server this is what happens. Any help on this is great -- if you need me to post any more of my code -- no problem

This is my exact error:

SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]

My web.config file looks like:

<!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --><configuration><appSettings/><connectionStrings> <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\igx-ma.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings><system.web><!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. Visual Basic options: Set strict="true" to disallow all data type conversions where data loss can occur. Set explicit="true" to force declaration of all variables. --> <identity impersonate="true"/> <authentication mode="Forms" /> <authorization> <deny users="?" /> <allow users="*" /> </authorization> <roleManager enabled="true" /> <compilation debug="true" strict="false" explicit="true"/><pages><namespaces><clear/><add namespace="System"/><add namespace="System.Collections"/><add namespace="System.Collections.Specialized"/><add namespace="System.Configuration"/><add namespace="System.Text"/><add namespace="System.Text.RegularExpressions"/><add namespace="System.Web"/><add namespace="System.Web.Caching"/><add namespace="System.Web.SessionState"/><add namespace="System.Web.Security"/><add namespace="System.Web.Profile"/><add namespace="System.Web.UI"/><add namespace="System.Web.UI.WebControls"/><add namespace="System.Web.UI.WebControls.WebParts"/><add namespace="System.Web.UI.HtmlControls"/></namespaces></pages><!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> <membership> <providers> <remove name="AspNetSqlMembershipProvider"/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /> </providers> </membership></system.web></configuration>

Network Service permission on your computer is different than network service on the server machine. You have given your machine's network service user permission but not given the server machine's network service user permission. Please go over to the server machine and give network permission from that machine.

|||

I should note that all things that I have tried have been from and for the server. My development work station has worked correctly from the begining.

I have only made changes on my server.

|||

Any one else have any advice on this?

|||

Hi swiil,

but when i try to push the site to my server this is what happens......

After you have put your site to the sever, does your database reside in the same machine as your application?

Also, please verify the suggestiongatehyperion gave you. thanks

|||

The database does reside on the same machine as IIS and the application.

I added the specific user NT AUTHORITY\ NETWORK SERVICE to the server both through SSMSE and on the file itself. When I try to attach the database through SSMSE I get an error that the file is in use but I can't figure out by what.

I have also tried opening up remote connections through the Surface Area Configuration tool.


Chris

|||

The resolution:

I stopped IIS -

deleted the db files from the server

re-copy the db files from my dev machine

attach them using SSMSE then attach the IIS user as well as NETWORK SERVICE user to the db directly.

Set those users as DB owners in SSMSE.

After that had to remove the line from my web config that said identity impersonate = true

Detached the DB's started IIS and everything worked as promised.

I Hope this helps someone!

Monday, March 19, 2012

Login Failed - XP Home Edtion accessing SQL Server

Hi All.
I have an application (VB 6) that access a database in a SQL Server.
But, I cant access the database when I try to run the application using
XP Home Edtion, even logging in domain (by "map network drives).
I can access the shares in SQL server normally, but when I run the
application appears the error window attached.
Any idea?
Tks in advance
Dan Pinhiero
Rio de Janeiro - Brasil
You might try the connection string below ('User Id' omitted):
"Provider=SQLOLEDB;Data Source=SERV_MT207\DROGASM1;Initial
Catalog=master;Integrated Security=SSPI;Application
Name=CallCenter;Pooling=True"
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Pinheiro" <dan_pinheirorj@.hotmail.com> wrote in message
news:uqOKXEWHEHA.3820@.tk2msftngp13.phx.gbl...
> Hi All.
> I have an application (VB 6) that access a database in a SQL Server.
> But, I cant access the database when I try to run the application using
> XP Home Edtion, even logging in domain (by "map network drives).
> I can access the shares in SQL server normally, but when I run the
> application appears the error window attached.
> Any idea?
> Tks in advance
> Dan Pinhiero
> Rio de Janeiro - Brasil
>

|||Dan Guzman escreveu:

> You might try the connection string below ('User Id' omitted):
> "Provider=SQLOLEDB;Data Source=SERV_MT207\DROGASM1;Initial
> Catalog=master;Integrated Security=SSPI;Application
> Name=CallCenter;Pooling=True"
>
Hi Dan, thanks for your help, but the application needs the "user id",
due permissions settings. Is there some way to bypass this problem
changing the role/security settings?
Best Regards
Dan Pinheiro
Rio de Janeiro - Brasil.
|||If you want to connect using standard SQL Security, you can specify both
UserId and Password in the connection string and omit the Integrated
Security keyword. Your server will need to be configured to allow both
Windows and SQL authentication.
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Pinheiro" <dan_pinheirorj@.hotmail.com> wrote in message
news:exOROLXHEHA.3144@.TK2MSFTNGP10.phx.gbl...
> Dan Guzman escreveu:
>
> Hi Dan, thanks for your help, but the application needs the "user id",
> due permissions settings. Is there some way to bypass this problem
> changing the role/security settings?
> Best Regards
> Dan Pinheiro
> Rio de Janeiro - Brasil.
>

Login Failed - XP Home Edtion accessing SQL Server

Hi All.
I have an application (VB 6) that access a database in a SQL Server.
But, I cant access the database when I try to run the application using
XP Home Edtion, even logging in domain (by "map network drives).
I can access the shares in SQL server normally, but when I run the
application appears the error window attached.
Any idea?
Tks in advance
Dan Pinhiero
Rio de Janeiro - BrasilYou might try the connection string below ('User Id' omitted):
"Provider=SQLOLEDB;Data Source=SERV_MT207\DROGASM1;Initial
Catalog=master;Integrated Security=SSPI;Application
Name=CallCenter;Pooling=True"
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Pinheiro" <dan_pinheirorj@.hotmail.com> wrote in message
news:uqOKXEWHEHA.3820@.tk2msftngp13.phx.gbl...
> Hi All.
> I have an application (VB 6) that access a database in a SQL Server.
> But, I cant access the database when I try to run the application using
> XP Home Edtion, even logging in domain (by "map network drives).
> I can access the shares in SQL server normally, but when I run the
> application appears the error window attached.
> Any idea?
> Tks in advance
> Dan Pinhiero
> Rio de Janeiro - Brasil
>
----
--|||Dan Guzman escreveu:

> You might try the connection string below ('User Id' omitted):
> "Provider=SQLOLEDB;Data Source=SERV_MT207\DROGASM1;Initial
> Catalog=master;Integrated Security=SSPI;Application
> Name=CallCenter;Pooling=True"
>
Hi Dan, thanks for your help, but the application needs the "user id",
due permissions settings. Is there some way to bypass this problem
changing the role/security settings?
Best Regards
Dan Pinheiro
Rio de Janeiro - Brasil.|||If you want to connect using standard SQL Security, you can specify both
UserId and Password in the connection string and omit the Integrated
Security keyword. Your server will need to be configured to allow both
Windows and SQL authentication.
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Pinheiro" <dan_pinheirorj@.hotmail.com> wrote in message
news:exOROLXHEHA.3144@.TK2MSFTNGP10.phx.gbl...
> Dan Guzman escreveu:
>
> Hi Dan, thanks for your help, but the application needs the "user id",
> due permissions settings. Is there some way to bypass this problem
> changing the role/security settings?
> Best Regards
> Dan Pinheiro
> Rio de Janeiro - Brasil.
>

Login Failed - Accessing through XP Home Edition

Hi All.
I have an application (VB 6) that access a database in a SQL Server.
But, I cant access the database when I try to run the application using
XP Home Edtion, even logging in domain (by "map network drives).
I can access the shares in SQL server normally, but when I run the
application appears the error window attached.
Any idea?
Tks in advance
Dan Pinhiero
Rio de Janeiro - Brasil
The null in "login failed for user null" indicates that the domain
controller didn't send a valid, authenticated windows login to SQL Server.
There may be a problem with the DC (out of date, permissions, etc.) or with
something on the network. From the XP workstation you need to see if you
can get to other network resources on the domain without having to enter
credentials and fix it if you can't. You can also see what logonserver (DC)
that workstation is pointed to (run SET from a cmd prompt) and see if you
can point it to a different DC.
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, February 24, 2012

Logging: Can't disable Informational Events

I enabled Windows Events for OnError, OnTaskFailed, OnWarning for my package and subelements. However, even if no errors occur, I still get Informational Events generated even though those are disabled for all modules and packages.

Any way to disable Information Events? Is this an SSIS defect, or just an oddity of how it implements Windows Events?

Windows Event:
Source: SQLISPackage
Type: Information
Event ID: 12288
Description: Package "XXXXXX" started.

Event ID: 122289
Description: Package "XXXXXX" finished successfully.

faype02 wrote:

I enabled Windows Events for OnError, OnTaskFailed, OnWarning for my package and subelements. However, even if no errors occur, I still get Informational Events generated even though those are disabled for all modules and packages.

Any way to disable Information Events? Is this an SSIS defect, or just an oddity of how it implements Windows Events?

Windows Event:
Source: SQLISPackage
Type: Information
Event ID: 12288
Description: Package "XXXXXX" started.

Event ID: 122289
Description: Package "XXXXXX" finished successfully.

Oh yeah, I can reproduce that. Weird - I don't think those should be there.

[Microsoft follow-up] Is this a bug or by design?

-Jamie

|||

It appears that this is by design see:

http://www.microsoft.com/technet/prodtechnol/sql/2005/mgngssis.mspx

In section on "Custom Log Provider" it says:

"To facilitate operations management, SSIS packages always write some basic logging information to the Windows event log, even for packages that do not incorporate logging. SSIS packages write events for package initiation and package completion and they can be identified using either the SQLISPackage or SQLISService event sources."

It would be a lovely option to be able to disable this.

Regards

|||So if I have a package that executes every 30 seconds, I have no control over thousands of "package start" and "package finished" log events per day?

There must be a way to intercept these with an event handler in the package - how would this be done?