Showing posts with label service. Show all posts
Showing posts with label service. Show all posts

Monday, March 26, 2012

Permitted Host Problem

I have Reporting Service up and running and able to send email of the
reports. I have a request from a client to set their system up so that
reports are email to approved recipients. I have the DefaultHost
(called DomainA) to the local SMTP domain, and have put in a domain in
the PermittedHost (called DomainB), in the config file. When I send a
report the the permitted DomainB, works fine. When I send same report
to DomainC, (which is not a permitted host) and that report gets
delivered also. I would think that since it was not a permitted host
the report should have not been sent. Am I missing a configuration? If
there were multiple hosts to permit, would they be separated with a
comma(,) or semicolon (;)?
The SMTP server has been setup to relay to a Smart Host for delivery.
Below is my email configuration. I show the current setup and I also
have show a 2nd setup that I have tried, but get the same results.
<Extension Name="Report Server Email"
Type="Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider,ReportingServicesEmailDeliveryProvider">
<MaxRetries>3</MaxRetries>
<SecondsBeforeRetry>900</SecondsBeforeRetry>
<Configuration>
<RSEmailDPConfiguration>
<SMTPServer>Relay Server</SMTPServer> Current Setup
#** <SMTPServer>localhost</SMTPServer> Have also tried Setup #2
<SMTPServerPort></SMTPServerPort>
<SMTPAccountName></SMTPAccountName>
<SMTPConnectionTimeout></SMTPConnectionTimeout>
<SMTPServerPickupDirectory></SMTPServerPickupDirectory> Current Setup
#**
<SMTPServerPickupDirectory>c:\inetpub\mailroot\Pickup</SMTPServerPickupDirectory>
Have also tried Setup #2
<SMTPUseSSL></SMTPUseSSL>
<SendUsing></SendUsing> Current Setup
#** <SendUsing>1</SendUsing> Have also tried Setup #2
<SMTPAuthenticate></SMTPAuthenticate>
<From>Server@.DomainA.com</From>
<EmbeddedRenderFormats>
<RenderingExtension>MHTML</RenderingExtension>
</EmbeddedRenderFormats>
<PrivilegedUserRenderFormats></PrivilegedUserRenderFormats>
<ExcludedRenderFormats>
<RenderingExtension>HTMLOWC</RenderingExtension>
<RenderingExtension>NULL</RenderingExtension>
</ExcludedRenderFormats>
<SendEmailToUserAlias>True</SendEmailToUserAlias>
<DefaultHostName>DomainA</DefaultHostName>
<PermittedHosts>DomainB.com</PermittedHosts>
</RSEmailDPConfiguration>
</Configuration>
Server Information (This is a development server, so everything is
installed):
W2K3 w/IIS and SMTP
SQL 2000 SP3a
SQL Reporting SP2
If you need more information, please let me know.
Thanks in Advance for any help,
Zing1atuWe are investigating whether PermittedHost is still working. If it is a bug
and this is essential functionality for you, you will have to request a
hotfix through product support.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Zing1atU" <gsnyder5@.csc.com> wrote in message
news:1115734700.870300.288860@.o13g2000cwo.googlegroups.com...
>I have Reporting Service up and running and able to send email of the
> reports. I have a request from a client to set their system up so that
> reports are email to approved recipients. I have the DefaultHost
> (called DomainA) to the local SMTP domain, and have put in a domain in
> the PermittedHost (called DomainB), in the config file. When I send a
> report the the permitted DomainB, works fine. When I send same report
> to DomainC, (which is not a permitted host) and that report gets
> delivered also. I would think that since it was not a permitted host
> the report should have not been sent. Am I missing a configuration? If
> there were multiple hosts to permit, would they be separated with a
> comma(,) or semicolon (;)?
> The SMTP server has been setup to relay to a Smart Host for delivery.
> Below is my email configuration. I show the current setup and I also
> have show a 2nd setup that I have tried, but get the same results.
> <Extension Name="Report Server Email"
> Type="Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider,ReportingServicesEmailDeliveryProvider">
> <MaxRetries>3</MaxRetries>
> <SecondsBeforeRetry>900</SecondsBeforeRetry>
> <Configuration>
> <RSEmailDPConfiguration>
> <SMTPServer>Relay Server</SMTPServer> Current Setup
> #** <SMTPServer>localhost</SMTPServer> Have also tried Setup #2
> <SMTPServerPort></SMTPServerPort>
> <SMTPAccountName></SMTPAccountName>
> <SMTPConnectionTimeout></SMTPConnectionTimeout>
> <SMTPServerPickupDirectory></SMTPServerPickupDirectory> Current Setup
> #**
> <SMTPServerPickupDirectory>c:\inetpub\mailroot\Pickup</SMTPServerPickupDirectory>
> Have also tried Setup #2
> <SMTPUseSSL></SMTPUseSSL>
> <SendUsing></SendUsing> Current Setup
> #** <SendUsing>1</SendUsing> Have also tried Setup #2
> <SMTPAuthenticate></SMTPAuthenticate>
> <From>Server@.DomainA.com</From>
> <EmbeddedRenderFormats>
> <RenderingExtension>MHTML</RenderingExtension>
> </EmbeddedRenderFormats>
> <PrivilegedUserRenderFormats></PrivilegedUserRenderFormats>
> <ExcludedRenderFormats>
> <RenderingExtension>HTMLOWC</RenderingExtension>
> <RenderingExtension>NULL</RenderingExtension>
> </ExcludedRenderFormats>
> <SendEmailToUserAlias>True</SendEmailToUserAlias>
> <DefaultHostName>DomainA</DefaultHostName>
> <PermittedHosts>DomainB.com</PermittedHosts>
> </RSEmailDPConfiguration>
> </Configuration>
> Server Information (This is a development server, so everything is
> installed):
> W2K3 w/IIS and SMTP
> SQL 2000 SP3a
> SQL Reporting SP2
> If you need more information, please let me know.
> Thanks in Advance for any help,
> Zing1atu
>|||Stayed on top of this with Microsoft. Results were that you need to add
a little more to the Permitted Host section to make it work. The
following is what needed to be added:
<SendEmailToUserAlias>False</SendEmailToUserAlias>
<PermittedHosts>
<HostName>domain.com</HostName>
</PermittedHosts>
After making these changes, was successfully able to send to the host
name allowed and any other host name brought up an error, that the
named host was not permitted.
Hopefully, this will be documented a little better in the next release
of On-line documentation.

