Forms authentication - Object reference not set to an instance of an object

I have successfully implemented forms authentication, that means, I can access it from a web browser, get the login page, add my credentials and log on to Reporting Services.

But now I try to access reporting services Web service from a winforms app, doing something like this:

ReportingService _rs =newReportingService();

_rs.LogonUser("myUsername","myPassword","");

_rs.Url ="http://myServer/ReportServer/ReportService.asmx";

CatalogItem[] items = _rs.ListChildren("/",true);

The first three lines works fine, but he last line (ListChildren) throws a "Object reference not set to an instance of an object" exception. I have enabled remote error and looked in the RS log files, but nowhere I can find where this null-pointer exception occured.

Any idea about where to go from here?

Regards Andreas

[1540 byte] By [AndreasBrosten] at [2008-1-1]
# 1

Completing information...

I have checked the SQLDUMPER_ERROR.log file, and it contains the following, regarding this problem:

04/12/07 11:40:26, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1200
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x47405860
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
04/12/07 11:40:26, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
04/12/07 11:40:27, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
04/12/07 11:40:27, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\LogFiles\SQLDmpr0001.mdmp
04/12/07 11:40:27, ACTION, w3wp.exe, Watson Invoke: No

And the file SQLDmpr001.mdmp contains the following regarding the problem:

w3wp!library!1!04/12/2007-11:40:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
End of inner exception stack trace

So, it seems like the method ConstructRSServiceObjectFromSecurityExtension()

throws a NullReferenceException.

But why? I'm really stuck... =(

Regards Andreas

AndreasBrosten at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 2
It is probably a configuration issue. Verify the configuration steps. You may find the following article useful.
TeoLachev at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 3

The article references to the readme-file for configuration:

Since the most difficult part in implementing custom security is configuring the security extension properly, detailed step-by-step instructions are provided in the readme.htm file. In addition, you can find copies of the report manager and report server configuration files in the Configuration Files folder. Please use these files as reference only! Do not just copy them and replace your configuration files.

And it's the readmefile I have followed while implementing. I have also double checked it several times to check so that all should be ok. Ofcourse I can have missed something anyway. Do you have any ida of witch configurationfile most probably causes such an error? These are the files I have modified:

...\ReportManager\rsmgrpolicy.config

...\ReportManager\RSWebApplication.config

...\ReportManager\Web.config

...ReportServer\rsreportserver.config

...ReportServer\rssrvpolicy.config

...ReportServer\web.config

Regards Andreas

AndreasBrosten at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 4
Unfortunately, I can't tell. One thing you can try just to rull out errors in your code is to put a breakpoint inside the SetConfiguration method of the Authentication class and see if it is hit when you debug. If it isn't, most likely is a a configuration issue.
TeoLachev at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 5

I think I solved the problem and thought I should post it here, in case anyone else runs into the same issue.

The problem was that since I use custom authentication in RS, I needed to inherit the 'ReportExecutionService' class and implement 'GetWebRequest', 'GetWebResponse' and 'AuthCookie'. I stole the implementation code from the RS forms authentication example, but I can't say I fully understand what I have done...

At least It made my null-pointer exception go away, and now I can call the web service without problem!

Regards Andreas

AndreasBrosten at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 6
Since the web request to LogonUser originates on the server side the cookie won't be sent to the browser by default (it is a double hop). These two methods relay the cookie from the server to the client and are absolutely necessary so the cookie is transmitted successfully.
TeoLachev at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 7
I'm having the same problem. I have traced my Authentication code and know that it is working, however, I keep getting these errors in the Reporting Service log directory. The web interface is working, including all the security, but when these error occur the interface hangs until the dump is processed.

w3wp!library!1!05/30/2007-13:55:34:: i INFO: Exception dumped to: c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson
w3wp!library!1!05/30/2007-13:55:35:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)

Ron(DI) at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 8
Did you find a fix for this issue? I am have the same problem. The report server will run but I get the same error in my log files and it hangs until the core dumps, which happens 4 times.
DanMan226 at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 9

