Showing posts with label Paras. Show all posts
Showing posts with label Paras. Show all posts

Tuesday, November 8, 2011

Xap packaging failed. Object reference not set to an instance of an object.

If you face the error "Xap packaging failed. Object reference not set to an instance of an object." while trying to build your Windows Phone application, make sure you do not have any files added to your solution that no longer exist on disk.


In the image above, you can see the reference to banner.png is outdated and needs to be removed. Once you remove the reference, try rebuilding your app and it should build fine.

--
Paras Wadehra

Saturday, September 24, 2011

Silicon Valley Code Camp

I will be speaking at the Silicon Valley Code Camp this year, on Sunday, Oct-9th at 9:15 am on the topic of 'Beginning Windows Phone Development'.

You can sign up for my session at http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&id=666

You will learn how to build applications for the Windows Phone OS and will be ready to tap into the hot mobile app development market right away.

--
Paras Wadehra

Wednesday, June 29, 2011

Beginning Windows Phone 7 Development - Part 3

Working with Isolated Storage

In this part, I’ll explain how you can store basic data on the phone from within your application. Start by creating a new Silverlight for Windows Phone Application project as described in Part 1.

Open the MainPage.xaml file in design view so that you can see the default phone page created. On this screen you will add the following controls to interact with, along with the appropriate labels:

A TextBox to type in a string of text you want to save; name it txtData.
A Button that you can click to save the text in isolated storage; name it btnSave.
A TextBlock to show the saved text next time you run the app; name it tbData.

Tuesday, March 29, 2011

Beginning Windows Phone 7 Development - Part 2

Developing your first Windows Phone App

In this part, we will start off with developing a very simple, but fully functioning, Silverlight application for Windows Phone. After you are done with creating the application, it will allow you to browse the Internet from within the application.

Start by creating a new Silverlight for Windows Phone Application project as described in Part 1 of the blog series.

Monday, January 24, 2011

Beginning Windows Phone 7 Development - Part 1

Understanding the development environment

To begin developing applications for Windows Phone 7 devices, you will first need to download and install some development tools for the same. You can find the Windows Phone Developer Tools at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce. The package installed from the App Hub includes everything you need to start developing for Windows Phone 7 including Visual Studio 2010 Express, Microsoft Expression Blend and Windows Phone Emulator among other tools. It is also recommended to download and install the Windows Phone Developer Tools January 2011 Update from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23854 after installing the Windows Phone Developer Tools.

Thursday, January 20, 2011

FTP Task error in SQL Server SSIS Package.

If you have created a SSIS Package in SQL Server and you use a FTP Task to upload a file to a FTP server and encounter the error "An error occurred in the requested FTP operation. Detailed error description: 200 Switching to Binary mode. 553 Could not create file" then you are not alone!

Even though the error message itself leaves you clueless, the solution is very simple! Just set the 'Remote Path' property of your FTP Task to "/". That's it - just setting the remote path to / will solve your problem and will take your troubles away!

Enjoy,
Paras

Monday, January 10, 2011

Turn on IncludeExceptionDetailInFaults while connecting to a WCF service from a client.

While using a client to connect and fetch data from a WCF service, you may encounter an error and see the following message displayed on the screen:

Error: The server was unable to process the request due to an internal error.
For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.System.Exception {System.ServiceModel.FaultException}

This happens when any type of error occurs calling a WCF endpoint from a client. The client sees this generic message, as given above, for security reason. If you want to see the full details of the error in the client, you will need to modify the config file of the WCF Host to include full exception details when sending the error to the client.
1.<configuration>
2.<system.serviceModel> 
3.  <services> 
4.    <!-- Step 1. Add a behaviorConfiguration attribute --> 
5.    <service 
6.      name="Microsoft.WCF.Documentation.SampleService" 
7.      behaviorConfiguration="metadataAndDebug"> 
8.      <host> 
9.        <baseAddresses> 
10.          <add baseAddress="http://localhost:8080/SampleService" /> 
11.        </baseAddresses> 
12.      </host> 
13.      <endpoint 
14.         address="mex" 
15.         binding="mexHttpBinding" 
16.         contract="IMetadataExchange" 
17.      /> 
18.    </service> 
19.  </services> 
20.  <behaviors> 
21.    <serviceBehaviors> 
22.      <!-- Step 2. Add a new behavior below.--> 
23.      <behavior name="metadataAndDebug"> 
24.        <serviceMetadata  httpGetEnabled="true" httpGetUrl=""/> 
25.      <!-- Step 3. Add a <serviceDebug> element --> 
26.    <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" /> 
27.      </behavior> 
28.    </serviceBehaviors> 
29.  </behaviors> 
30.</system.serviceModel> 
31.</configuration>
Please note that there is an inherent security issue if this setting is left to 'true' for your production environment. Please see the MSDN article here for more details.

Tuesday, May 25, 2010

Unable to add data connection. Could not load file or assembly

