Search This Blog

Friday, September 26, 2008

Hosting Asp.net 2.0 Application on MOSS 2007

When we have extranet scenarios when people need to have access not only to SharePoint site but also to a custom ASP.NET 2.0 web application we will require to have the same credentials to access to both app's. Assuming that both app's require FBA enable, we can change some entries in the asp.net 2.0 web.config file to accept same SharePoint authentication context.
First we need to set the membership and role provider for both app's and point to the same authentication database.



type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="EPSSqlConnString"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />




type="System.Web.Security.SqlRoleProvider, System.Web,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="XXXSqlConnString"
applicationName="/" />


It's important to set in both web.config files (SharePoint Web Application web.config file and ASP.NET application web.config file the same authentication cookie name.


And the most important tip is to copy to the ASP.NET Web Application web.config file from the SharePoint web.config file the MachineKey entry. This, will allow us to share the authentication context between apps, check this post. validationKey="XXXXXXXXXXXXXXXX"
decryptionKey="XXXXXXXXXXXXXXXX"
validation="SHA1" />That's it. From now on your ASP.NET Web App will respect the same authentication cookie you have in SharePoint Site.

Export To Excel Error throws System.OutOfMemoryException

Hi,
My server configuration is
Intel Xeon(R) X5355 @ 2.66GHz, 3.75 GB RAM
Win 2k3

I have been receiving the above mentioned error when I try to use the out of the box feature of "Export To Excel" provided in the Reporting Services, the reports are hosted on MOSS 2007 using the Reporting Services Add-In. The number of pages generated by the report is 500+, so I don't think exporting a report of around 500 - 1000 should give out a memory exception since we have sufficient RAM on the server.Please advice a solution to solve the error.


Hello vikasmestry,

What is the version of the MS Reporting Services?

Since SQL Server 2000 RS experienced many excel rendering problems.

But it is better with SSRS 2005.

I can suggest you to check the build number of the report server, (browse http://reportservername/reportserver)
And check service packs and fixes for that RS version.

Eralper
MS SQL Server Reporting Services Articles


Hi eralper,
Thanks for the quick response following are the components installed on the server where I have deployed the reports.

Sql Server 2005 with SP2 for SQL Server Reporting Services 2005 ENU (KB934525)
MS SQL Reporting Services Add-in for MS Sharepoint Technologies,
Build number is Microsoft SQL Server Reporting Services Version 9.00.3042.00
I have also applied the hotfix provided by MS, since we are using Forms Authentication on MOSS 2007 and have deployed the reports on MOSS.

I have also tried to workaround with the solution provided from the following link, but no success,

Any helps appreciated.


Thanks,

Vikas Mestry.

Hi,
There is probably not much you can do, once you’ve tried the suggestions in the following suggestion but still can’t export the Excel report. This is a classic web service memory issue. ASP.Net worker process (w3wp.exe) was crashing due to memory issue.
There are some factors may cause this issue.
1. On the x86 platform using the /3GB switch, the OS makes about 1.8 GB (maximum) available to be shared by all applications.
2. The .NET Framework 1.1/2.0 supports the use of the /3GB switch. However, it must share the OS-imposed limit of approximately 1.8 GB memory.
3. Using the /3GB switch cuts down the amount non-paged pool (NPP) memory HTTP.SYS (a kernel-mode driver IIS 6.0) uses to manage its connections, to 128 MB from 250 MB. This could negatively impact performance of IIS, should other sites be hosted on the server.
4. NET applications (of which SSRS is one) typically encounter out-of-memory issues at approximately 1.1 GB (+/- a wide margin, depending on many factors).
5. SSRS currently uses in-memory data caching and rendering; a “streaming” design needed to process extremely large reports simply does not exist at this time.
You may try the following suggestion:
1. Please refer to this KB: You may receive the "System.OutOfMemoryException" error message when you use SQL Server Reporting Services
2. Break the report to get smaller amount of data.
3. You can try using a 64-bit machine which doesn't have limitation of 2GB of usermode space.
4. You can test /3GB switch (of course not recommended on a production server) which allows to allocate 1GB to Kernel mode and 3GB to user mode.http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/927bfe25-1705-4b60-91d4-2ed64d6aa85f.mspx
5. In general the 3GB switch should be used only for testing purposes since this setting shrinks the available address space for the Kernel mode. Below is a KB article that briefly talks about this:A description of the 4 GB RAM Tuning feature and the Physical Address Extension switch
6. Ensure that the Memory recycling checkboxes are unchecked for the SSRS app pool in IIS.
This is a known issue in the Reporting Services 2005. Excel rendering is improved in the Reporting Services 2008 and this issue may not occur in Reporting Services 2008.
Please note that this kind of issues can be difficult to troubleshoot and resolve in forum based support due to complex log capturing steps and the large amount of time required to narrow down possible causes. Please rest assured that we will assist as best as we can. You may wish to consider contacting CUSTOMER SERVICE AND SUPPORT (CSS) for a more timely resolution with phone based support.
To obtain the phone numbers for specific technology request please take a look at the web site listed below.http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
If you are outside the US please see http://support.microsoft.com for regional support phone numbers.
Hopefully this helps.