No such luck. As you say everything works except for the hang and the logging of a dump.

I setup a separate machine with Windows Server 2003, SQl Server 2005 with Reporting Services and Visual Studio 2005. I applied all the available patches and I have traced every line of my code through my forms auth dll and it works. I have no idea what is causing the dump. All I find on the various message boards is that it MUST be a configuration error but there is no information on what configuration might be in error.

We should be happy that we got this working at all. My manager just returned from Tech Ed and he says that everyone was complaining that they could not get SSRS Forms Authorization working.

If you find anything please post a note here. I'll do the same.

Ron(DI) at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 10
I have a case open with Microsoft right now. They are looking at my dump file to see what is causing the error. I will post the results when I know more.
DanMan226 at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 11
Well, as I said in an earlier post, my problem was that 'GetWebRequest', 'GetWebResponse' and 'AuthCookie' wasn't implemented in my code. Post your implementation of it here in the forum and perhaps I or someone else could find something there?

Regards
Andreas Brosten

AndreasBrosten at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 12

I can login to the SSRS web site, and run reports.

The first time I try to access the report manager I get 4 core dumps, null reference exception error, yet the site works after that. No core dumps. The report server service doesn't generate any errors, just report manager. The UILogin.aspx.cs file does implement the web request methods. The code is posted below.

Did you have to make any changes to the sample project to get it to work when you first implemented forms authentication?

// Because the UILogon uses the Web service to connect to the report server

// you need to extend the server proxy to support authentication ticket

// (cookie) management

public class ReportServerProxy : ReportingService2005

{

protected override WebRequest GetWebRequest(Uri uri)

{

HttpWebRequest request;

request = (HttpWebRequest)HttpWebRequest.Create(uri);

// Create a cookie jar to hold the request cookie

CookieContainer cookieJar = new CookieContainer();

request.CookieContainer = cookieJar;

Cookie authCookie = AuthCookie;

// if the client already has an auth cookie

// place it in the request's cookie container

if (authCookie != null)

request.CookieContainer.Add(authCookie);

request.Timeout = -1;

request.Headers.Add("Accept-Language",

HttpContext.Current.Request.Headers["Accept-Language"]);

return request;

}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2201Big SmileoNotRaiseReservedExceptionTypes")]

protected override WebResponse GetWebResponse(WebRequest request)

{

WebResponse response = base.GetWebResponse(request);

string cookieName = response.Headers["RSAuthenticationHeader"];

// If the response contains an auth header, store the cookie

if (cookieName != null)

{

Utilities.CustomAuthCookieName = cookieName;

HttpWebResponse webResponse = (HttpWebResponse)response;

Cookie authCookie = webResponse.Cookies[cookieName];

// If the auth cookie is null, throw an exception

if (authCookie == null)

{

throw new Exception(

"Authorization ticket not received by LogonUser");

}

// otherwise save it for this request

AuthCookie = authCookie;

// and send it to the client

Utilities.RelayCookieToClient(authCookie);

}

return response;

}

private Cookie AuthCookie

{

get

{

if (m_Authcookie == null)

m_Authcookie =

Utilities.TranslateCookie(

HttpContext.Current.Request.Cookies[Utilities.CustomAuthCookieName]);

return m_Authcookie;

}

set

{

m_Authcookie = value;

}

}

private Cookie m_Authcookie = null;

}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]

internal sealed class Utilities

