Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Wednesday, March 21, 2012

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Monday, March 19, 2012

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Wednesday, March 7, 2012

error using dbms.sql

Hello:
I have a table with two of the fiedls that are tables_names. I need to use then to select some data and insert in another table. The error is the following:
Procedure created.

No errors.
SQL> exec readtable('state_relation')
BEGIN readtable('state_relation'); END;

*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at "CHADBA.READTABLE", line 78
ORA-06512: at line

The code is the following:

set serveroutput on size 1000000

CREATE OR REPLACE PROCEDURE readtable ( source IN VARCHAR2) IS

v_tablename varchar2(30);
v_tablekey varchar2(30);
fccid number;
name varchar2(30);
state varchar2(2);
strsql varchar2(1000);
numrows number;
averageleng number;
bytes number;
countreg number;
countbytes number;
cursor1 INTEGER;
cursor2 INTEGER;
ignore INTEGER;
BEGIN

-- OPEN CURSOR
cursor1 := dbms_sql.open_cursor;
-- PREPARE PARSE
DBMS_SQL.PARSE(cursor1,
'SELECT table_name, table_key into v_tablename,v_tablekey FROM ' || source,
DBMS_SQL.native);
-- use bind variables? No
-- use query ? yes
-- Define colmna
DBMS_SQL.DEFINE_COLUMN(cursor1, 1, v_tablename,30);
DBMS_SQL.DEFINE_COLUMN(cursor1, 2, v_tablekey,30);
-- execute
ignore := DBMS_SQL.EXECUTE(cursor1);

-- Prepare cursor for read and insert in other table
cursor2 := DBMS_SQL.OPEN_CURSOR;
strsql := ' SELECT DISTINCT '
|| ' l.bill_fccid '
|| ' l.name'
|| ' count(l.svcing_st) '
|| ' from '
|| 'v_tablekey l'
|| 'v_tablename m'
|| ' where '
|| 'l.bill_fccid'
|| ' = '
|| 'm.bill_fccid'
|| 'group by '
|| ' l.bill_fccid'
|| 'l.name';

-- Parse cursor2
DBMS_SQL.PARSE(cursor2,strsql,DBMS_SQL.native);

-- fetch_rows
LOOP
IF DBMS_SQL.FETCH_ROWS(cursor1) > 0 THEN
-- get column values of the row
DBMS_SQL.COLUMN_VALUE(cursor1, 1, v_tablename);
DBMS_SQL.COLUMN_VALUE(cursor1, 2, v_tablekey);

ignore := DBMS_SQL.EXECUTE(cursor2);
ELSE
-- No more rows to read
EXIT;
END IF;
END LOOP;

DBMS_SQL.CLOSE_CURSOR(cursor1);
DBMS_SQL.CLOSE_CURSOR(cursor2);
EXCEPTION
WHEN OTHERS THEN
IF DBMS_SQL.IS_OPEN(cursor1) THEN
DBMS_SQL.CLOSE_CURSOR(cursor1);
END IF;
IF DBMS_SQL.IS_OPEN(cursor2) THEN
DBMS_SQL.CLOSE_CURSOR(cursor2);
END IF;
RAISE;
END readtable;
/
show errors;
Can some body help me? Thanks in advanceRemove "into v_tablename,v_tablekey" where you are parsing the sql. You are already defining the columns, hence dont need the into clause.

Here is the correct stmt :
DBMS_SQL.PARSE(cursor1, 'SELECT table_name, table_key FROM ' || source, DBMS_SQL.native);

Originally posted by nelari
Hello:
I have a table with two of the fiedls that are tables_names. I need to use then to select some data and insert in another table. The error is the following:
Procedure created.

No errors.
SQL> exec readtable('state_relation')
BEGIN readtable('state_relation'); END;

*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at "CHADBA.READTABLE", line 78
ORA-06512: at line

The code is the following:

set serveroutput on size 1000000