Permissions within groups

Running SQL Server 2000 under Windows 2003 server. All
updates and service packs applied. Using Windows
Authentication via group membership. No individual users
are defined in SQL Server. Some users can update tables,
while other users in the same group cannot (permission
denied).
I'm baffled...These people are probably members of another group that has been denied
those rights. Remember that permissions are cumulative except that deny
trumps...
"Jay Varner" <dimsjay@.dims-vote.com> wrote in message
news:e55901c3f0e8$da00f2c0$a301280a@.phx.gbl...
> Running SQL Server 2000 under Windows 2003 server. All
> updates and service packs applied. Using Windows
> Authentication via group membership. No individual users
> are defined in SQL Server. Some users can update tables,
> while other users in the same group cannot (permission
> denied).
> I'm baffled...|||Try comparing users that can update vs those that can't using gpresult.
321709 HOW TO: Use the Group Policy Results Tool in Windows 2000
http://support.microsoft.com/?id=321709
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||I appreciate your quick reply, Don, but am not sure I expressed the
problem sufficiently.
Using Active Directory in W2K3 server, we defined specific user groups
for each of three domains that need to access the database. Each user
appears in only one group. All of these groups have been added to SQL
Server, and all have the same rights to the database(s). The problem
seems to occur for several people in each group, and does not seem to be
related to any permissions they are allowed on the domain. For
instance, in one of the groups, one user is a standard DOMAIN USER in
Windows, and he is able to perform updates to any of the tables in the
database; another user is a DOMAIN ADMIN who belongs to the same group,
but he is denied access to perform updates.
If we assign the group SYSTEM ADMINISTRATOR priveleges on the database,
it seems to resolve the problem, but thats not an acceptable resolution
for this large office.
If we assign each individual user (rather than the groups) to SQL, the
problem goes away. Again, this is a large office, and they would like
to avoid the additional overhead of having to add each new user to both
Windows and SQL Server.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Permissions used to Connect to SSIS on remote machine