{

internal static string CustomAuthCookieName

{

get

{

lock(m_cookieNamelockRoot)

{

return m_cookieName;

}

}

set

{

lock(m_cookieNamelockRoot)

{

m_cookieName = value;

}

}

}

private static string m_cookieName;

private static object m_cookieNamelockRoot = new object();

private static HttpCookie TranslateCookie(Cookie netCookie)

{

if (netCookie == null)

return null;

HttpCookie webCookie = new HttpCookie(netCookie.Name, netCookie.Value);

// Add domain only if it is dotted - IE doesn't send back the cookie

// if we set the domain otherwise

if (netCookie.Domain.IndexOf('.') != -1)

webCookie.Domain = netCookie.Domain;

webCookie.Expires = netCookie.Expires;

webCookie.Path = netCookie.Path;

webCookie.Secure = netCookie.Secure;

return webCookie;

}

internal static Cookie TranslateCookie(HttpCookie webCookie)

{

if (webCookie == null)

return null;

Cookie netCookie = new Cookie(webCookie.Name, webCookie.Value);

if (webCookie.Domain == null)

netCookie.Domain =

HttpContext.Current.Request.ServerVariables["SERVER_NAME"];

netCookie.Expires = webCookie.Expires;

netCookie.Path = webCookie.Path;

netCookie.Secure = webCookie.Secure;

return netCookie;

}

internal static void RelayCookieToClient(Cookie cookie)

{

// add the cookie if not already in there

if (HttpContext.Current.Response.Cookies[cookie.Name] == null)

{

HttpContext.Current.Response.Cookies.Remove(cookie.Name);

}

HttpContext.Current.Response.SetCookie(TranslateCookie(cookie));

}

}

DanMan226 at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 13
Any update on this, It's occurring on my set up too and it's causing much angst.
GMcNicol at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 14

Here is the response I have from Microsoft so far. I didn't have named pipes and TCP/IP turned on, but enabling both didn't fix the problem. I am waiting for another response. I also programatically set HttpOnly to false in the code and it is not fixed. I am now getting two memory dumps instead of 4 but no luck. The dump stack tracy file be reference is at the bottom.

I posted parts of my config file below to see if they match. The parts I updated are in yellow.

Microsoft Response

System.NullReferenceException - Object reference not set to an instance of an object. 3 common causes

1) Note, regardless of the scenario, the cause is always the same in .Net: You are trying to use a reference variable who's value is Nothing/null. When the value is Nothing/null for the reference variable, that means it is not actually holding a reference to an instance of any object that exists on the heap. You either never assigned something to the variable, never created an instance of the value assigned to the variable, or you set the variable equal to Nothing/null manually, or you called a function that set the variable to Nothing/null for you.

2) You never created a new instance of an object.

3) You created the object, but killed it too soon.

The cause is that a variable is used in code, but that variable doesn't contain a reference to any object in memory. If you try to call .ToString() on an object, and your variable is null, you'll get this exception. Sometimes it can be hard to figure out what's going on, but if you look at your stack trace, you can find out what method this Exception came from. Then, debug through that method and find the offending variable.

I have attached the dump stack trace in the text file which is attached with this email.

So I would like you to once again verify the steps which has been used for creation of forms authentication.

Here is couple of action plans other than described above.

=================================================

Check whether the SQL Server is configured to use named pipes and TCP/IP.

The problem could happen, so set the HttpOnly attribute for the session cookie to the false value in global.asax file.

Note Setting the HttpOnly attribute to the true value does not prevent a malicious user from accessing the cookie directly when the malicious user has access to the network channel. Consider using Secure Sockets Layer (SSL) to help protect against this. Workstation security is also important. A malicious user may use an open browser window or a computer that contains persistent cookies to access a Web site by using a legitimate user's identity.

To set the HttpOnly attribute to the false value, replace the Session_Start method in the Global.asax file by using the following code. void Session_Start(object sender, EventArgs e)

{

if (Response.Cookies.Count > 0)

{

foreach (string s in Response.Cookies.AllKeys)

{

if (s == System.Web.Security.FormsAuthentication.FormsCookieName || s.ToLower() == "asp.net_sessionid")

{

Response.CookiesSleep.HttpOnly = false;

}

}

}

}

Config Files

ReportManager\rsmgrpolicy.config

<CodeGroup

class="FirstMatchCodeGroup"

version="1"

PermissionSetName="Nothing">

