Monday, April 20, 2015

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.


SOLUTION / FIX : 

the 64-bit framework dlls weren’t able to 32-bit versions of the 'Microsoft.ACE.OLEDB.12.0' provider modules.

If you are running Visual Studio on a 64-bit machine, IIS 7 is not (by default) serving 32-bit applications.

However, the database engine operated on 32-bit.

Follow these steps to fix the issue:

1.    Open the IIS 7.5 manager and select the application pool corresponding to your web application.
2.    Right click the application pool and select ‘Advanced settings’.
3.    Select the field ‘Enable 32-bit applications’ and change it to 'true'.
4.    Restart your application pool and access your application to fix the error you saw.



Monday, April 13, 2015

No mapping exists from object type System.Web.UI.WebControls.

I am getting the the message on the command:

commandObj.ExecuteNonQuery();

Complete message is:

No mapping exists from object type System.Web.UI.WebControls.TextBox to
a known managed provider native type.



Solution: its actually a very silly mistake 

Seems as if  you set the DataBinding on the TextBox/Label itself instead of the Text property of the TextBox/Label?

for Example: 

cmdInsert.Parameters.Add(new SqlParameter("@LastName", txtLastName));

Instead of
cmdInsert.Parameters.Add(new SqlParameter("@LastName", txtLastName.Text));

Wednesday, April 8, 2015

