Error with Report Server

We have been recently approached by a client who had a problem with their report server. If you try to access reports from the reports manager, reports run fine and you can view any report fully and in the right format. The problem arrises when a .NET application tries to open these reports, it just opens a new internet explorer window and uses a url to show the report. This was working fine until the client has probably made some changes to their report server. Since then, reports are not displaying in Internet explorer.

To cut a long story short, we eliminated all authentication issues by checking that security and access to all reports is properly configured and the right users has the right to run these reports. We also eliminated problems between SQL Server and the report server, as reports can run smoothly from the reports manager.

We finally came with the concolusion that the error must be related to Internet Explorer not able to render the report properly. We looked through IIS but could not find anything that looks wrong or not the way it should. I have then checked the security setting of Internet explorer (Tool –> Internet Options –> Advanced) and this all seemed fine but I ticked the box that says display all scripting errors. We also did something which I am not sure if it made any difference, which is that we added the server to the trusted sites in Internet Explorer. Then when we tried to open the report again, this time we started to get scripting errors (although they were not showing in the status bar before for some reason). Scripting error dialogs start to show and we finally started to understand what is happening. We got errors such as: “RS Controller is undefined”, “RSControl object reference not set to an object”. We quickly googled this error and we found an easy and simple solution for this (can’t find the original solution at the moment). The solution is to go to the report server itself, open IIS, right click on your reports server (usually under default website), go to directory –>configuration –> search for axd and double click to open its properties. On there uncheck the filter option (can’t remember the option on top of my head and I don’t have access to any IIS 6.0 at the moment to get the exact option wording). Finally click ok.

This has simply solved the problem, and we managed to get all reports back working from the browser and the .NET applicaiton now opens these reports externally with no issues at all.

I have created this post few days after the resolution, and I don’t have access to the client’s servers at the moment so if you have a similar problem and the post doesn’t answer your questions, please feel free to comment here and I promise I will get back to you as soon as I can with more details and may be a screenshot!

All the best.

A list of Important Questions you need to answer before starting any Integration solution or project.

I am currently working on an Integration solution for one of our clients. The solution is a general integration between two systems. The main thing for me was that I wanted to come up with a list of questions that I need an answer for so that I can start planning and designing the integration solution.

I thought about a list of general questions that most (if not all) consultants working on any integration solutions will need to have complete answers for before starting the design phase, let alone the development phase of the project.

In my opinion, the list of questions are as follows (not in real order – just a braindump!):

  • How many environments do you have? Development, Test and Live? (recommended) or is the project is still in development so you can use live environment for development? Where will be the test environment later on?
  • Is this a direct integration or in-direct integration? Is this an instant, event driven integration or a periodic scheduled integration between two systems? Are their queues for data to be migrated?
  • What backup and restore operations can you do? The ability to Backup and restore data is vital.
  • What integration application or tool are you going to use or is available? SCRIBE, SQL Server Integration Services, Web Services (Microsoft .NET Web Services), console applications, plugins? What SDK will you need? CRM SDK and CRM API for example?
  • The Environment structure: How many physical servers? Where are these servers located? Where is the integration tool or application installed?
  • How and When can I get access to the environment? Access to all servers is required including access to all databases and to all applications. For example: Access to Microsoft Dynamics CRM application (via webclient) is essential to confirm that data imported to a CRM has been migrated successfully.
  • What type and format of extracts and data imports? CSV (Comma separated Values), XML, i-Doc, sql flat files, batch files, etc…
  • Where will the extracts be imported? directly using the tool or via an FTP server? Is an SFTP server required?
  • Are their duplicates? If so where, and what classifies a duplicate?
  • Are there data entry standards for each application in the overall integrated system?
  • Are there fields that are required in each system part of this integration?
  • Are there fields that aren’t used?
  • Are there any fields with null values?
  • What relationship does the data has? are there fields which are dependant on others?
  • What are the primary and forign keys of all tables in each system that will be part of the integrated system? Any field that does not allow null, business required (and preferably business recommended) must have a data upon migration (Defauls can be used then).
  • Overall high level mapping between the different systems.
  • What is the value, length, and format of fields/columns in the source system? What is the corresponding value, length and format in the target system?
  • Are there any Pick Lists? A cross reference is required to map source and target values.
  • What Data validation is required and is acceptable by the client and the project stakeholders?
  • Differencing: What are the business rules for differencing? What data does not need to be updated and when? what data is needed to be updated based on the business requirements?
  • using Default values for all required fields and columns in the target system to avoid causing any errors.