<IMembershipCondition

class="AllMembershipCondition"

version="1"

/>

<CodeGroup

class="FirstMatchCodeGroup"

version="1"

PermissionSetName="FullTrust"

Description="This code group grants MyComputer code Execution permission. ">

<IMembershipCondition

class="ZoneMembershipCondition"

version="1"

Zone="MyComputer" />

<CodeGroup

class="UnionCodeGroup"

version="1"

PermissionSetName="FullTrust"

Name="Microsoft_Strong_Name"

Description="This code group grants code signed with the Microsoft strong name full trust. ">

<IMembershipCondition

class="StrongNameMembershipCondition"

version="1"

PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293"

/>

</CodeGroup>

<CodeGroup

class="UnionCodeGroup"

version="1"

PermissionSetName="FullTrust"

Name="Ecma_Strong_Name"

Description="This code group grants code signed with the ECMA strong name full trust. ">

<IMembershipCondition

class="StrongNameMembershipCondition"

version="1"

PublicKeyBlob="00000000000000000400000000000000"

/>

</CodeGroup>

<CodeGroup

class="UnionCodeGroup"

version="1"

PermissionSetName="FullTrust"

Name="Report_Server_Strong_Name"

Description="This code group grants Report Server code full trust. ">

<IMembershipCondition

class="StrongNameMembershipCondition"

version="1"

PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA94F8F7B0327D2FF2ED523448F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E5526D526FDD130095ECDB7BF210809C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8"

/>

</CodeGroup>

<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>

<CodeGroup

class="UnionCodeGroup"

version="1"

PermissionSetName="FullTrust"

Name="SharePoint_Server_Strong_Name"

Description="This code group grants SharePoint Server code full trust. ">

<IMembershipCondition

class="StrongNameMembershipCondition"

version="1"

PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100AFD4A0E7724151D5DD52CB23A30DED7C0091CC01CFE94B2BCD85B3F4EEE3C4D8F6417BFF763763A996D6B2DFC1E7C29BCFB8299779DF8785CDE2C168CEEE480E570725F2468E782A9C2401302CF6DC17E119118ED2011937BAE9698357AD21E8B6DFB40475D16E87EB03C744A5D32899A0DBC596A6B2CFA1E509BE5FBD09FACF"

/>

</CodeGroup>

</CodeGroup>

</CodeGroup>

ReportManager\RSwebapplication.config

<UI>

<CustomAuthenticationUI>

<loginUrl>/Pages/UILogon.aspx</loginUrl>

<UseSSL>True</UseSSL>

</CustomAuthenticationUI>

<ReportServerUrl>https://dandev.XXX.com/ReportServer</ReportServerUrl>

<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>

<ReportServerVirtualDirectory></ReportServerVirtualDirectory>

</UI>

Report Manager\web.config

<system.web>

<pages validateRequest="false"/>

<compilation defaultLanguage="c#" debug="false"/>

<customErrors mode="Off"/>

<authentication mode="Windows"/>

<identity impersonate="false"/>

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>

<sessionState mode="InProc" cookieless="false" timeout="20"/>

<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

<httpRuntime executionTimeout="9000"/>

<securityPolicy>

<trustLevel name="RosettaMgr" policyFile="rsmgrpolicy.config"/>

</securityPolicy>

<trust level="RosettaMgr" originUrl=""/>

<httpHandlers>

<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

</httpHandlers>

</system.web>

ReportServer\rsreportserver.config

<Security>

<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization, Microsoft.Samples.ReportingServices.CustomSecurity">

<Configuration>

<AdminConfiguration>

<UserName>danf</UserName>

</AdminConfiguration>

</Configuration>

</Extension>

</Security>

<Authentication>

<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension, Microsoft.Samples.ReportingServices.CustomSecurity">

<Configuration>

<AdminConfiguration>

<UserName>danf</UserName>

<ConnString>Data Source=xx;Initial Catalog=xx;User ID=xx; Password=xx;</ConnString>