CREATE OR REPLACE PROCEDURE readtable ( source IN VARCHAR2) IS

v_tablename varchar2(30);
v_tablekey varchar2(30);
fccid number;
name varchar2(30);
state varchar2(2);
strsql varchar2(1000);
numrows number;
averageleng number;
bytes number;
countreg number;
countbytes number;
cursor1 INTEGER;
cursor2 INTEGER;
ignore INTEGER;
BEGIN

-- OPEN CURSOR
cursor1 := dbms_sql.open_cursor;
-- PREPARE PARSE
DBMS_SQL.PARSE(cursor1,
'SELECT table_name, table_key into v_tablename,v_tablekey FROM ' || source,
DBMS_SQL.native);
-- use bind variables? No
-- use query ? yes
-- Define colmna
DBMS_SQL.DEFINE_COLUMN(cursor1, 1, v_tablename,30);
DBMS_SQL.DEFINE_COLUMN(cursor1, 2, v_tablekey,30);
-- execute
ignore := DBMS_SQL.EXECUTE(cursor1);

-- Prepare cursor for read and insert in other table
cursor2 := DBMS_SQL.OPEN_CURSOR;
strsql := ' SELECT DISTINCT '
|| ' l.bill_fccid '
|| ' l.name'
|| ' count(l.svcing_st) '
|| ' from '
|| 'v_tablekey l'
|| 'v_tablename m'
|| ' where '
|| 'l.bill_fccid'
|| ' = '
|| 'm.bill_fccid'
|| 'group by '
|| ' l.bill_fccid'
|| 'l.name';

-- Parse cursor2
DBMS_SQL.PARSE(cursor2,strsql,DBMS_SQL.native);

-- fetch_rows
LOOP
IF DBMS_SQL.FETCH_ROWS(cursor1) > 0 THEN
-- get column values of the row
DBMS_SQL.COLUMN_VALUE(cursor1, 1, v_tablename);
DBMS_SQL.COLUMN_VALUE(cursor1, 2, v_tablekey);

ignore := DBMS_SQL.EXECUTE(cursor2);
ELSE
-- No more rows to read
EXIT;
END IF;
END LOOP;

DBMS_SQL.CLOSE_CURSOR(cursor1);
DBMS_SQL.CLOSE_CURSOR(cursor2);
EXCEPTION
WHEN OTHERS THEN
IF DBMS_SQL.IS_OPEN(cursor1) THEN
DBMS_SQL.CLOSE_CURSOR(cursor1);
END IF;
IF DBMS_SQL.IS_OPEN(cursor2) THEN
DBMS_SQL.CLOSE_CURSOR(cursor2);
END IF;
RAISE;
END readtable;
/
show errors;
Can some body help me? Thanks in advance|||Originally posted by dbmadcap
Remove "into v_tablename,v_tablekey" where you are parsing the sql. You are already defining the columns, hence dont need the into clause.

Here is the correct stmt :
DBMS_SQL.PARSE(cursor1, 'SELECT table_name, table_key FROM ' || source, DBMS_SQL.native);

Thank you for the answer but this is not the problem, I already change us you indicate and continues the same error. The error is with the two variables that i'm using for the second select.|||You have v_tablekey and v_tablename inside quotes. Change it as below :

strsql := ' SELECT DISTINCT '
|| ' l.bill_fccid '
|| ' l.name'
|| ' count(l.svcing_st) '
|| ' from '|| v_tablekey || ' l '
|| ' , '|| v_tablename || ' m '
|| ' where '
|| 'l.bill_fccid'
|| ' = '
|| 'm.bill_fccid'
|| 'group by '
|| ' l.bill_fccid'
|| 'l.name';

Also as a humble suggestion, try to form the string in fewer lines so that it will make easy for you to read & debug

Originally posted by nelari
Thank you for the answer but this is not the problem, I already change us you indicate and continues the same error. The error is with the two variables that i'm using for the second select.