Showing posts with label reports. Show all posts
Showing posts with label reports. Show all posts

Friday, March 30, 2012

PF Usage

I have a SQL server 2005 box with 8 GB physical memory. The windows task
manager reports 7.4G PF Usage. Is this accurate?Hello,
It should be correct. But use the performance monitor to measure the correct
usage. Take a look int the below URL:-
http://msdn2.microsoft.com/en-us/library/ms176018.aspx
Thanks
Hari
"morphius" <morphius@.discussions.microsoft.com> wrote in message
news:55174532-F7F0-4EEC-8427-81C271DFF935@.microsoft.com...
>I have a SQL server 2005 box with 8 GB physical memory. The windows task
> manaer reports 7.4G PF Usage. Is this accurate?

Personalize Reports for Each User

Hello Everyone,

I am trying to personalze my reports for each user, for example: Say I have a report which takes in userName as a parameter and then generates the report. Is it possible to use the same userName that the user used to login to the reporting services enviornment. This way the user don't have to enter their userName to see the report, it will be entered by default.

Thanks a lot,

-Rohit

Try User!UserID.

|||

Thanks for the reply!!!

I am still not sure where to use this field.

My question again is:

When a user login to Reporting Services, he/she has to enter a domain UserName and domain Password. I want to know if it is possible to grab that userName and use it as a default value for my parameter.

Thanks again,

-Rohit

|||Thanks a lot man...this works!!!|||

Glad I could help.

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 when linking to reports

Hi,

I've adding a link from my web app to reports sitting on another box. However, that box is asking the user to login. How do I set the permissions to avoid it?Would like to help!
What OS are your "boxes" running ?
Are you using Active Directory?
Are your "boxes" on the same intranet ?
What security schema are you using with SQL connections?
Best Regards,

Permissions to run vb code

In one of my reports I’m using vb code that copies one file from a local disk to a server.

Like this:

Public Shared Function CopyFile(ByVal infile As String, ByVal outfile As String)

Dim fi As System.IO.FileInfo = New System.IO.FileInfo(infile)

fi.CopyTo(outfile, True)

End function

The report is executed using report services directly in a browser.

In the Visual Studio environment it works ok. In the browser I get an error. I’m sure it is a permissions problem.

Any pointers to set op permission for this rdl-file ?

/NHS

There is no way to elevate code permissions for a particular RDL.

Better way is to move this code into a separate assembly, grant permissions to that assembly and call it from the report.

Permissions to run vb code

In one of my reports I’m using vb code that copies one file from a local disk to a server.

Like this:

Public Shared Function CopyFile(ByVal infile As String, ByVal outfile As String)

Dim fi As System.IO.FileInfo = New System.IO.FileInfo(infile)

fi.CopyTo(outfile, True)

End function

The report is executed using report services directly in a browser.

In the Visual Studio environment it works ok. In the browser I get an error. I’m sure it is a permissions problem.

Any pointers to set op permission for this rdl-file ?

/NHS

There is no way to elevate code permissions for a particular RDL.

Better way is to move this code into a separate assembly, grant permissions to that assembly and call it from the report.

Friday, March 23, 2012

permissions to deploy to one folder

I have created a staging folder in reporting services. The idea is to allow
developers to deploy to this folder only in order to test their reports and
to then have the dba's move the reports to the users' area.
Is it possible to give the developer group rights to deploy to this staging
folder only?Yes, just click on the properties tab for the desired folder and then the
secrurities tab. From here you can set the permission how you like.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"DBA72" <DBA72@.discussions.microsoft.com> wrote in message
news:679A12F5-45D5-465F-9BE9-7F0166A69BD6@.microsoft.com...
>I have created a staging folder in reporting services. The idea is to allow
> developers to deploy to this folder only in order to test their reports
> and
> to then have the dba's move the reports to the users' area.
> Is it possible to give the developer group rights to deploy to this
> staging
> folder only?

Permissions to data source in Report Manager