</AdminConfiguration>

</Configuration>

</Extension>

</Authentication>

ReportServer\rssrvpolicy.config

<CodeGroup class="FirstMatchCodeGroup" version="1" PermissionSetName="Nothing">

<IMembershipCondition class="AllMembershipCondition" version="1"/>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="Execution" Name="Report_Expressions_Default_Permissions" Description="This code group grants default permissions for code in report expressions and Code element. ">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100512C8E872E28569E733BCB123794DAB55111A0570B3B3D4DE3794153DEA5EFB7C3FEA9F2D8236CFF320C4FD0EAD5F677880BF6C181F296C751C5F6E65B04D3834C02F792FEE0FE452915D44AFE74A0C27E0D8E4B8D04EC52A8E281E01FF47E7D694E6C7275A09AFCBFD8CC82705A06B20FD6EF61EBBA6873E29C8C0F2CAEDDA2"/>

</CodeGroup>

<CodeGroup class="FirstMatchCodeGroup" version="1" PermissionSetName="Execution" Description="This code group grants MyComputer code Execution permission. ">

<IMembershipCondition class="ZoneMembershipCondition" version="1" Zone="MyComputer"/>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Microsoft_Strong_Name" Description="This code group grants code signed with the Microsoft strong name full trust. ">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293"/>

</CodeGroup>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Ecma_Strong_Name" Description="This code group grants code signed with the ECMA strong name full trust. ">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="00000000000000000400000000000000"/>

</CodeGroup>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Report_Server_Strong_Name" Description="This code group grants Report Server code full trust. ">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA94F8F7B0327D2FF2ED523448F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E5526D526FDD130095ECDB7BF210809C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8"/>

</CodeGroup>

<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>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="SharePoint_Server_Strong_Name" Description="This code group grants SharePoint Server code full trust. ">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100AFD4A0E7724151D5DD52CB23A30DED7C0091CC01CFE94B2BCD85B3F4EEE3C4D8F6417BFF763763A996D6B2DFC1E7C29BCFB8299779DF8785CDE2C168CEEE480E570725F2468E782A9C2401302CF6DC17E119118ED2011937BAE9698357AD21E8B6DFB40475D16E87EB03C744A5D32899A0DBC596A6B2CFA1E509BE5FBD09FACF"/>

</CodeGroup>

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="SoftwareFX_Strong_Name" Description="This code group grants Chart FX Reporting Services FUllTrust permission.">

<IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="00240000048000009400000006020000002400005253413100040000010001003D35B05AC523A5DBBDB65B6158A5DE0EB20D2519FF6956AE294FCADA2CA2D354428A1163F56E8294C277132BA0759D85B87DF88169B63F8519882738BBA48B91260F3E090252DE6DA366E8F16EE32B4C816CD9F6A466232D57E55BB92CAE3E4A6E01B4C0B41241819D25D5DCBF6F1CDDB0B7ABBAE608CB541106E8855F0BCEB6"/>

</CodeGroup>

</CodeGroup>

</CodeGroup>

ReportServer\web.config

<system.web>

<pages validateRequest="false" />

<authentication mode="Forms">

<forms loginUrl="logon.aspx" name="LoginCookie" timeout="60" path="/"></forms>

</authentication>

<authorization>

<deny users="?" />

</authorization>

<identity impersonate="false" />

<compilation defaultLanguage="c#" debug="false">

<assemblies>

<clear />

<add assembly="ReportingServicesWebServer" />

</assemblies>

</compilation>

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />

<sessionState mode="Off" />

<httpHandlers>

<add verb="*" path="Reserved.ReportServer" type="Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler, ReportingServicesWebServer" />

<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

</httpHandlers>

<httpModules></httpModules>

<globalization requestEncoding="utf-8" responseEncoding="utf-8" />

<httpRuntime executionTimeout = "9000" />

<securityPolicy>

<trustLevel name="RosettaSrv" policyFile="rssrvpolicy.config" />

