Friday, March 9, 2012

ReportManager - new "Object reference not set to an instance of an object."-error

Hi,

Im having a bit of a problem with reporting services.

First of all, Im running three virtual servers. "MyApp", "ReportServer" and "ReportManager".

In order to have a single sign-on experience, I have authentication configured to Forms in all three web.config-files with the same cookie-name and so forth. I also added a MachineKey to all three web.config files to share the authentication for the virtual directories. (and yes, I use the same machineKey for all three apps)

To login, a user can enter "/MyApp", "/ReportServer", or "/ReportManager" and then I get redirected to "/MyApp/login.aspx" (as that is the setting in the web.config-files).

-
<authentication mode="Forms">
<forms name=".MyApp.Net" loginUrl="https://MyApp/Login.aspx" protection="All" timeout="60" />
</authentication>
-

It works!
The authentication works fine, and I get redirected to the specific directory. MyApp, well, here is the original application, no problems here. The "ReportServer" login works fine too, I get redirected to that directory and the reports I have show-up in a directory-listing type of way...

However...
When I try to go in to the ReportManager I get a nasty error:

-
SQL Server Reporting Services
Error

Object reference not set to an instance of an object.
Home
-

Checking the log-files to see if an error is generated I get the following:

ReportServerWebAPP.log
-
<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.2047.00</Product>
<Locale>en-US</Locale>
<TimeZone>W. Europe Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServerWebApp__07_25_2006_15_21_11.log</Path>
<SystemName>MYLOCALDOMAIN</SystemName>
<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>
<OSVersion>5.2.3790.65536</OSVersion>
</Header>

w3wp!ui!c!2006-07-25-16:37:52:: e ERROR: Object reference not set to an instance of an object.
w3wp!ui!c!2006-07-25-16:37:52:: e ERROR: HTTP status code --> 500
-Details--
System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.UI.BasePermissions.ReadPermissions(String[] permissions)

at Microsoft.ReportingServices.UI.Permissions.GetPermissions()

at Microsoft.ReportingServices.UI.Permissions.CurrentUser(String itemPath)

at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)

at System.EventHandler.Invoke(Object sender, EventArgs e)

at System.Web.UI.Control.OnInit(EventArgs e)

at System.Web.UI.Page.OnInit(EventArgs e)

at System.Web.UI.Control.InitRecursive(Control namingContainer)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
w3wp!ui!c!2006-07-25-16:37:52:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
-

ReportServer.log
-
<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.2047.00</Product>
<Locale>en-US</Locale>
<TimeZone>W. Europe Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__07_25_2006_15_17_42.log</Path>
<SystemName>MYLOCALDOMAIN</SystemName>
<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>
<OSVersion>5.2.3790.65536</OSVersion>
</Header>

w3wp!webserver!1!2006-07-25-15:17:42:: i INFO: Reporting Web Server started
....
....
w3wp!library!1!07/25/2006-16:37:52:: i INFO: Call to GetPermissions:/
-

Now what?
It seems that there is something wrong with the permissions and that this causes the report manager to behave as expected... but I just cant figure out what..


Other things worth mentioning...
Im using custom authentication, overloading LogonUser etc, pretty much according to this article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp

However, that part seems to be working fine, since I can access the "ReportServer"!

Ive also tried different permutations of authentication mode="forms", "windows" and impersonate with no luck.

My RSWenApplication.config looks like this:
-
<UI>
<CustomAuthenticationUI>
<loginUrl>https://MyApp/Login.aspx</loginUrl>
<UseSSL>True</UseSSL>
<PassThroughCookies>
<PassThroughCookie>.MyApp.Net</PassThroughCookie>
</PassThroughCookies>
</CustomAuthenticationUI>
<ReportServerUrl>https://ReportServer</ReportServerUrl>
</UI>
-

One last thing that might be of interest... I use SSL on the webserver, but there is no root-certificate installed since this is only a development machine... this was a problem at first, but then I added this to the Global.asax-file in the "ReportManager"-folder.

-
void Application_AuthenticateRequest(object s, EventArgs e)
{
ServicePointManager.ServerCertificateValidationCallback = delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; };
}
-

And now I get the "Object reference not set to an instance of an object."-error instead!


Please help me... getting increasingly frustrated...

Hey,

did you look at the other threads on this forum about the problem?
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=470075&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=444736&SiteID=1

Maybe they offer a solution!

Grts

|||

Hi again,

Yeah, Ive taken a look at both of them and all the pages referenced in those articles... and so forth... still no luck...

Would appriciate any help I can get... been at it for almost a week now and Im starting to loose all hope :-)

Is there for example any place to start looking? Or would I have to tear everything down and start over?

Thanks!

|||A quick look at your config file, but this doesn't look right: https://ReportServer. Is that just a typo?

No comments:

Post a Comment