If you receive an error message similar to "Unable to add data connection. Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified" and you are looking for a solution to the same, then you have come to the right place.

The following helped me solve this problem:

Install the following from the Microsoft SQL Server 2008 Feature Pack, August 2008 site:

1) Microsoft SQL Server Management Objects, and
2) Do a repair install on Microsoft SQL Server System CLR Types

This should solve the problem you are having.

Happy debugging!

Monday, October 12, 2009

Visual Studio 2005 debugger does not attach to application

This issue happens with IE8 as the browser used for debugging. IE 8 has a feature called Loosely-Coupled Internet Explorer (LCIE) (http://www.microsoft.com/windows/internet-explorer/beta/readiness/developers-existing.aspx#lcie) which results in IE running across multiple processes.

Older versions of the Visual Studio Debugger get confused by this and cannot figure out how to attach to the correct process.

To overcome this issue, you need to disable the process growth feature of LCIE by following the steps below:
1) Open RegEdit
2) Browse to HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
3) Add a DWORD under this key called TabProcGrowth
4) Set TabProcGrowth to 0

If you run into the same problem on Vista or newer, you will also need to turn off protected mode.

Following the above steps should resolve your issue.

Regards,
Paras Wadehra

Wednesday, February 25, 2009

Response.Redirect does not work in AJAX callback functions

If you can't seem to use Response.Redirect in UpdatePanel's AJAXified callback function, add the following in your web.config file in the appropriate place:

<configuration>
<system.web>
<httpmodules>
<add type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" name="ScriptModule">
</httpmodules>
</SYSTEM.WEB>
</configuration>

Try now, and it works!

--
Paras Wadehra

Wednesday, November 12, 2008

Failed to access IIS metabase.

If you get an error saying "Failed to access IIS metabase." when you try to browse to a .Net App in the browser, it means that you installed IIS after you had ASP.Net installed.

To fix this problem all you need to do is run this command (on a command prompt) on your computer: %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

This will reinstall ASP.Net for use with IIS and in most cases fixes the error.

For reference, the full error that I received was as follows:

Failed to access IIS metabase.
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.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904

Saturday, November 8, 2008

Missing Tabs In Display Properties

Some spyware may create a desktop background to replace your own. After doing this, I’ve seen the display properties tabs for modifying the screensaver and wallpaper disappear to prevent the user from getting rid of the malicious wallpaper.

To bring these tabs back, navigate to the following Registry string:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System

Here, you will find the keys responsible. They are:

NoDispBackgroundPage
NoDispAppearancePage

These will likely be set to 1. Set them to 0 or delete them to get your tabs back.

Registry Editing has been disabled by your administrator

Many people face this error message when they try to open Registry Editor and they have a malware/spyware installed.

Thanks to http://windowsxp.mvps.org/tweakuirest.htm the following gives the solution for the same:

Removing the DisableRegistryTools restriction

For standalone Windows XP systems, perform the steps below to remove the registry editing restrictions.

Method 1: Using the REG.EXE console tool
1. Click Start, Run and type this command:
REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f

Please note that the above command is all one line, so please copy the complete command and then run it.

You should be able to launch Tweak UI, as well as the Registry Editor.

Method 2: Using the Group Policy Editor (Windows XP Professional only)
Click Start, Run and type gpedit.msc and press ENTER
Go to the following location:
User Configuration Administrative Templates System
Double-click Disable registry editing tools and set it to Not Configured
Exit the Group Policy Editor

Note: If the setting already reads Not Configured, set it to Enabled, and click Apply. Then revert it back to Not Configured. This ensures that the DisableRegistryTools registry value is removed successfully.

Spanish version of the article is here.

Saturday, November 1, 2008

MySpace bids for socializing on Google phone

MySpace is the first to unveil an app for owners of the just-released G1 phone powered by Google Inc.'s Android operating system.

News Corp. owned MySpace announced a mobile application for the G1 that can be downloaded wirelessly to the device through the Google-run Android Market. The Market is stocked with add-on programs and games built by third-party developers.

The T-Mobile G1 (made by HTC) costs $179 with a two-year contract in the US.

MySpace's Android application lets G1 users do many of the same things they can do from a desktop computer, like look at profiles and photos on MySpace. In addition, the application lets G1 users quickly upload photos from the phone to their MySpace profiles.

There's no mobile Facebook program for the Android Market yet, but both MySpace and Facebook have already courted iPhone users with programs that let people stay connected.

Tuesday, October 14, 2008

Mail Goggles launched by Gmail team

Google mail engineer Jon Perlow, has created Mail Goggles for Gmail.

The feature's name comes from the famous "beer goggles". When one enables Mail Goggles, it checks whether you really want to send that e-mail by prompting you to solve a few simple math problems after you click "send."

In his own words, "Sometimes I send messages I shouldn't send. Like the time I told that girl I had a crush on her over text message. Or the time I sent that late night email to my ex-girlfriend that we should get back together. Gmail can't always prevent you from sending messages you might later regret, but today we're launching a new Labs feature I wrote called Mail Goggles which may help."