</securityPolicy>

<trust level="RosettaSrv" originUrl="" />

</system.web>

<runtime>

<legacyImpersonationPolicy enabled="true"/>

<assemblyBinding xmlns="urnTongue Tiedchemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="Microsoft.ReportingServices.Interfaces"

publicKeyToken="89845dcd8080cc91"

culture="neutral" />

<bindingRedirect oldVersion="8.0.242.0"

newVersion="9.0.242.0"/>

</dependentAssembly>

</assemblyBinding>

</runtime>

Dump stack trace file

Going to dump the .NET Exceptions found in the heap.
Loading the heap objects into our cache.
Number of exceptions of this type: 1
Exception object: 028e8074
Exception type: System.InvalidOperationException
Message: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.3042.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color[:#]FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>An internal error occurred on the report server. See the error log for more details. (rsInternalError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.3042.00" target="_blank">Get Online Help</a></li><ul>
<li>Object reference not set to an instance of an object.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--.
InnerException: <none>
StackTrace (generated):
SP IP Function
01C7F1DC 0245D09D Microsoft.SqlServer.ReportingServices2005.RSConnection.GetSecureMethods()
01C7F300 0245CF34 Microsoft.ReportingServices.UI.Global+RSWebServiceWrapper.GetSecureMethods()

StackTraceString: <none>
HResult: 80131509
--


Number of exceptions of this type: 1
Exception object: 0290153c
Exception type: Microsoft.ReportingServices.UI.Global+RSWebServiceWrapper+CantCommunicateWithReportServerException
Message: The report server is not responding. Verify that the report server is running and can be accessed from this computer.
InnerException: <none>
StackTrace (generated):
SP IP Function
01C7F288 0245CFA1 Microsoft.ReportingServices.UI.Global+RSWebServiceWrapper.GetSecureMethods()
01C7F328 0245CE96 Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(System.String)
01C7F33C 0245CE0D Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()
01C7F364 02458834 Microsoft.ReportingServices.UI.ReportingPage.EnsureHttpsLevel(Microsoft.ReportingServices.Diagnostics.HttpsLevel)
01C7F370 024582EB Microsoft.ReportingServices.UI.ReportingPage.ReportingPage_Init(System.Object, System.EventArgs)
00000000 00000001 System.EventHandler.Invoke(System.Object, System.EventArgs)
01C7F3C4 689C2F7D System.Web.UI.Control.OnInit(System.EventArgs)
01C7F3D4 687DAFFA System.Web.UI.Page.OnInit(System.EventArgs)
01C7F3DC 687C9CA2 System.Web.UI.Control.InitRecursive(System.Web.UI.Control)
01C7F3F8 687DBA85 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)

StackTraceString: <none>
HResult: 80131500
--

Number of exceptions of this type: 1
Exception object: 028ffbd0
Exception type: System.Net.Sockets.SocketException
Message: No connection could be made because the target machine actively refused it
InnerException: <none>
StackTrace (generated):
SP IP Function
01C7EFA8 7A6FC527 System.Net.Sockets.Socket.DoConnect(System.Net.EndPoint, System.Net.SocketAddress)
01C7EFC4 7A6079D6 System.Net.Sockets.Socket.InternalConnect(System.Net.EndPoint)
01C7EFD0 7A58C490 System.Net.ServicePoint.ConnectSocketInternal(Boolean, System.Net.Sockets.Socket, System.Net.Sockets.Socket, System.Net.Sockets.Socket ByRef, System.Net.IPAddress ByRef, ConnectSocketState, System.IAsyncResult, Int32, System.Exception ByRef)

StackTraceString: <none>
HResult: 80004005
--

Number of exceptions of this type: 2
Exception object: 028a99c4
Exception type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
InnerException: <none>
StackTrace (generated):
SP IP Function
049CF510 056057FE Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
049CF52C 0560576B Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(System.String)
049CF548 05605601 Microsoft.ReportingServices.WebServer.Global.get_Service()
049CF558 05605134 Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean ByRef)
049CF58C 05604AFA Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(System.Object, System.EventArgs)