We are trying to take advantage of the new Security Context for SSIS but users are unable to connect remotely to the SSIS Service unless they have been added to the Administrators Users Group on the server. I have tried adding them to Guests, Power Users, Remote Desktop Users, Users and SQLServer2005DTSUser$machine but the user is unable to connect.

The message received when the user is unable to connect is:

Cannot connect to 192.x.x.x
Additional Information
-> Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
-> Connect to SSIS Service on machine "192.x.x.x" failed:
Access is denied

What is the list of permissions and privileges that a user that does not belong to the server's Administrator group and have sysadmin server role, must have to allow them to create and run a package through SSIS.

i have the same issue. i am able to connect to the local integration services. but when i try to access another servers integration services Access is denied. what permissions are needed?

aaks

|||Try these instructions: http://sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx|||

You have to perform these steps in addition to the one's specified above.

http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!213.entry

Permissions used to Connect to SSIS on remote machine

We are trying to take advantage of the new Security Context for SSIS but users are unable to connect remotely to the SSIS Service unless they have been added to the Administrators Users Group on the server. I have tried adding them to Guests, Power Users, Remote Desktop Users, Users and SQLServer2005DTSUser$machine but the user is unable to connect.

The message received when the user is unable to connect is:

Cannot connect to 192.x.x.x
Additional Information
-> Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
-> Connect to SSIS Service on machine "192.x.x.x" failed:
Access is denied

What is the list of permissions and privileges that a user that does not belong to the server's Administrator group and have sysadmin server role, must have to allow them to create and run a package through SSIS.

i have the same issue. i am able to connect to the local integration services. but when i try to access another servers integration services Access is denied. what permissions are needed?

aaks

|||Try these instructions: http://sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx|||

You have to perform these steps in addition to the one's specified above.

http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!213.entry

Friday, March 23, 2012

Permissions to a local account on which SQL Server service works

My SQL Server 2005 runs on a local account. Is it neccesary to assign this login in SQL to a System Administrator role?

And is there any difference in SQL Server 2000?

thanks

Przemo

If you have used SQL Server Configuration Manager to set the service account, you don't need to do anything. The same thing goes for SQL Server 2000, if you have used Enterprise Manager to change the service account. You should avoid changing the service account manually and use instead Configuration/Enterprise Manager.

Thanks
Laurentiu

sql

Tuesday, March 20, 2012

permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are ins

I am trying to read the WebServices to gather information about the catalog.
When I run the application from my development box and reading from the
Reporting Services server for the Catalog all run fine.
But when I transfer the application (asp.net) to the server it fails with:
System.Web.Services.Protocols.SoapException: The permissions granted to user
'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this
operation. -->
Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The
permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient
for performing this operation. at
Microsoft.ReportingServices.Library.RSService.ListChildren(String item,
Boolean recursive) at
Microsoft.ReportingServices.WebServer.ReportingService.ListChildren(String
Item, Boolean Recursive, CatalogItem[]& CatalogItems) -- End of inner
exception stack trace -- at
Microsoft.ReportingServices.WebServer.ReportingService.ListChildren(String
Item, Boolean Recursive, CatalogItem[]& CatalogItems)
The code is quite simple:
VB.NET
Dim rService As ReportingService = New ReportingService
rService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim catalogItems As CatalogItem()
catalogItems = rService.ListChildren(Global.ReportPath, True)
C#.NET
ReportingService rService = new ReportingService();
rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[][0] catalogItems;
catalogItems = rService.ListChildren(Global.ReportPath, true);
--
Regards
<<<Bryan Avery>>Found the problem to be with web.config file.
Adding the following line under
<authentication mode="Windows" />
<identity impersonate="true" />
And it all springs in to life
--
Regards
<<<Bryan Avery>>
"Bryan Avery" wrote:
> I am trying to read the WebServices to gather information about the catalog.
> When I run the application from my development box and reading from the
> Reporting Services server for the Catalog all run fine.
> But when I transfer the application (asp.net) to the server it fails with:
> System.Web.Services.Protocols.SoapException: The permissions granted to user
> 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this
> operation. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The
> permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient
> for performing this operation. at
> Microsoft.ReportingServices.Library.RSService.ListChildren(String item,
> Boolean recursive) at
> Microsoft.ReportingServices.WebServer.ReportingService.ListChildren(String
> Item, Boolean Recursive, CatalogItem[]& CatalogItems) -- End of inner
> exception stack trace -- at
> Microsoft.ReportingServices.WebServer.ReportingService.ListChildren(String
> Item, Boolean Recursive, CatalogItem[]& CatalogItems)
> The code is quite simple:
> VB.NET
> Dim rService As ReportingService = New ReportingService
> rService.Credentials => System.Net.CredentialCache.DefaultCredentials
> Dim catalogItems As CatalogItem()
> catalogItems = rService.ListChildren(Global.ReportPath, True)
> C#.NET
> ReportingService rService = new ReportingService();
> rService.Credentials => System.Net.CredentialCache.DefaultCredentials;
> CatalogItem[][0] catalogItems;
> catalogItems = rService.ListChildren(Global.ReportPath, true);
> --
> Regards
> <<<Bryan Avery>>