I'm deploying some reports to a customer box and am having some quirks
in getting the right permissions to the data source. Instead of going
into detail about my specific problem (which I don't think I can even
give a good description of since I can't see what groups the accounts
I'm using are members of because I don't have access to their AD), can
someone give a list of the permissions required on an account in order
to access a data source? SQL permissions? Report Server permissions? If
I were to create an account purely for accessing the data source for
the reports, is there a complete checklist that I could follow to
ensure all the proper permissions?
Thanks.Oh, btw, I'm concerned about permissions to standard sql database
tables/views, and possibly OLAP cubes.
Thanks!|||Anybody?|||Bueller?
Bueller?
Bueller?|||All right, well I figured it out, at least for SQL Server access. I
guess all a domain account needs is public and db_datareader access to
the db you're getting data out of. Any ideas if it's pretty much the
same if trying to get data from an OLAP cube?|||What you are doing here is using the users account for accessing the
database. I think this is a mistake. First, it makes management of the users
more difficult. Now, every time there is a user that needs to run a report
you have to mess with DB access. Also, by doing this your RS will not be
able to take advantage of connection pooling (connection pooling only works
if everything is exactly the same, which includes the user). What I do is
have a special user that is used only for RS data access and is given
readonly rights to the data. I use RS roles to determine who gets to run
which reports.
The other thing I do is add domain groups and users to a local group on the
server and use that local group with RS roles.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Wannabe_Kiwi" <amkessel@.gmail.com> wrote in message
news:1150908395.063069.70970@.c74g2000cwc.googlegroups.com...
> All right, well I figured it out, at least for SQL Server access. I
> guess all a domain account needs is public and db_datareader access to
> the db you're getting data out of. Any ideas if it's pretty much the
> same if trying to get data from an OLAP cube?
>|||I'm using a single, special domain account to access all the data
sources for all the reports, not using a bunch of individual user
accounts.
I'm still stuck on getting access to the SQL Analysis OLAP cubes, tho.
I can easily set permissions for SQL databases in Enterprise Manager,
but there doesn't seem to be an equivalent in Analysis Manager. Ideas?

Wednesday, March 21, 2012

Permissions problem accessing external DLL through reports

Hi,
I'm having this wee problem when trying to view my report via the report
manager screen - I get the following error "Request for the permission of
type System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed"...This seems to be due to me trying to access a seperate DLL which in
turn accesses the database that I created for the reports for translation
purposes (I added the DLL to the References collection for each of the
reports). Any suggestions would be greatly appreciated.I am also tring to use an assembly to translate y i got the same message.
I already try to configure my rssvpolicy.config like:
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="XMLFile_MultiLang_Permission"
Name="MultiLangCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MultLang.dll"/>
</CodeGroup>
but i habe the same error.
Have you found out how to solve it ?
"Rowan Massey" wrote:
> Hi,
> I'm having this wee problem when trying to view my report via the report
> manager screen - I get the following error "Request for the permission of
> type System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
> failed"...This seems to be due to me trying to access a seperate DLL which in
> turn accesses the database that I created for the reports for translation
> purposes (I added the DLL to the References collection for each of the
> reports). Any suggestions would be greatly appreciated.sql

Permissions on views