StackTraceString: <none>
HResult: 80004003
--

Number of exceptions of this type: 2
Exception object: 025710fc
Exception type: System.Threading.ThreadAbortException
Message: <none>
InnerException: <none>
StackTrace (generated):
<none>
StackTraceString: <none>
HResult: 80131530
--

Number of exceptions of this type: 2
Exception object: 028ab788
Exception type: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException
Message: An internal error occurred on the report server. See the error log for more details.
InnerException: System.NullReferenceException, use !PrintException 028a99c4 to see more
StackTrace (generated):
<none>
StackTraceString: <none>
HResult: 80131500
--

Number of exceptions of this type: 3
Exception object: 028e59bc
Exception type: System.Net.WebException
Message: The remote server returned an error: (500) Internal Server Error.
InnerException: <none>
StackTrace (generated):
SP IP Function
01C7F1F4 7A6EB3B4 System.Net.HttpWebRequest.GetResponse()
01C7F23C 6990BF7D System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(System.Net.WebRequest)

StackTraceString: <none>
HResult: 80131509
--

0:023> !do 028a99c4
Name: System.NullReferenceException
MethodTable: 7915ec4c
EEClass: 791ea194
Size: 72(0x48) bytes
GC Generation: 0
(C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
Fields:
MT Field Offset Type VT Attr Value Name
790fa3e0 40000b5 4 System.String 0 instance 028ad86c _className
79109208 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod
790fa3e0 40000b7 c System.String 0 instance 00000000 _exceptionMethodString
790fa3e0 40000b8 10 System.String 0 instance 028ab5e0 _message
79113dfc 40000b9 14 ...tions.IDictionary 0 instance 00000000 _data
790fa9e8 40000ba 18 System.Exception 0 instance 00000000 _innerException
790fa3e0 40000bb 1c System.String 0 instance 00000000 _helpURL
790f9c18 40000bc 20 System.Object 0 instance 028ab71c _stackTrace
790fa3e0 40000bd 24 System.String 0 instance 00000000 _stackTraceString
790fa3e0 40000be 28 System.String 0 instance 00000000 _remoteStackTraceString
790fed1c 40000bf 34 System.Int32 0 instance 0 _remoteStackIndex
790f9c18 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods
790fed1c 40000c1 38 System.Int32 0 instance -2147467261 _HResult
790fa3e0 40000c2 30 System.String 0 instance 00000000 _source
790fe160 40000c3 3c System.IntPtr 0 instance 0 _xptrs
790fed1c 40000c4 40 System.Int32 0 instance -532459699 _xcode
0:023> !do 028ab5e0
Name: System.String
MethodTable: 790fa3e0
EEClass: 790fa340
Size: 124(0x7c) bytes
GC Generation: 0
(C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
String: Object reference not set to an instance of an object.
Fields:
MT Field Offset Type VT Attr Value Name
790fed1c 4000096 4 System.Int32 0 instance 54 m_arrayLength
790fed1c 4000097 8 System.Int32 0 instance 53 m_stringLength
790fbefc 4000098 c System.Char 0 instance 4f m_firstChar
790fa3e0 4000099 10 System.String 0 shared static Empty
>> Domain:Value 000ce670:790d6584 000fe990:790d6584 02397330:790d6584 <<
79124670 400009a 14 System.Char[] 0 shared static WhitespaceChars
>> Domain:Value 000ce670:025713b8 000fe990:02574fa4 02397330:027b0c6c <<
0:023> !do 028ab71c
Name: System.SByte[]
MethodTable: 79128598
EEClass: 79128650
Size: 108(0x6c) bytes
GC Generation: 0
Array: Rank 1, Number of elements 96, Type SByte
Element Type: System.SByte
Fields:
None

DanMan226 at 2007-9-12 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...