Permissions for SSAS Service Account?

Hi All,

Please help with this.

I'm running a server with Windows Server 2003 R2 Enterprise x64 Edition.

On the box I've performed one named instance installation of SSAS.

I've installed SP1 as well.

There's no firewall running on the machine.

My domain account is in the SSAS Server role.

SSAS Service is running according to SQL Configuration Manager

SQL Browser Service is running according to SQL Configuration Manager

If I run both SSAS and SQL Browser under Local System, everything works OK. But this is not the way I want it, because it's not safe and SSAS is unable to read data from the remote SQL box.

If I change the service account to a domain user account, I can't connect to SSAs anymore. The error message is:


TITLE: Microsoft SQL Server Management Studio

A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

I've both set the logon account at setup, using SQL Config Mgr and Service Manager.

Using PortQry I can see nothing's listening on port 2382.

It should work. I'm beginning to think this user account doesn't have sufficient rights.

So I've created two local accounts and used these as service accounts. Same thing, untill I added both accounts to the local administrators group, then everything worked fine again.

What am I doing wrong here? Your suggestions are much appreciated.

Thanks,

Coen

Hello. You have another configuration that you do not mention: "Surface area"

You will have to allow remote connections in this configuration tool. That is for each SQL Server 2005 service that you are using.

HTH

Thomas Ivarsson

|||

Couple of things.

One. Make sure you use SQL Configuration Manager to change serivce logon account for both SQL Browser and for Analysis Server.

Second. Take a look at the connectivity troubleshooting guide http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

The Surface Afrea Conf tool returns the following error:

TITLE: Surface Area Configuration

A connection cannot be made. Ensure that the server is running. (Microsoft.AnalysisServices)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

|||

I am using the SQL Config Mgr to change the user id's. BTW this is sometimes a bit crooked, and I still need to change the Service Account in the Service Manager as well.

Besides, I don't really think the problem's in there. Setup should set the correct permissions for the Logon Account.

Thanks for pointing me to your post on SQLJunkies. I've used it before.

|||I've narrowed it don a bit. It seems only the Service Account used for SQL browser has to be in the Local Admins group.

Permissions for SSAS Service Account?

Hi All,

Please help with this.

I'm running a server with Windows Server 2003 R2 Enterprise x64 Edition.

On the box I've performed one named instance installation of SSAS.

I've installed SP1 as well.

There's no firewall running on the machine.

My domain account is in the SSAS Server role.

SSAS Service is running according to SQL Configuration Manager

SQL Browser Service is running according to SQL Configuration Manager

If I run both SSAS and SQL Browser under Local System, everything works OK. But this is not the way I want it, because it's not safe and SSAS is unable to read data from the remote SQL box.

If I change the service account to a domain user account, I can't connect to SSAs anymore. The error message is:


TITLE: Microsoft SQL Server Management Studio

A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

I've both set the logon account at setup, using SQL Config Mgr and Service Manager.

Using PortQry I can see nothing's listening on port 2382.

It should work. I'm beginning to think this user account doesn't have sufficient rights.

So I've created two local accounts and used these as service accounts. Same thing, untill I added both accounts to the local administrators group, then everything worked fine again.

What am I doing wrong here? Your suggestions are much appreciated.