Send Email from Yahoo!, GMail, Hotmail (C#)

Server Parameters

Server NameSMTP AddressPortSSL
Yahoo!smtp.mail.yahoo.com587Yes
GMailsmtp.gmail.com587Yes
Hotmailsmtp.live.com587Yes

Sample Code

using System.Net;
using System.Net.Mail;
string smtpAddress = "smtp.mail.yahoo.com";
int portNumber = 587;
bool enableSSL = true;
string emailFrom = "fromEmailID@yahoo.com";
string password = "yourEmailPassword";
string emailTo = "someone@domain.com";
string subject = "Testing Email ";
string body = "Hello, I'm sending Email via Code ..." ;
using (MailMessage mail = new MailMessage())
{
    mail.From = new MailAddress(emailFrom);
    mail.To.Add(emailTo);
    mail.Subject = subject;
    mail.Body = body;
    mail.IsBodyHtml = true;
 
    mail.Attachments.Add(new Attachment("C:\\SomeFile.txt"));
    mail.Attachments.Add(new Attachment("C:\\SomeZip.zip"));
    using (SmtpClient smtp = new SmtpClient(smtpAddress, portNumber))
    {
        smtp.Credentials = new NetworkCredential(emailFrom, password);
        smtp.EnableSsl = enableSSL;
        smtp.Send(mail);
    }
}




Monday, December 1, 2014

Responsive Web Design Media Width Viewport Size

Responsive Web Design Media Width Viewport Size
Company Model Diagonal
cm/in
Resolution Viewport
Samsung Galaxy W (I8150) 9.4 (3.7) 480 x 800  -
Samsung Galaxy S 10 (4.0) 480 x 800 320 x 534
Samsung Galaxy SII 10.8 (4.27) 480 x 800 320 x 533
Samsung Galaxy S III (I9300) 12 (4.8) 720 x 1280 360 x 640
Samsung Galaxy S4 (I9500) 13 (5) 1080 x 1920 -
Samsung Galaxy Nexus 11.8 (4.65) 720 x 1280 320 x 532
Samsung Galaxy Tab 18 (7) 600 x 1024 600 x 1024
Samsung Galaxy Tab 7.7 20 (7.7) 800 x 1280 800 x 1280
Samsung Galaxy Tab 10.1 26 (10.1) 800 x 1280 800 x 1280
Samsung Galaxy Note 13 (5.3) 800 x 1280 400 x 640
Samsung Galaxy Note II 14.1 (5.55) 720 x 1280 360 x 640
Samsung Galaxy Note 10.1 26 (10.1) 1280 x 800 800 x 1280
Apple iPad - 1st Gen, 2 25 (9.7) 1024 x 768 768 x 1024
Apple iPad - 3rd Gen, 4th Gen 25 (9.7) 2048 x 1536 768 x 1024
Apple iPad Mini - 1st Gen 20 (7.9) 1024 x 768 768 x 1024
Apple iPhone 4 / iPod Touch 8.9 (3.5) 960 x 640 320 x 480
Apple iPhone 4S / iPod Touch 8.9 (3.5) 960 x 640 320 x 480
Apple iPhone 5 10 (4) 1136 x 640 320 x 568
Apple iMac 21.5-inch 55 (21.5) 1920 x 1080 1920 x 1080
Apple iMac 27-inch 69 (27) 2560 x 1440 2560 x 1440
Blackberry BlackBerry PlayBook 18 (7) 1024 x 600 600 x 1024
Blackberry BlackBerry Z10 11 (4.2) 1280 x 768 345 x 521
Nokia Lumia 710 9.4 (3.7) 800 x 480 320 x 480
Motorola Motorola Defy 9.4 (3.7) 854 × 480 320 x 569
Motorola Motorola Droid 9.4 (3.7) 480 x 854 360 x 599
Motorola Motorola Droid Razr 11 (4.3) 540 x 960 360 x 640
Motorola Motorola Razr HD 4G 12 (4.7) 720 x 1280 360 x 598
Motorola Motorola Milestone 9.4 (3.7) 480 x 854 320 x 569
Motorola Motorola Xoom 25.7 (10.1) 800 x 1280 800 x 1280
Nokia Lumia 800 9.4 (3.7) 800 x 480 320 x 480
Nokia Lumia 820 11 (4.3) 800 x 480 320 x 480
Nokia Lumia 900 11 (4.3) 800 x 480 320 x 480
Nokia Lumia 920 11 (4.5) 1280 x 768 320 x 480
Nokia Lumia 1020 11 (4.5) 1280 x 768  -
Sony Sony Vaio Z92 33 (13.1) 1600 x 900 -
Sony Sony Vaio Z128 33 (13.1) 1920 x 1080 -
Sony Sony Vaio F series 42 (16.4) 1920 x 1080 -
Sony Xperia S 11 (4.3) 720 x 1280 360 x 640
Sony Xperia Sola 9.4 (3.7) 480 x 854 320 x 569
Sony Xperia U 8.9 (3.5) 854 x 480 320 x 569
Sony Xperia Ion 11.6 (4.55) 720 x 1280 -
Sony Xperia Z 13 (5) 1920 x 1080 360 x 598
Sony Xperia E 8.9 (3.5) 320 x 480 320 x 480

Monday, July 21, 2014

SQL Server Reporting Services "An error occurred during local reporting processing. Object reference not set to an instance of an object."

SQL Server Reporting Services "An error occurred during local reporting processing. Object reference not set to an instance of an object."


"An error occurred during local reporting processing. Object reference not set to an instance of an object."

when I try to Export the report output to PDF it gives the following 


SOLUTION can be. 


This error message indicates the object reference is not set to an instance of the object. It can be caused by one or more of the following reasons.


  • There are soft page breaks within empty lists in the report.
  • There are hidden groups within the report and you tried to export it to PDF.
  • The report has a link to a subreport that is not published on the report server and you tried to export it to CSV.
  • There are text boxes with a width and/or height of zero in the report.
  • A text box is either hidden or the NoRows property is set to true.
  • A text box spans table cells where some cells have a collection of null values.
  • The report has static columns and/or rows and, in the Visibility properties, Hidden is set to true.
  • The report has static columns and/or rows and there are grand totals in the report.
  • The report has static column headings and, in the Visibility properties, Hidden is set to true.
  • The matrix report has multiple columns and rows and, in the Visibility properties, Hidden is set to true and you tried to export to PDF or TIFF.




Saturday, July 19, 2014

HTML/HTML5 Input type=“file” Accept Attribute File Type


Valid Accept Types:

For CSV files (.csv), use:
<input type="file" accept=".csv" />

For Excel Files 2003-2007 (.xls), use:

<input type="file" accept="application/vnd.ms-excel" />

For Excel Files 2010 (.xlsx), use:
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />

For Text Files (.txt) use:

<input type="file" accept="text/plain" />

For Image Files (.png/.jpg/etc), use:

<input type="file" accept="image/*" />

For HTML Files (.htm,.html), use:

<input type="file" accept="text/html" />

For Video Files (.avi, .mpg, .mpeg, .mp4), use:

<input type="file" accept="video/*" />

For Audio Files (.mp3, .wav, etc), use:

<input type="file" accept="audio/*" />

For PDF Files, use:

<input type="file" accept=".pdf" />

Thursday, November 14, 2013

Wordpress Plug-in Search Error : An unexpected error occurred.Something may be wrong with WordPress


When I was going to search and install a new Plug-in in Wordpress admin panel. Following error comes

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.

Try again



SOLUTION :

If the problem is happening when you search plugins or themes its probably because your connected to a proxy and you need to configure it on your wp-config.php


/** EXAMPLE - proxy settings */
define('WP_PROXY_HOST', 'proxy.url.com');
define('WP_PROXY_PORT', '1234');
define('WP_PROXY_USERNAME', '');
define('WP_PROXY_PASSWORD', '');
define('WP_PROXY_BYPASS_HOSTS', 'localhost');