Although I have granted select permissions on the views in my database that
are the recordesource for reports in a visual basic application, I cannot
open the reports from the application. I get the VB error 1005 ("can't open
recordset"). It would seem to be a permissions problem because everything
else in the app works fine except the reports that are based on views. I
haven't found anything in Books on Line that has solved the problem. The D
B
was developed in sql 2000 and the compatability level for this DB in sql 200
5
is 80. I'm grateful for any help.Pam
Make sure that you connect with the "right" user from application to run
reports.
Why do you have 80 compatibilty level for SQL Server 2005?
"Pam Davey" <PamDavey@.discussions.microsoft.com> wrote in message
news:16199EB3-EC0B-4A5E-B68F-1EEF73DDDF60@.microsoft.com...
> Although I have granted select permissions on the views in my database
> that
> are the recordesource for reports in a visual basic application, I cannot
> open the reports from the application. I get the VB error 1005 ("can't
> open
> recordset"). It would seem to be a permissions problem because everything
> else in the app works fine except the reports that are based on views. I
> haven't found anything in Books on Line that has solved the problem. The
> DB
> was developed in sql 2000 and the compatability level for this DB in sql
> 2005
> is 80. I'm grateful for any help.|||Hi!
Create view with view_metadata attribute.
Micle.
"Pam Davey" <PamDavey@.discussions.microsoft.com> wrote in message
news:16199EB3-EC0B-4A5E-B68F-1EEF73DDDF60@.microsoft.com...
> Although I have granted select permissions on the views in my database
> that
> are the recordesource for reports in a visual basic application, I cannot
> open the reports from the application. I get the VB error 1005 ("can't
> open
> recordset"). It would seem to be a permissions problem because everything
> else in the app works fine except the reports that are based on views. I
> haven't found anything in Books on Line that has solved the problem. The
> DB
> was developed in sql 2000 and the compatability level for this DB in sql
> 2005
> is 80. I'm grateful for any help.|||Hi Uri-
Thank you. I am connecting with the correct user. I have the database of
interset that resides on SQL Server 2005 set to compatability level 80 so
that it will have backward compatability with SQL server 2000 on which it wa
s
developed.
"Uri Dimant" wrote:

> Pam
> Make sure that you connect with the "right" user from application to run
> reports.
> Why do you have 80 compatibilty level for SQL Server 2005?
>
> "Pam Davey" <PamDavey@.discussions.microsoft.com> wrote in message
> news:16199EB3-EC0B-4A5E-B68F-1EEF73DDDF60@.microsoft.com...
>
>|||Hi Micle-
Thank you for your input. Unfortunely, it didn't seem to make any
difference. I get the same error. Oddly, I can get to all the underlying
tables that make up the view. I just can't get to the view, even when it's
created as you suggested.
"Micle" wrote:

> Hi!
> Create view with view_metadata attribute.
> Micle.
>
> "Pam Davey" <PamDavey@.discussions.microsoft.com> wrote in message
> news:16199EB3-EC0B-4A5E-B68F-1EEF73DDDF60@.microsoft.com...
>
>|||Pam Davey (PamDavey@.discussions.microsoft.com) writes:
> Although I have granted select permissions on the views in my database
> that are the recordesource for reports in a visual basic application, I
> cannot open the reports from the application. I get the VB error 1005
> ("can't open recordset"). It would seem to be a permissions problem
> because everything else in the app works fine except the reports that
> are based on views. I haven't found anything in Books on Line that has
> solved the problem. The DB was developed in sql 2000 and the
> compatability level for this DB in sql 2005 is 80. I'm grateful for any
> help.
Do the reports work when you run it on SQL 2000? Hav you verified that the
queries work when you run them from Query Analyzer or Management Studio.
Could you post the code you are using?
I would not expect a permissons problem, unless you are doing a poor job
of handling errors from SQL server. Nevertheless, here is a kind of shot
in the dark that you can try:
GRANT VIEW DEFINITION ON SCHEMA::dbo TO <user>
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks for your help Erland. Yes, the queries work in SQL 2000 as well as
when run from the Query Analyzer and Management Studio.
There's very little code actually. I have a 3rd party report control from
Component One that renders reports from report definitions stored in an xml
file. I've checked the xml file and the various report definitions within th
e
file have the correct queries named as their recordsource.
Thanks for the "GRANT..." thought. Didn't make a difference though. Still, I
appreciate your help.
"Erland Sommarskog" wrote:

> Pam Davey (PamDavey@.discussions.microsoft.com) writes:
> Do the reports work when you run it on SQL 2000? Hav you verified that the
> queries work when you run them from Query Analyzer or Management Studio.
> Could you post the code you are using?
> I would not expect a permissons problem, unless you are doing a poor job
> of handling errors from SQL server. Nevertheless, here is a kind of shot
> in the dark that you can try:
> GRANT VIEW DEFINITION ON SCHEMA::dbo TO <user>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
>|||Pam Davey (PamDavey@.discussions.microsoft.com) writes:
> Thanks for your help Erland. Yes, the queries work in SQL 2000 as well as
> when run from the Query Analyzer and Management Studio.
> There's very little code actually. I have a 3rd party report control
> from Component One that renders reports from report definitions stored
> in an xml file. I've checked the xml file and the various report
> definitions within the file have the correct queries named as their
> recordsource.
> Thanks for the "GRANT..." thought. Didn't make a difference though.
> Still, I appreciate your help.
I'm afraid that there is very little to work on. Maybe the best is to
contact the vendor.
All I can really suggest is to use Profiler to eavesdrop on what the
report tool sends to SQL Server. You can include Error events in
the trace, so you can see if any errors are reported.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Okay, I'll give it a try. Thank you again.
"Erland Sommarskog" wrote:

> Pam Davey (PamDavey@.discussions.microsoft.com) writes:
> I'm afraid that there is very little to work on. Maybe the best is to
> contact the vendor.
> All I can really suggest is to use Profiler to eavesdrop on what the
> report tool sends to SQL Server. You can include Error events in
> the trace, so you can see if any errors are reported.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
>|||"Pam Davey" <PamDavey@.discussions.microsoft.com> wrote in message
news:DEB58306-AC92-45FA-A657-A08EA6CD6D2A@.microsoft.com...[vbcol=seagreen]
> Okay, I'll give it a try. Thank you again.
> "Erland Sommarskog" wrote:
>
A good reality check would be to execute the application under an account
that's an admin (as in NT account that is a member of the sysadmin fixed
server role) on the SQL box. If it still doesn't work, the reason is not
permissions! If it does work under admin privileges, the next reality check
might be to grant all to guest; if that works revoke the last grant and
grant all to public.
Another tactic would be to write a quickie script to open a recordset on
that view, and execute it from an end-user-level login context -- that will
allow you to see any error output that the report control may be eating.
Divide and conquer, that's the game. :-)
Good Luck,
Mark
[vbcol=seagreen]

Permissions on linked reports with subreport

Need help please...
I have one folder 'RSFOLDER' with all reports and subreports in it. I don't
wont to set any permissons on that folder. This fodler is hidden...
I have second folder. That folder is not hidden, it has user friendly name,
and contains linked reports from folder RSFOLDER.
Users have permissions on linked reports.
When user open some report that contains subreport, report renders fine, but
subreports are missing (Error: Report could not be shown...)
When I set up permissions on RSFOLDER everithing is fine...
Any workaround?
Tnnx,
nikolaCreate another level of folders
/RSFolder <-- User's don't have permission
/RSFolder/folder <-- users have permission to read
Then all the reports will be accessible but user can't directly navigate to
them. Another option is to set the permission on each report explicitly.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nikola Smircic" <nikola.smircic@.netlab.hr> wrote in message
news:e2qzadxpEHA.1308@.TK2MSFTNGP14.phx.gbl...
> Need help please...
> I have one folder 'RSFOLDER' with all reports and subreports in it. I
don't
> wont to set any permissons on that folder. This fodler is hidden...
> I have second folder. That folder is not hidden, it has user friendly
name,
> and contains linked reports from folder RSFOLDER.
> Users have permissions on linked reports.
> When user open some report that contains subreport, report renders fine,
but
> subreports are missing (Error: Report could not be shown...)
> When I set up permissions on RSFOLDER everithing is fine...
> Any workaround?
> Tnnx,
> nikola
>sql

Tuesday, March 20, 2012

Permissions granted for user x are insufficient for performing this operation

Here's the setup:
I've got a RS server set up in a QA domain. When I publish reports to it,
it prompts me for a username and password. I enter the ADMINISTRATOR
account and password and all is well.
I've now set up a RS server in the production domain and I need to publish
my reports to it. I've added my domain account to the Role Assignments with
System Administrator privliges. When I log into RS, I see all of the
relevant administrator options, but when I try to publish a new report via
VS I get the error message: "Permissions granted for user x are
insufficient for performing this operation"
What am I doing wrong?
ThanksYou need to grant the user permission in the correct folder. There is a
default role called Content Manager. Make your user this role in the
appropriate folder.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"troark" <t.roark@.excite.com.n0sp@.m> wrote in message
news:es0Px60nEHA.3868@.TK2MSFTNGP11.phx.gbl...
> Here's the setup:
> I've got a RS server set up in a QA domain. When I publish reports to it,
> it prompts me for a username and password. I enter the ADMINISTRATOR
> account and password and all is well.
> I've now set up a RS server in the production domain and I need to publish
> my reports to it. I've added my domain account to the Role Assignments
with
> System Administrator privliges. When I log into RS, I see all of the
> relevant administrator options, but when I try to publish a new report via
> VS I get the error message: "Permissions granted for user x are
> insufficient for performing this operation"
> What am I doing wrong?
> Thanks
>
>|||DOH! Thanks.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:uiFmju1nEHA.2024@.TK2MSFTNGP09.phx.gbl...
> You need to grant the user permission in the correct folder. There is a
> default role called Content Manager. Make your user this role in the
> appropriate folder.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "troark" <t.roark@.excite.com.n0sp@.m> wrote in message
> news:es0Px60nEHA.3868@.TK2MSFTNGP11.phx.gbl...
> > Here's the setup:
> > I've got a RS server set up in a QA domain. When I publish reports to
it,
> > it prompts me for a username and password. I enter the ADMINISTRATOR
> > account and password and all is well.
> >
> > I've now set up a RS server in the production domain and I need to
publish
> > my reports to it. I've added my domain account to the Role Assignments
> with
> > System Administrator privliges. When I log into RS, I see all of the
> > relevant administrator options, but when I try to publish a new report
via
> > VS I get the error message: "Permissions granted for user x are
> > insufficient for performing this operation"
> >
> > What am I doing wrong?
> >
> > Thanks
> >
> >
> >
> >
>

Wednesday, March 7, 2012

Permission Reading Registry from Assembly

======== REPOSTED w/MSDN ALIAS ======== We have a custom assembly used by our reports that needs to access SQL
Server and the Registry. In code, prior to making our SQL server
connection, we assert the System.Data.SqlClient.SqlClientPermission and we
are able to connect just fine. Prior to opening the registry key, we assert
the System.Security.Permissions.RegistryPermission, but on the subsequent
call to open the subkey, we get the following exception:
Request for the permission of type
System.Security.Permissions.RegistryPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
* We created a code group in the policy config file giving our assembly full
trust.
* The Everyone group has permissions to read the registry key and the value.
* We executed Sysinternal's registry monitor tool and it doesn't appear to
even log the call to open the key.
Environment: Visual Studio.NET 1.1, Reporting Services 1.1, Windows XP
====[BEGIN CODE SNIPPET]============== RegistryKey regTest = null;
try {
RegistryPermission regPermission = new
RegistryPermission(RegistryPermissionAccess.Read,
"HKEY_LOCAL_MACHINE\\SOFTWARE\\0");
regPermission.Assert();
regTest = Registry.LocalMachine;
regTest = regTest.OpenSubKey("SOFTWARE"); // This call fails with the
exception above
return (string)regTest.GetValue("TestVal");
} finally {
if (regTest != null) {
regTest.Close();
}
}
====[END CODE SNIPPET]==============
I don't think this is a registry permission issue since it says the
"request" for the permission failed. However, I would have expected the
request to fail on the assert, not on the subsequent OpenSubKey call.
Does anyone have any suggestions on how to troubleshoot this?
Thanks,
ChrisHi Chris,
Thank you for posting.
Regarding on the SSRS custom assembly registry accessing issue, I think we
should still troubleshoot from the permission setting. And what we can
check is the below things:
1. raw win32 registry access permission
2. .NET CAS permission setting.
For win32 registry access permission, the regmon tool should be able to
capture the failure error
For .NET CAS permission problem, you can consider temporarly turn off the
.net framework's CAS setting through the caspol.exe tool:
#Code Access Security Policy Tool (Caspol.exe) (.NET Framework)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
l/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp
After turn off the CAS and test the custom assembly again to see whether it
works.
Hope this helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||I have copied code out of the help file that opens the LocalMachine key and
calls GetSubKeys(). This fails with the same permissions error. I have
granted the Everyone group Full Control on the LocalMachine key. Using the
caspol.exe tool noted below, I have turned off CAS.
I have been running registry monitor from system internals, and unless I'm
using the tool incorrectly, I don't see any failures or successes. I am
using the RSReportHost to be able to execute the report and step through my
assembly. I don't know what process it would be using to access the
registry.
In regards to the suggestions below:
1. What other pemissions could I add in addition to granting the Everyone
group Full Control? I am still getting the exception.
2. As stated above, I executed the caspol.exe turning off CAS. I am still
getting the exception.
- Chris
=================================Taken from the Registry.LocalMachine field help file sample:
public static string PrintKeys() {
StringBuilder sbResult = new StringBuilder();
RegistryKey rk = Registry.LocalMachine;
// Retrieve all the subkeys for the specified key.
String [] names;
try {
names = rk.GetSubKeyNames(); <=== BOOM
} catch (Exception e) {
return e.Message;
}
int icount = 0;
// Print the contents of the array to the console.
foreach (String s in names) {
sbResult.Append(s);
// The following code puts a limit on the number
// of keys displayed. Comment it out to print the
// complete list.
icount++;
if (icount >= 10)
break;
}
return sbResult.ToString();
}
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:eeLJoQfWGHA.932@.TK2MSFTNGXA01.phx.gbl...
> Hi Chris,
> Thank you for posting.
> Regarding on the SSRS custom assembly registry accessing issue, I think we
> should still troubleshoot from the permission setting. And what we can
> check is the below things:
> 1. raw win32 registry access permission
> 2. .NET CAS permission setting.
> For win32 registry access permission, the regmon tool should be able to
> capture the failure error
> For .NET CAS permission problem, you can consider temporarly turn off the
> net framework's CAS setting through the caspol.exe tool:
> #Code Access Security Policy Tool (Caspol.exe) (.NET Framework)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
> l/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp
> After turn off the CAS and test the custom assembly again to see whether
> it
> works.
> Hope this helps.
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||Clarification - When running the RegMon tool, I do see a lot of activity
from other processes, but nothing that I can identify being associated with
my custom assembly.
"Chris Walls" <chwalls2@.community.nospam> wrote in message
news:OIlWD$WXGHA.3492@.TK2MSFTNGP05.phx.gbl...
>I have copied code out of the help file that opens the LocalMachine key and
>calls GetSubKeys(). This fails with the same permissions error. I have
>granted the Everyone group Full Control on the LocalMachine key. Using the
>caspol.exe tool noted below, I have turned off CAS.
> I have been running registry monitor from system internals, and unless I'm
> using the tool incorrectly, I don't see any failures or successes. I am
> using the RSReportHost to be able to execute the report and step through
> my assembly. I don't know what process it would be using to access the
> registry.
> In regards to the suggestions below:
> 1. What other pemissions could I add in addition to granting the Everyone
> group Full Control? I am still getting the exception.
> 2. As stated above, I executed the caspol.exe turning off CAS. I am still
> getting the exception.
> - Chris
> =================================> Taken from the Registry.LocalMachine field help file sample:
> public static string PrintKeys() {
> StringBuilder sbResult = new StringBuilder();
> RegistryKey rk = Registry.LocalMachine;
> // Retrieve all the subkeys for the specified key.
> String [] names;
> try {
> names = rk.GetSubKeyNames(); <=== BOOM
> } catch (Exception e) {
> return e.Message;
> }
> int icount = 0;
> // Print the contents of the array to the console.
> foreach (String s in names) {
> sbResult.Append(s);
> // The following code puts a limit on the number
> // of keys displayed. Comment it out to print the
> // complete list.
> icount++;
> if (icount >= 10)
> break;
> }
> return sbResult.ToString();
> }
>
> "Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
> news:eeLJoQfWGHA.932@.TK2MSFTNGXA01.phx.gbl...
>> Hi Chris,
>> Thank you for posting.
>> Regarding on the SSRS custom assembly registry accessing issue, I think
>> we
>> should still troubleshoot from the permission setting. And what we can
>> check is the below things:
>> 1. raw win32 registry access permission
>> 2. .NET CAS permission setting.
>> For win32 registry access permission, the regmon tool should be able to
>> capture the failure error
>> For .NET CAS permission problem, you can consider temporarly turn off the
>> net framework's CAS setting through the caspol.exe tool:
>> #Code Access Security Policy Tool (Caspol.exe) (.NET Framework)
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
>> l/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp
>> After turn off the CAS and test the custom assembly again to see whether
>> it
>> works.
>> Hope this helps.
>> Regards,
>> Steven Cheng
>> Microsoft Online Community Support
>>
>> ==================================================>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>> ==================================================>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> Get Secure! www.microsoft.com/security
>> (This posting is provided "AS IS", with no warranties, and confers no
>> rights.)
>|||Thanks for your followup Chris,
This seems strange, so far I can not consider any other particular security
related setting either. Should be a environment specific issue. Have you
tried creating a new custom assembly which access some certain registry to
see whether it also suffer the probelm on ths machine?
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||I got a little further. I created a new assembly that only had my registry
code. I ran it as a console application and it successfully read my
registry values. I saw in RegMon that the keys where opened, queried, etc.
I then changed it to a class library and referenced it with a test report.
I was receiving the same permission errors. I turned off security via the
caspol utility and then I was able to successfully read my values. I then
modified my test report to reference my first assembly and it too now works.
Clearly I didn't disable security the last time like I thought I did.
So cleary my entries in the rspreviewpolicy.config file is incorrect. I
thought I was granting full trust to my assembly. Here is my entries. They
are at the end of the file just before the </policy> end tag.
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust"
Name="TSIRegistryTest">
<IMembershipCondition
class="UrlMembershipCondition"
version="1" Url="C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\ReportTest.dll" />
</CodeGroup>
Any help would be greatly appreciated.
- Chris
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:N9KImB8XGHA.888@.TK2MSFTNGXA01.phx.gbl...
> Thanks for your followup Chris,
> This seems strange, so far I can not consider any other particular
> security
> related setting either. Should be a environment specific issue. Have you
> tried creating a new custom assembly which access some certain registry to
> see whether it also suffer the probelm on ths machine?
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Thank you for the response Chris,
So your custom assembly is put in the following location:
C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\ReportTest.dll
If so, I think the <CodeGroup > element you pasted should be ok. And the
problem is possibly caused by the location where you add the custom
<codeGroup> in the policy file. As you mentioend that you add it at the
end of the file just before the </policy> end tag. Do you mean that it is
not included/nested within other <codeGroup> ?, like below:
======================...other code group here
<!--
Your code group here?
-->
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>
==========================
If so, it is not the correct place since the codegroup in .NET code access
policy file is not a flat structure, they're hierarchical and nested...
And our custom code should be put within a "Local Computer"
firstMatchCodeGroup, it is as below:
================= <CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Execution"
Description="This code group grants
MyComputer code Execution permission. ">
<IMembershipCondition
class="ZoneMembershipCondition"
version="1"
Zone="MyComputer" />
<!--
many parallel nested sub codegroups here....
-->
</CodeGroup>
==============
You'll find there is many other sub codegroups nested inside it which are
parallel with each other. If you find it, you can try puting your custom
code group as the sub nested codegroup within it. In addition, you can
also try strong-named your assembly and put it in GAC, then use
strong-named membershipCondition to idenitify it for testing.
BTW, here is a good msdn article describing the code access security in
ASP.NET application(including customizing policy file):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html
/paght000017.asp
Hope this also helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Ok, I think I got it. One thing that was screwing me up is that the change
in the rspreviewpolicy.config was not being picked up by the RSReportHost
utility, even when I unloaded and reloaded it. Only when I started
previewing the report with VS.NET did I see a successful execution with CAS
turned on. Now I'm having similar issues on the build server, but I have a
better understanding of how to troubleshoot it.
Thanks for all of the help.
- Chris
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:J8C4%23YEZGHA.6000@.TK2MSFTNGXA01.phx.gbl...
> Thank you for the response Chris,
> So your custom assembly is put in the following location:
> C:\Program Files\Microsoft SQL Server\80\Tools\Report
> Designer\ReportTest.dll
> If so, I think the <CodeGroup > element you pasted should be ok. And the
> problem is possibly caused by the location where you add the custom
> <codeGroup> in the policy file. As you mentioend that you add it at the
> end of the file just before the </policy> end tag. Do you mean that it is
> not included/nested within other <codeGroup> ?, like below:
> ======================> ...other code group here
> <!--
> Your code group here?
> -->
> </PolicyLevel>
> </policy>
> </security>
> </mscorlib>
> </configuration>
> ==========================> If so, it is not the correct place since the codegroup in .NET code access
> policy file is not a flat structure, they're hierarchical and nested...
> And our custom code should be put within a "Local Computer"
> firstMatchCodeGroup, it is as below:
> =================> <CodeGroup
> class="FirstMatchCodeGroup"
> version="1"
> PermissionSetName="Execution"
> Description="This code group grants
> MyComputer code Execution permission. ">
> <IMembershipCondition
> class="ZoneMembershipCondition"
> version="1"
> Zone="MyComputer" />
> <!--
> many parallel nested sub codegroups here....
> -->
> </CodeGroup>
> ==============> You'll find there is many other sub codegroups nested inside it which are
> parallel with each other. If you find it, you can try puting your custom
> code group as the sub nested codegroup within it. In addition, you can
> also try strong-named your assembly and put it in GAC, then use
> strong-named membershipCondition to idenitify it for testing.
> BTW, here is a good msdn article describing the code access security in
> ASP.NET application(including customizing policy file):
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html
> /paght000017.asp
> Hope this also helps.
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
>
>
>
>|||Thanks for your followup Chris,
I'm very glad that you've made progress on this. Also, it's a pleasure to
be of assistance.
Please feel free to post here when there is anything else we can help you.
Good luck!
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Saturday, February 25, 2012

permission grant set is incompatible between appdomains

HI ,
I have a custom dll that I use to do some of the code expressions across
reports. I have set the required permissions in the rsrvpolicy.config file to
allow it to run under full trust. I have also set the following attributes
on the method in that dll
<System.Security.Permissions.EnvironmentPermission(Security.Permissions.SecurityAction.Assert, Unrestricted:=True),
System.Net.WebPermission(Security.Permissions.SecurityAction.Assert,
Unrestricted:=True)>
Everything was fine till yesterday. Yesterday, my machine was added to be a
member of a domain. I am not getting this error when I try to access the
reports:
rsProcessingError 400 Failed to load expression host assembly. Details:
Assembly mycustom.dll security permission grant set is incompatible between
appdomains.
http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings.resources.Strings&EvtID=rsProcessingError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=8.00
Microsoft SQL Server Reporting Services 8.00.743.00 127 OsIndependent 1033
Microsoft.ReportingServices.Processing Failed to load expression host
assembly. Details: Assembly mycustom.dll security permission grant set is
incompatible between appdomains
Please help!Never mind.
I got some notes by searching in google that fixed this problem. I just had
to restart IIS.
and it starting working
Thanks
George

Monday, February 20, 2012

Permission error when trying to set parameters of a server report

Hi There,

I am using SQL Server Reporting Services and generating reports and have them deployed on a report server on Machine A. I have an asp.net web application hosted on MAchine B which has a report viewer control which is used to display a predefined report that is already published on a Reporting Services report server except that it passes a set of parameters for the report. I get this error...The permissions granted to user 'Bla.." are insufficient for performing this operation. (rsAccessDenied) when I try to set the parameters..like this..

param[1] = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", DateTime.Now.ToShortDateString());
param[2] = new Microsoft.Reporting.WebForms.ReportParameter("Site", "1");
reportViewer.ServerReport.SetParameters(param);
reportViewer.ServerReport.Refresh();

I have integrated windows authentication set on the web application (report and report server)

Can anybody suggest me why I am getting this error(breaks at code in red). Any suggestions are greatly aprreciated!!

Thanks.

Sam.

Does the report render fine if you do not set parameters via code?

Permission Denied Error

I am an issue running reports through a Netscreen (Juniper)
box and have found nothing on Juniper's website that addresses the issue. I
can access the Report Manager easily and enter parameters for a report.
However when I click on the View Report button I get a permission denied
error when executing the following Miscrosoft scipt:
function LoadToolbarFrame()
{
if (frames["oTbDMRepFrame"].location.href != tbDMRepFrameUrl ||
!IsIEBrowser())
frames["oTbDMRepFrame"].location.replace(tbDMRepFrameUrl);
}
I have been working on this for quite some time and have not found a
solution. I would appreciate any ideas and solutions.What is your ReportServer URL in your config files? Is that different than
the URL you are typing in your browser? If so, you may be running into a
cross-domain scripting error.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"B. Mark McKinney" <BMarkMcKinney@.discussions.microsoft.com> wrote in
message news:53751243-0BEF-4405-A154-DBBF3218635B@.microsoft.com...
>I am an issue running reports through a Netscreen (Juniper)
> box and have found nothing on Juniper's website that addresses the issue.
> I
> can access the Report Manager easily and enter parameters for a report.
> However when I click on the View Report button I get a permission denied
> error when executing the following Miscrosoft scipt:
> function LoadToolbarFrame()
> {
> if (frames["oTbDMRepFrame"].location.href != tbDMRepFrameUrl ||
> !IsIEBrowser())
> frames["oTbDMRepFrame"].location.replace(tbDMRepFrameUrl);
> }
> I have been working on this for quite some time and have not found a
> solution. I would appreciate any ideas and solutions.
>