Thanks,

Coen

Hello. You have another configuration that you do not mention: "Surface area"

You will have to allow remote connections in this configuration tool. That is for each SQL Server 2005 service that you are using.

HTH

Thomas Ivarsson

|||

Couple of things.

One. Make sure you use SQL Configuration Manager to change serivce logon account for both SQL Browser and for Analysis Server.

Second. Take a look at the connectivity troubleshooting guide http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

The Surface Afrea Conf tool returns the following error:

TITLE: Surface Area Configuration

A connection cannot be made. Ensure that the server is running. (Microsoft.AnalysisServices)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

|||

I am using the SQL Config Mgr to change the user id's. BTW this is sometimes a bit crooked, and I still need to change the Service Account in the Service Manager as well.

Besides, I don't really think the problem's in there. Setup should set the correct permissions for the Logon Account.

Thanks for pointing me to your post on SQLJunkies. I've used it before.

|||I've narrowed it don a bit. It seems only the Service Account used for SQL browser has to be in the Local Admins group.

Monday, March 12, 2012

permissions for drive where data is

Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.

permissions for drive where data is

Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
Dan D.
I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
Dan D.
"Dan D." wrote:

> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
|||I ran the reattachment again and it was okay.
Dan D.
"Dan D." wrote:

> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.

permissions for drive where data is

Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like thes
e:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:

> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:

> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.

Friday, March 9, 2012

Permissions

The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are
insufficient for performing this operation
I am getting this error when I have installed my asp.net application on the
server, it runs fine on my development box, here is the code that is running:
Dim rService As ReportingService = New ReportingService
rService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim catalogItems As CatalogItem()
catalogItems = rService.ListChildren("/", True)
And it's falling over on the last line, anyone got any ideas?
--
Regards
<<<Bryan Avery>>Have your asp.net application run under different credentials. You can set
these for services on the Log On tab for the services property.
"Bryan Avery" wrote:
> The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are
> insufficient for performing this operation
> I am getting this error when I have installed my asp.net application on the
> server, it runs fine on my development box, here is the code that is running:
> Dim rService As ReportingService = New ReportingService
> rService.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim catalogItems As CatalogItem()
> catalogItems = rService.ListChildren("/", True)
> And it's falling over on the last line, anyone got any ideas?
> --
> Regards
> <<<Bryan Avery>>|||Hi,
I'm a little unsure what you mean by setting different credentials for the
application, where and how do you set them?
--
Regards
<<<Bryan Avery>>
"Harolds" wrote:
> Have your asp.net application run under different credentials. You can set
> these for services on the Log On tab for the services property.
> "Bryan Avery" wrote:
> > The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are
> > insufficient for performing this operation
> >
> > I am getting this error when I have installed my asp.net application on the
> > server, it runs fine on my development box, here is the code that is running:
> >
> > Dim rService As ReportingService = New ReportingService
> > rService.Credentials = System.Net.CredentialCache.DefaultCredentials
> > Dim catalogItems As CatalogItem()
> > catalogItems = rService.ListChildren("/", True)
> >
> > And it's falling over on the last line, anyone got any ideas?
> >
> > --
> > Regards
> >
> > <<<Bryan Avery>>|||Found the problem to be with web.config file.
Adding the following line under
<authentication mode="Windows" />
<identity impersonate="true" />
And it all springs in to life
--
Regards
<<<Bryan Avery>>
"Bryan Avery" wrote:
> Hi,
> I'm a little unsure what you mean by setting different credentials for the
> application, where and how do you set them?
> --
> Regards
> <<<Bryan Avery>>
>
> "Harolds" wrote:
> > Have your asp.net application run under different credentials. You can set
> > these for services on the Log On tab for the services property.
> >
> > "Bryan Avery" wrote:
> >
> > > The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are
> > > insufficient for performing this operation
> > >
> > > I am getting this error when I have installed my asp.net application on the
> > > server, it runs fine on my development box, here is the code that is running:
> > >
> > > Dim rService As ReportingService = New ReportingService
> > > rService.Credentials = System.Net.CredentialCache.DefaultCredentials
> > > Dim catalogItems As CatalogItem()
> > > catalogItems = rService.ListChildren("/", True)
> > >
> > > And it's falling over on the last line, anyone got any ideas?
> > >
> > > --
> > > Regards
> > >
> > > <<<Bryan Avery>>