This is the list I have thought of so far. I will keep on updating this list as and when I think of something important that needs to be considered.

Let me know if you have any comments or feedback on these questions and tell me whether or not are these questions helpful.

Thanks for reading.

Improving Microsoft Dynamics CRM Performance Enhancements & Optimization and CRM Server maintenance and improvements

Microsoft Dynamics CRM Performance enhancements, optimisation and maintenance can be divided into three main areas:

– Performance enhancements at Client level: networking issues such cache expiration times, latency and bandwidth
– Optimisation at application level: plugins, sdk code,
– and, improvements at Data layer: Indexes, (physical data layout)

This post is based on Microsoft recommendations and best practices for Microsoft Dynamics CRM 4.0 performance enhancement and improvements.

The first most important enhancement process and action that needs to be taken into account is to always to:  install and setup all the Latest hot fixes and update roll-ups (all CRM 4 updates link – KB article)

Now, let’s go through some of the possible enhancements for each area of those 3 main areas.

Client Level performance enhancement:
————————————————-

– Specify a value from 200 to 300 megabytes of disk space for temporary Internet files
– Web objects cache are usually 3 days by default, change it to make it 15. IIS –>CRM Website ->HTTP header.
– Consider using compression techniques: WAN acceleration appliances have been proved to cause excellent performance enhancements to Microsoft Dynamics CRM 4.0 .
– Make sure that your client machines bypass proxy server if you have one. Proxy servers could delay and affect performance between clients and server machine.
Application server performance enhancement:
———————————————————

– Some .NET code could cause potential issues: Ensure good .net coding practices and avoid bad practices such as memory misuse, improper use (and unessential use) of threading, no resource cleanup, implicit type conversion, Misuse of collections and inefficient loops.
– Increase the reserved port limit. Consider increasing reserved ports to be up to maximum of 5000. Only programs requesting specific ports can use reserved ports. To increase the limit do the following:

1. In the Registry Editor, navigate to the subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
2. Click Parameters, and then, on the Edit menu, click New.

3. Create a registry entry by using the following information:
Value Name MaxUserPort
Value Type DWORD
Value data 65534
Valid Range 5000-65534 (decimal)
Default 0x1388 (5000 decimal)
Description Controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000, inclusive.
4. Close the Registry Editor, and then restart the computer to apply the new configuration.

– Always Monitor performance of your Microsoft Windows server. (don’t forget patches, updates, rollups, etc)
– Disable Tracing and debugging on IIS of your production environment as it usually causes performance issues and slows down performance.
– Thread pool settings: Creating threads on a per-request basis and not sharing threads using thread pools can cause performance and scalability bottlenecks for server applications.
– Installing server roles on more than one computer: In Microsoft Dynamics CRM 4.0 Enterprise Edition, you can specify to deploy one or both of the two server role groupings on one computer, or to have each one of them on a separate machine. Microsoft Dynamics CRM server roles are: Application server and platform server server roles.
– Another improvement is to Modifying the default view for entities that potentially has large number of records. In this case, instead of setting the default view to show all Active records, which in some cases can be too many recrods, you should set the default view of such entities to show “My records” only. This way, there will be no pulling of all active records on the server everytime you attempt to view this entity.
Data Layer performance enhancements:
————————————————-

– Row compression results in significant improvement in application performance.

– Page Compression is only good for 80% reduction in space requirements with no considerable change to performance (negligble performance decrease is possible with page compression).

– Consider using Sparce columns.

– Use Transparent Data Encryption.

 For further details and for a full list of Dynamics CRM performance improvements, please download and study this document by Microsoft:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ba826cee-eddf-4d6e-842d-27fd654ed893&displaylang=en

Another document dedicated to data layer (SQL Server) performance enhancements and which includes some tests carried out by Microsoft as well as best practices can be downloaded here:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b5bb47a4-5ece-4a2a-a9b5-5435264f627d&DisplayLang=en

Hope this help! Please comment with your experiences or if you found anything on this post useful.

Please note that as always, this post and all posts on this blog are provided as is, with no warranty and if you decide to try any of these steps, you will be doing so at your own risk. No liability will ever be on the author and owner of this blog.