"When you enable Mail Goggles, it will check that you're really sure you want to send that late night Friday email. And what better way to check than by making you solve a few simple math problems after you click send to verify you're in the right state of mind?" says Jon Perlow on his blog post on the Gmail Blog.

By default, Mail Goggles is only active late night on the weekend as that is the time you're most likely to need it. However, once enabled, you can adjust when it's active in the General settings.

"Hopefully Mail Goggles will prevent many of you out there from sending messages you wish you hadn't. Like that late night memo -- I mean mission statement -- to the entire firm," he added.

Thursday, October 9, 2008

'Unbreakable' encryption unveiled

According to BBC, unbreakable encryption has been unvieled in Vienna where a network consisting of six locations across Vienna and in the nearby town of St Poelten, using 200 km of standard commercial fibre optic cables has been setup.

Quantum systems use the laws of quantum theory, which have been shown to be inherently unbreakable. "All quantum security schemes are based on the Heisenberg Uncertainty Principle, on the fact that you cannot measure quantum information without disturbing it," Gilles Brassard of Montreal University explained. "Because of that, one can have a communications channel between two users on which it's impossible to eavesdrop without creating a disturbance. An eavesdropper would create a mark on it. That was the key idea."

Albert Einstein, who discovered the quantum properties of photons of light - indeed, discovered the very concept of the photon - always resisted quantum theory's spooky behaviour, "God does not play dice", being among his oft-quoted objections. But experiments eventually proved that he apparently does, and also laid the technical foundations for today's quantum information revolution - cryptography, teleportation, and computation.

Friday, October 3, 2008

The XML page cannot be displayed

This is a very common error people face when installing ASP.Net applications.

You finish installing the app and go to the corresponding URL in the browser and you see this error message "The XML page cannot be displayed. Cannot view XML input using XSL style sheet. Please correct the error and then click Refresh button, or try again later. A name was started with an invalid character. Error processing resource 'http://servername/applicationname/'."

This is caused due to the fact that the .aspx and .asmx extensions are not registered in your IIS website properly. Perform the following steps to remedy the solution:

1) Open IIS (Start->Run->inetmgr)
2) Right click your website (virtual directory) and select properties.
3) Click the configuration button.
4) In the Application Configuration screen, click add and browse to the path 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll' and in the Extension box type '.aspx' and click ok. Perform this step again for the .asmx extension pointing to the same executable file.
5) Click OK and close the properties box.

Now test your website and it should work fine. Please note that the above steps are for IIS 5.1, but the steps in IIS 6.0 mimic these closely.

Hope this helps!

Wednesday, September 10, 2008

Google to dump user data faster

Google is to halve the amount of time it stores users' personal search data. The search provider said it will anonymize identifiable IP addresses on its server logs after 9 months.

Google currently collects and stores information from each search query, holding information about the search query itself, the unique IP address and details about how a user makes their searches, such as the web browser that is being used.

The company says it needs this information to improve its various services and to help fight threats such as fraud, spam and malicious attacks, and to aid "valid legal orders" from law enforcement agencies.

In June last year, Google announced it was cutting the amount of time such data was stored from 24 to 18 months.

Thursday, September 4, 2008

Microsoft slashes Xbox prices

Microsoft announced that it is slashing prices of its flagship gaming device, XBOX 360, in the US. This will take the price of the basic model down to $199, approximately $50 cheaper than Nintendo Wii. It said that prices for the other Xbox models will drop by $50.

The US cut follows a similar move in Japan. In late August Microsoft announced that Japanese prices of the Xbox 360 would fall in September. The cut meant an Xbox Arcade will cost 19,800 yen ($182), also cheaper than the Wii. Earlier this year, in March Microsoft cut European prices making the recommended price for the Arcade £159.99, lower than the European price for a Wii.

Thursday, August 28, 2008

IE8 Beta 2 Launched

The IE team launched IE8 Beta 2 which can be downloaded at http://www.microsoft.com/ie8.

You can watch videos of IE8 at http://video.msn.com/video.aspx?mkt=en-us&user=-3161786097973413883 and http://www.microsoft.com/windows/internet-explorer/beta/videos.aspx. IE8 is a very developer friendly browser. You can download add-ons for IE8 at http://www.ieaddons.com/. Some of my favorite add ons include Web Slices and Accelerators.

Some cool features of IE8 Beta 2 include color-coded tabbed-browsing and accelerator support. Accelerators are services that you access directly from the webpage in the context of what you’re doing, letting you bookmark, define, email, map and more with a simple selection. Even your search providers are available as Accelerators. Some Accelerators provide previews so that you can view the result without having to leave the current webpage. Clicking on an Accelerator opens a new tab with the full result. You can download accelerators from http://www.ieaddons.com/en/accelerators/

Also, there is better support for when website you are viewing in a tab crashes - now instead of closing the whole IE window along with other tabs open in the same window, only the tab with the crashing website will close!