Showing posts with label Microsoft Bug. Show all posts
Showing posts with label Microsoft Bug. Show all posts

Friday, November 22, 2013

Duplicate Subscription in SSRS

If anyone experience duplicate subscription creation in SSRS while using SOAP API,Don't be panicked. It would be very difficult to troubleshoot this issue.There is a bug in SSRS. It might have caused the issue.

Subscriptions can be created using CreateSubscription() SOAP API . This API creates Subscription and returns SubscriptionId. If you want to update the Subscription, SetSubscriptinProperties() API is used. If you pass SubscriptionID and updated Subscription data, It will update specified Subscription.

If you create Subscription using CreateSubscription() SOAP API and  update the Subscription using the returned SubscriptionId, Intead of updating existing subscription, New Subscription will be created. You will end up in duplicate subscription.

The reason is that CreateSubscription() method returns SubscriptionId with alphabets in lower case. But Original Subscription in SSRS was created with Upper cased SubscriptionId. When You pass the lower cased  Subscription ID to update the existing Subscription, SSRS internally checks with out ignoring case. Since It doesn't find any subscription, It just Create a new one. Even though the MSDN document doesn't say anything about Subscription creation, new subscription is created. Since this API method returns null, You cannot get the SubscriptionID also!.

So always convert the SubscriptionId to upper case and then  pass this converted SubscriptionId to call SetSubscriptionProperties() method.



Wednesday, October 2, 2013

Why CSS hates IE?

 Creating Software Web product with attractive UI and Rich Client Application necessitates the heavier use of CSS. Number of CSS files and rules used in the application grows heavily in the modern day powerful web applications. Cross browser compatibility is a major challenge in web applications. Internet Explorer has specific challenges while handling CSS.  While designing the UI architecture, It is very important to consider some of the specific limitation with respect to IE .

Number of File Links per Page

Internet Explorer can accept only 32 file links per page. If you have more than 32 files, additional files will be just ignored. If you have more than 32 files, You may need to combine the CSS content to fewer files.  Normally, You can use some minifying/combining program to create single large file. But your ordeal will not end with this approach.  There is an another limitation that will hit you by this approach.

Number of Rules per Page

To make the web page render fast, Combining the files and Minification of JavaScript and CSS files are common practice. There are various advantage of CSS files Minification. Some of them are

  • Number of request from request from client to server reduces
  • Size of the File transfer reduces
  • IE limitation with number of CSS file per page can be handled
But IE has one more limitation. Number of CSS rule per page is limited to 4095.  If you have more styles, those styles will be ignored as usual.

When you write minification program, You need to Create multiple minified CSS files by considering 4095 rule!

IE accepts 32 files alone per page . At the same time, Maximum CSS rules allowed per page is 4095. CSS always hates Internet Explorer!

Sunday, December 16, 2012

Bug in Microsoft SSRS architecture

Microsoft SQL Server Reporting services (SSRS) is one of the best reporting solution available in market. Since it is coming as free with SQL Server, Most of the companies tries to use it for Reporting solutions. For intranet based appliation, it works well. Now world is moving towards cloud. As Databases are moved to cloud and web based application are common , We need a Reporting solution with perfect 3 tier architecture. As per Microsoft documentation, SSRS is multi-tiered, with an application layer, server layer, and data layer . Since it follows three tier architecture, Any front end application like report manager, report builder or third party application can access the SSRS application layer via Http/Https connection. When the application is hosted in cloud, port for http or https alone needs to be opened.
Architecture from MSDN
Since https port alone needs to be opened, We can think SSRS as perfect solution. You can create a web application by embedding reportviewer and link to the report builder in to your application. Report viewer should  help to view the report and Report builder will be helped to design report. If you create your web application as above architecture and test it locally, It will work fine. The problem will start if you host your application in cloud. When you open the report builder and try to create a dataset, you will end up in getting the following error.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

 
If you open the 1433 port for sql server to public, Application will work fine. What does mean? Yes. You are correct. Report builder is not a perfect 3 Tier click once application. It connects database directly from client using SQL port. If you start search the web for this issue, you can find lots of reference about the issue. Someone even created a bug in Microsoft Connect and Microsoft accepted this as a limitation and try to fix in "unknown" version in the future.

It is totally impossible to open SQL port to the universe. Now you are in real trouble. The only way to overcome the issue is to keep specific machine to access Report builder and relax firewall rule to access SQL port from that specific machine.

When raised this issue to Microsoft, they are not ready to accept it as product bug. But they are calling this as a documentation bug. But still the documentation bug was not fixed till the post is published. So If you try to use SSRS in cloud, Be aware of this issue and plan accordingly!

How to use SSRS in cloud environment? Microsoft provided a very good solution earlier and now destroying this again. Let's see about that solution in another post.