21.11.11

Cannot connect to Analysis Services version '10.50.1600.1'.

 Here is one of the peculiar issue related to SSAS.

Error Details
---------------------------


Microsoft Visual Studio
---------------------------
Cannot connect to Analysis Services version '10.50.1600.1'.
---------------------------
OK  
---------------------------

Error    1    The project could not be deployed to the 'Venkat-PC' server because of the following connectivity problems :  Cannot connect to Analysis Services version '10.50.1600.1'.  To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server.   

------------------------- ---------------------------------------------------------------------------
As usual, I have done the changes specified in the error message. Still, I couldn't figure out the issue.
Eureka, got a strike on this issue.


Can you guess the problem??????????


Solution:

    1. May be ur SSAS port is blocking( add port 2383 to the SQL Server Connections in the Windows Firewall.)
  2. Ensure your SSAS services and Browser services is running fine in Services.msc console.
  3. Right click on the project properties and check the deployment server as your server name instead of "local host"
  4. Finally :-) Do not open your project in Microsoft Visual studio console. Instead try to open the BIDS tool to deploy your cubes. Some how, SSAS is not allowing the users to deploy the cubes from this console. (here is the mistake, I have done) Fortunately resolved it.


Cheers,
Venkatesan Prabu .J

19.11.11

Issue with DatetimePicker data

Error String: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.

  The reason for this issue is, the application is trying to convert the data from DateTimePicker to datetime and it's failing.

   The reason is, I;ve tried to pick the data wrongly. dtTimePicker.ToString() -> Instead we have to use dtTimePicker.Text.

Cheers,
Venkatesan Prabu .J

16.11.11

404 Errors after clicking Wordpress links

404 Errors - Page Not found issue. After clicking Wordpress links

Here is the steps to escape from this issue.

  1. Login to the WordPress Dashboard
  2. Click of Settings on the menu on the left hand side.
  3. Click on Permanlinks under Settings.
  4. Remember which setting it is set on now.  (If you are using a custom structure, copy or save the custom structure somewhere.)
  5. Select Default
  6. Click on Save Changes    --- Stay here and check your site. It will work fine :-)
  7. Change it back to the setting it was on before you selected Default. (Put the custom structure back if you had one.)
  8. Click Save Changes
If the above steps didn't fix your issue. Then, change the .htaccess file.

 # BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress 

Option2: 

rename the .htaccess file. change the permalink settings. This will generate the new .htaccess file and you are able to login perfectly.

Cheers,
Venkatesan Prabu. J
Head, Kaashiv Infotech
Chennai.

4.11.11

Carefull while copying the code from pdf

I've happened to copy a small test code from PDF and while executing, I got the below error.

System.Windows.Markup.XamlParseException: Invalid character in the given encoding. Line 1, position 13.

The reason is due to Double quotes and it's not a technical bad code :-)

Be careful while copying the code from PDF. Mostly, it won't work due to this kind of simple issues.

Cheers,
Venkatesan Prabu .J
Head - Kaashiv infotech
www.kaashivinfotech.com

2.11.11

Enabling delay process in c#



To achieve a delay in processing, you have add the name space

using System.Threading;

Add the below code in the place where you want the delay

Thread.Sleep(200);

Cheers,
Venkatesan Prabu .J
Head, Kaashiv infotech,
Chennai
http://www.kaashivinfotech.com/
 

Auto Scroll option in List box


Here is a small code snippet to scroll the content in List box. (If the items are more)

In the top, you should add the code 

this.listBox1.TopIndex = 0;

After wards, you have to modify the index of the list box slowly.

listBox1.Items.Add(line);
this.listBox1.TopIndex = listBox1.Items.Count - 1;

Check my previous post for the entire piece of code.

Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech,
Chennai.

WWW.kaashivinfotech.com

Read text file line by line in C#

I happened to work on files. My condition to read the file line by line.

Here is a small piece of code to read the file line by line.... I got the snippet from Microsoft BOL.

private void btnBrowse_Click(object sender, EventArgs e)
        {
            int counter = 0;
            string line;
            rtb_filecontent.Text = "";
            // Read the file and display it line by line.
            System.IO.StreamReader file =
               new System.IO.StreamReader("D:\\1.txt");
            this.listBox1.TopIndex = 0;
            while ((line = file.ReadLine()) != null)
            {
               // rtb_filecontent.Text = rtb_filecontent.Text + "\n" + line;
                listBox1.Items.Add(line);
                //rtb_filecontent.AutoScrollOffset = new Point(rtb_filecontent.AutoScrollOffset.Y, 10);
                Thread.Sleep(200);
                counter++;
            }

            file.Close();           
        }

Happy Coding
Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech.
Chennai

www.kaashivinfotech.com


1.11.11

Quoting the input string with the specified character

While focusing injection related issue, I happen to look into the function QuoteName method in SQL Server. It's used to Enclose or Quote a string with the specified character string.

Consider the below query, am asking SQL Server to enclose the string with [ ] (Bracket)

SELECT QUOTENAME('abc  [   ] def','[]')


The output is,

[abc  [   ]] def]

This function is really useful to enclose the string with the specified literal and avoid SQL Injection issues while passing the parameter.

Cheers,
Venkatesan Prabu .J
www.kaashivinfotech.com

Listing down Server directories in SQL Server




Listing down the directories in the server:

       
   Below is the command used to list down the directories in the server.

       exec master..xp_cmdshell 'dir'



Thanks and Regards,
Venkatesan Prabu .J
Microsoft MVP
Head - KaaShiv InfoTech
Chennai.

www.kaashivinfotech.com

Error in executing xp_cmdshell command

xp_cmdshell is one of the important command to access the system resources.

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.

Solution:

As told in my previous post, by default highly secure system related properties will be made disabled.

EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE

Cheers,
Venkatesan Prabu .J
Head - KaaShiv InfoTech,
www.kaashivinfotech.com

Error in executing OpenRowset or OpenDatasource queries

While executing  OpenRowset or OpenDatasource queries, you will get the below error.

SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries',

Solution:

By default, SQL Server will disable the options related to the server. We need to enable the same by executing the below queries.

EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'Ad Hoc Distributed Queries', 1
RECONFIGURE WITH OVERRIDE

Cheers,
Venkatesan Prabu. J
Head  - Kaashiv InfoTech, Chennai