Saturday, February 25, 2012

Permission problem

Windows 2000 server, service pack 4, RAID 5 array, 2Gb RAM, SQL server 2000.

.Net framework 1.1 installed and runs happily UNTIL you try to access anything to do with data.

I've got a c# page, imported all relevent namespaces etc. This runs fine on other servers and my XP Pro machine. However, when put on this server, all I get is

Exception Details: System.UnauthorizedAccessException: Access is denied.

I've tried explictly setting permissions on the file, directory etc, but nothing I've found can get the file to work, yet other c# pages which don't use SQL connections work fine !

The offending line:

Line 31: SqlCommand sqlCmd = new SqlCommand(sql,sqlCon);
Line 32: sqlCon.Open();
Line 33: SqlDataReader datareader = sqlCmd.ExecuteReader();
Line 34: while (datareader.Read()

is line 32.

STACK TRACE:

[UnauthorizedAccessException: Access is denied.]
System.EnterpriseServices.Platform.Initialize() +497
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +356
System.Data.SqlClient.SqlConnection.Open() +384
ASP.test_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\fishfood\test.aspx:32
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

I've copied this directory and set up another application on another server and it works fine!

Anyone got any ideas?What does your Connection string look like. Is it set up with the correct:

SERVER
PWD
UID
DATABASE

..for this particular server. You haven't by any chance forgotton to change it when deploying your application to server?|||Connection string is fine;

Persist Security Info=False;Data Source=x.x.x.x;Initial Catalog=xxxxxx;User ID=xxxxxx;Password=xxxxxx;"

I tried harding it into the page and using it in the web.config file - makes no difference|||I'm having this exact same problem (except in VB, instead of C#). On my development PC, I'm running W2K Pro, IIS 5, SQL2K Personal Edition, .net Framework v1.1 and I get the error below. But I can execute that exact same page on 2 different remote servers. One is W2K Server with IIS 5 and SQL2K Standard with .net framework v1.1. The other is a W2K3 server with IIS 6 and SQL2K Standard with .net framework v1.1.

Each SQL Server is running in Mixed mode. I'm using the same sql login username/password combo for each of them. Impersonate is set to false in my web.config file.

Here's my error:

Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

Line 66: cnn = New SqlConnection("data source=BFRENCH2K;initial catalog=PMD;user id=xxxxxx;password=xxxxxx;")
Line 67: cmd = New SqlCommand("Select * from Admin_Users where Username = '" & Username & "'", cnn)
Line 68: cnn.Open()
Line 69: dr = cmd.ExecuteReader()
Line 70: While (dr.Read())

Source File: C:\Inetpub\wwwroot\SiteDoc\Login.aspx.vb Line: 68

Stack Trace:

[UnauthorizedAccessException: Access is denied.]
System.EnterpriseServices.Platform.Initialize() +497
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
SiteDoc.Login.ValidateUser(String Username, String Password) in C:\Inetpub\wwwroot\SiteDoc\Login.aspx.vb:68
SiteDoc.Login.btnLogin_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\SiteDoc\Login.aspx.vb:49
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1266|||I located an article that had a solution for my problem.

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20850586.html

Check to make sure that the following file has permissions on the ASPNET account:

C:\winnt\system32\com\comadmin.dll

I gave the aspnet account permission to read that file and everything works fine now.|||Thank you
It has solved my Problem.
I was having the same problem.
It was working fine on my machine but when I deployed the project and database to Live server it was giving the error.|||None of the solutions above worked for me.
Instead, I've changed the security settings for the windows account (machine_name\users) to Full Control and grant access to the folder. Obviously the permissions were changed for that folder only.

My asp.net utility is an upload tool and all files uploaded stores themselves into it. Folder is named /imgs/.

I realized today (just today !) of this problem. Last days my webapp worked fine, but I don't know what happened. Maybe some new software just installed, maybe some strange Windows behavior, maybe...??
I think this solution is not secure, because everybody have access to that folder, am I wrong ?
Hope this work, because none of the solutions here, neither in other websites worked.
Sorry for my strange english.
Bye.