c#,windows-phone-7,windows-phone-8,windows-phone,isolatedstorageRelated issues-Collection of common programming errors


  • user3085540
    c# mysql asp.net mysql-error-1064
    I got the following error while calling a stored procedure in asp.net c#page. I could not understand the error details. Please help me to solve this.MySqlCommand cmd =new MySqlCommand(“CALL sp_wrt_test(10, @param);SELECT @param”, connection);cmd.CommandTimeout = 5000000;//Assign the query using CommandType7 using (IDataReader reader = cmd.ExecuteReader()) {if (reader.Read())id = “@param = ” + reader[0]; }create procedure sp_wrt_test(in name varchar(100), out retval varchar(200)) begininsert into

  • Abi Ruban
    c# sql
    I am getting an error when trying to connect to SQL Database through C#:SqlConnection sqlc = new SqlConnection(“Server=sql09.freemysql.net,3306;Database=rekklamirajmee;Uid=trubilord;Pwd=******;”); sqlc.Open()When connecting through HeidiSQL, everything works, with the following settings:Advanced on default.I’ve been trying to fix it, have been Google-ing for over an hour but I cannot seem to fix it ;

  • remudada
    c# mysql
    This code is placed in the button. and when i click it to update the data, a messagebox error appears saying “fatal error encountered during command execution”. Your answers would be a great help. Thank youMySqlConnection connection = new MySqlConnection(MyConnectionString);MySqlCommand cmd;try{connection.Open();cmd = connection.CreateCommand();cmd.CommandText = “UPDATE student_offense SET TYPE=@TYPE,DATE_HAPPENED=@DH,DESCRIPTION=@DESC,SANCTION=@SANC” + “Where STUDENT_NO = @STUDENT_NO And DESCRI

  • user1033278
    c#
    How can I execute some code when my program experiences a fatal error and crashes? For example, something goes wrong and the box pops up that say “TestApp.exe has encountered an error and needs to close.” and then I want to write to a file with an error code and say a report of the last few things that were entered into the program. How would I do this in C#??

  • Sharpeye500
    c# asp.net mysql
    MySql.Data.MySqlClient.MySqlException:Fatal error encountered during commandexecution. —>MySql.Data.MySqlClient.MySqlException:Timeout expired. The timeout periodelapsed prior to completion of theoperation or the server is notresponding. atMySql.Data.MySqlClient.MySqlDataReader.NextResult()atMySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehaviorbehavior) — End of inner exceptionstack traceWhat does this error mean? I have max connection pool =200 in the connection string? my app i

  • JM.
    c# windows-services
    I created a windows service and installer that watches a collection of files for changes and copies any file that changes to a destination directory specified in the WatchlistConfig.xml file. I have a couple issues with the service: 1. It has stopped running on one occasion. (unacceptable) 2. We sometimes have to attempt to start the service several times before it “takes”.I believe issue #1 is probably due to not handling fatal errors in the application. I found a bit of code that I tried to

  • samaxI92
    c# .net obfuscation
    The class below causing –fatal error– after obfuscating with confuser(v1.9.0.0); I’m thinking its for bad/unsafe coding. I’m a beginner programmer. So it would be great if some-one point and describe the bad part(if exists) of my code. My IDE is VS-2010. Thanks. public class Check_COMgsm {public Exception ex;public List<string> ModemName;public List<string> ModemPort;public Check_COMgsm(){this.ex = null;this.ModemName = new List<string>();this.ModemPort = new List<string&g

  • C Sharper
    c# asp.net nhibernate mapping
    i have an error ( System.InvalidCastException: Unable to cast object of type ‘AccountProxy’ to type ‘System.String’.) when i did this codei mapped the tables( Account,AccountString,EventData,…) of the the database opengts ( open source) i have this error when i called a function from EventData.csIQuery query = session.CreateQuery(“FROM Eventdata”);IList pets = query.List();return pets;the Stack Trace:[InvalidCastException: Impossible d’effectuer un cast d’un objet de type ‘AccountProxy’ en typ

  • Clark Kent
    c# winforms web-browser clr fatal-error
    Possible Duplicate:Troubleshooting .NET “Fatal Execution Engine Error” My code is throwing a Fatal Execution Error. The exact error is this:The runtime has encountered a fatal error. The address of the errorwas at 0xed40646c, on thread 0x2044. The error code is 0xc0000005.This error may be a bug in the CLR or in the unsafe or non-verifiableportions of user code. Common sources of this bug include usermarshaling errors for COM-interop or PInvoke, which may corrupt thestack.I’m not using unsafe u

  • Darren Young
    c# minidump
    I want to write a utility that in the event of a fatal error, a minidump dmp file is created. I’m using the clrdump api and that seems fairly straightforward.What I wanted to know is, what should I be reading up on to determine how to trigger an event when there is a fatal error that allows for this minidump to be created.I will be writing it in C#.Thanks.

  • xbonez
    android ios windows-phone-7 phonegap sencha
    I need to develop applications for a company on some major mobile OSes, specifically, iOS, Android and WP7.I was initially planning to code three separate applications for the three different OSes – each using the native SDK.However, is there any advantage to doing so? There are a number of cross-platform tools available – Sencha, Phonegap, Rhodes etc. How ‘native’ do the apps created by them feel across devices? What kind of hardware integration do they have (camera, GPS, local storage etc.) ?I

  • that_guy
    windows-phone-7 advertising
    Problem: I am trying to integrate adds into a already successful deployed app. HOWEVER no matter what I do, I cannot seem to get the ads working! I have tried using both the code version AND the drag n’ drop gui version. NEITHER of which I can get to work. This is what I see: When it starts up it may flash for a split second white, where the ad is supposed to be, but none the less, no adds. It recognizes that it is where I place it, when I place it over a button, the button becomes unclickable.

  • lukas
    c# c++ silverlight html5 windows-phone-7
    I recently decided to go into WP7 app development, but haven’t actually started learning silverlight/xna; Only C#. I already know C++ quite well.my Dad, who works for Microsoft, has recently told me that there’s no point to learning Silverlight because it will become irrelevant in the long run; due to HTML5’s superiority. However, Im not aware of any way to develop apps for WP7 using HTML5, and I barely know anything about markup languagez anyway.I wanted to get some proffesional advice on this,

  • joe
    windows-phone-7 windows-phone windows-phone-8
    My Windows Phone app was rejected because when I play a sound in the browser in my app it stops existing background music from playing (rejection issue 6.5.1).How do I update my application to not stop background music?My JavaScript is something like this:var mySound = new Audio(soundpath);Sound.play(mySound);I could not find anything in Microsoft.Xna.Framework.Media that handles how the app handles browser sound, but maybe I missed something?

  • Alexandr
    windows-phone-7 windows-phone-8
    I want to close my app if network not available.I check network in App.cs:private void Application_Launching(object sender, LaunchingEventArgs e){if (!NetworkInterface.GetIsNetworkAvailable()){//close my app}else{//continue to work}}Is there a better way to do it?Thanks in advance.

  • aronchick
    c# windows-phone-7
    Sadly, this question is not for me, so I don’t have all the exact details – but as a follower of Windows Phone and C#, this individual seems to be hard core about getting his point across that Windows Phone will fail because it does not offer native C/C++.Windows Phone Apps Biggest Stumbling BlockI suppose other than the portability, this does not seem to be a particularly difficult problem – 500k items in memory (even if each word is 10 characters) means it’s 5 MB of total memory, and would be

  • Milan Aggarwal
    windows-phone-7 windows-phone-7.1 windows-phone
    Possible Duplicate:Launching other applications in Windows phone 7 Programatically I have created an application in which I download Images/Files and other docs from web for my application but I need them to open using their default file launchers like pdf should be opened via adobe pdf viewer. Currently I have acheived this using external web browser using webbrowsertask. I want it to happen within the app using webclient or webbrowser control. I tried these two methods, they worked correctly

  • Arterius
    windows-phone-7
    I’ve made an app which content is in Armenian language and not natively supported in the Windows Phone OS. The app is a blog reader which read RSS feed for posts and shows that posts in the mobile app. Posts in blog is only in Armenian and there is no translated version to English or any other language. The neutral language for assembly is set to English. The app long description for marketplace is in English and also I clearly mentioned what content of app is in Armenian language. But app certi

  • Praetorian
    windows-phone-7
    I just tried submitting my app to AppHub for the first time and I keep getting a submission failure. This is the error:Error code: 1044 The XAP uses one or more restricted native APIs.I found this post describing the same error but he says his problem was solved by adding the /NOENTRY linker option to his resource-only DLL (used for application name localization). I already have that option set in my localization DLL, yet the submission fails.Has anyone come across this, and hopefully found a so

  • ?????? ??????
    windows-phone-7
    The second time refused to certify the application.Comments: The application’s long description and/or UI content is presented in Ukrainian not natively supported in the OS. For an application to be presented in a language not natively supported in the OS, its description must satisfy the following requirements: 1. A statement to indicate the application is not in the targeted language. 2. A full description text in the targeted language. 3. A full description text in the language supported by

  • user3453654
    visual-studio-2012 cordova windows-phone-8
    TLDR: ‘System.SystemException’ occurred in Microsoft.Phone.Interop.ni.dll wp8 cordova trying to access cameraI have been trying to get a basic wp8 cordova app working for a number of days now, however I am being stumped by errors, both before any of my code is processed and within my code, the application will run with these errors however when I attempt to access native resources, namely the camera and camera roll, more errors are thrown and the calls fail, so I am trying to work through this o

  • Boomerangertanger
    extjs azure windows-phone-8 sencha-touch azure-mobile-services
    I’m trying to get Push notifications working in my Sencha Touch app which will be targeted to Windows Phone, iOS and Android. At the moment, I’m focussing on getting device registration to work inside the Windows Phone app.Please note: We have an existing ASP.NET backend inside a Windows Azure Cloud Service.I have installed the Sencha Touch Extensions for Windows Azure and I have installed the PhoneGap PushPlugin into my Sencha appI’ve followed all the instructions at the Windows Azure website

  • PutraKg
    c# xaml windows-phone-8 lockscreen
    I am trying to capture the phone screen, then use it as a the lock screen image. The problem I am having is the code works fine in emulator but raised the following error when tested on a real deviceA first chance exception of type ‘System.IO.FileNotFoundException’ occurred in ICE.DLL An exception of type ‘System.IO.FileNotFoundException’ occurred in ICE.DLL and wasn’t handled before a managed/native boundary An exception of type ‘System.IO.FileNotFoundException’ occurred in mscorlib.ni.dll and

  • Roosevelt
    sqlite windows-phone-8 mvvmcross
    I’m creating a cross-platform application (Android, iOS, WP8) which using multiple SQLite databases. I installed MvvmCross.HotTuna.Plugin.Sqlite on all platforms, but it is not working on WP8. I’m getting this exception: “Could not open database file: C:\\Data\\Users\\DefApps\\AppData\\{284E2D10-051E-48D8-B895 E8126CCE3192}\\Local\\database.sqlite (CannotOpen)”. I’m opening the database like this:dataService.Initialize(Path.Combine(ApplicationData.Current.LocalFolder.Path, filename));Then I trie

  • DavidGao
    c# .net windows-phone-8 cryptography digital-signature
    My question is : how to sign data using .Net for Windows Phone, the managed language is C#I use RSACryptoServiceProvider to generate a private/public keypair, and then I want to use “SHA256Managed” Hash algorithm to sign a data with the private key, what I did is:string DataTobeEncrypt = “upupdowndownleftleftrightrightABstart”; CspParameter cspParams = new CspParameters(); cspParams = new CspParameters(); cspParams.ProviderType = 1; // PROV_RSA_FULL cspParams.Flags = CspProviderFlags.UseArchivab

  • Ryan
    c# .net windows-phone-8
    I am trying to access a webpage that requires basic authentication using WebBrowser. I know the WebBrowser does not natively support displaying a prompt for basic authentication. However to get around that, I am passing in the username and password in a header or directly in the url.Header Methodstring hdr = “Authorization: Basic ” + Convert.ToBase64String(Encoding.UTF8.GetBytes(“user” + “:” + “passwd”)) + System.Environment.NewLine; GetCurrentWebBrowser().Navigate(new Uri(“https://httpbin.org/b

  • Chris Ballard
    c# javascript cordova windows-phone-8 invokescript
    I am trying to call JavaScript code from C# in a PhoneGap (Cordova) Windows Phone 8 application. Following the steps of this accepted answer thread: How to call JavaScript from C# – Cordova/PhoneGap I am supposed to be able to access a method in the Javascript part or execute a hardcoded JS code. But, I am encountering this error:An exception of type ‘System.IO.FileNotFoundException’ occurred in mscorlib.ni.dll and wasn’t handled before a managed/native boundaryA first chance exception of type

  • joe
    windows-phone-7 windows-phone windows-phone-8
    My Windows Phone app was rejected because when I play a sound in the browser in my app it stops existing background music from playing (rejection issue 6.5.1).How do I update my application to not stop background music?My JavaScript is something like this:var mySound = new Audio(soundpath);Sound.play(mySound);I could not find anything in Microsoft.Xna.Framework.Media that handles how the app handles browser sound, but maybe I missed something?

  • Alexandr
    windows-phone-7 windows-phone-8
    I want to close my app if network not available.I check network in App.cs:private void Application_Launching(object sender, LaunchingEventArgs e){if (!NetworkInterface.GetIsNetworkAvailable()){//close my app}else{//continue to work}}Is there a better way to do it?Thanks in advance.

  • chustar
    c# xaml events windows-phone-8
    In my application, I have an event handler that listens for an event that tells it to update some UI. This event is fired every time one an item is downloaded from a web service. Is it possible to have the event handler delay processing these events until they stop firing (e.g. only update the UI three seconds after the last event was fired?)My current plan is to record the time since last updating the UI from the event handler, and when it gets beyond a certain threshold, update it again, but

  • Jonathan Leffler
    c# xaml binding windows-phone
    In XAML like this:<Button Tag=”{Bindin Explain}”/>In ViewModel:private string explain = “”; public string Explain {get { return explain; }set{if (explain != value){explain = value;NotifyPropertyChanged(“Explain”);}} }But it doesn’t work, so I check it from MSDN: http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.tag%28v=vs.95%29.aspxBecause the value is string type, it can’t be bound by Tag property.What is the explanation?XAML Values object* – A Silverlight object or

  • Emil Borconi
    android ios cordova windows-phone cross-platform
    I will like accomplish the following thing:Get a signature using a touchscreen device, a signature which looks good, and there the screen is responsive when the user signs, and it works cross-platform.Emil

  • Shawn Kendrot
    windows-phone background-transfer
    I noticed this paragraph in the BackgroundTransferService documentation:This property allows applications to request that background transfers proceed when only a cellular connection is available and when the device is on battery power. This is only a preference setting. It does not guarantee that transfers will take place under these conditions. The default value is None, which indicates that transfers should occur only when a Wi-Fi connection is available and when the device is connected to ex

  • joe
    windows-phone-7 windows-phone windows-phone-8
    My Windows Phone app was rejected because when I play a sound in the browser in my app it stops existing background music from playing (rejection issue 6.5.1).How do I update my application to not stop background music?My JavaScript is something like this:var mySound = new Audio(soundpath);Sound.play(mySound);I could not find anything in Microsoft.Xna.Framework.Media that handles how the app handles browser sound, but maybe I missed something?

  • Milan Aggarwal
    windows-phone-7 windows-phone-7.1 windows-phone
    Possible Duplicate:Launching other applications in Windows phone 7 Programatically I have created an application in which I download Images/Files and other docs from web for my application but I need them to open using their default file launchers like pdf should be opened via adobe pdf viewer. Currently I have acheived this using external web browser using webbrowsertask. I want it to happen within the app using webclient or webbrowser control. I tried these two methods, they worked correctly

  • user2056563
    c# silverlight pdf windows-phone-8 windows-phone
    I have few pdf in a folder say Data/PDF/abc.pdf.I am trying to open PDF with the below code:private async void LaunchPDFNew(string name){string imageFile = @”Data/PDF/”+name+”.pdf”;// Get the image file from the package’s image directoryvar file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(imageFile);if (file != null){bool success = await Windows.System.Launcher.LaunchFileAsync(file, options);if (success){// File launchedDebug.WriteLine(“File Launched”);}else{/

  • farshad22
    windows-phone smartphone htc
    I have HTC diamond 2 smartphone and its OS is Windows Mobile 6.5. I installed 3GMobile SMS + Contact Backup 2.08 on my device and tried to backup my messages. But when I start this process it runs to an error: “An unexpected error has occurred in 3GMobile SMS + Contact Backup.exe. Select Quit and then restart this program, or select Details for more information.” When I touch Quit this error displays continiously and never goes 🙁 I touched Details. It showed me this:” 3GMobile SMS + Contact Ba

  • alessandro.francesconi
    c# stream windows-phone isolatedstorage
    My Windows Phone application saves an object composed by some textual/numerical information (something like image capture date and so on) and a couple of JPEG image. For example and simplicity, a single file may be composed by the following data order:from byte 0 to 3 —–> INT NUMBER from byte 4 to 11 —-> TWO INTs DESCRIBING THE SIZE OF THE NEXT IMAGE from byte 12 to X —-> FIRST JPEG IMAGE from byte X+1 to X+7 -> TWO INTs DESCRIBING THE SIZE OF THE NEXT IMAGE from byte X+8 to Y

  • user2757047
    c# windows-phone-7 windows-phone-8 windows-phone
    I am using in-app purchase. To see if user has bought the product, we need to connect to the store:var listing = await CurrentApp.LoadListingInformationAsync();then check the value. But I don’t want to ask store every time user runs the app, so is it OK to save the purchase after a successful purchase in local, and after that, just check whether the user bought the product or not (for durable products).Will this way happen some unexpected scenarios?

  • user3293835
    c# xaml windows-phone-8 windows-phone
    I want to show a text like this: 10 reviewsthis one works:<TextBlock Text=”{Binding Reviews, StringFormat=’reviews {0}’}”/>this one works but an error in XAML appears saying r is unexpected at this position<TextBlock Text=”{Binding Reviews, StringFormat='{0} reviews’}”/>

  • alessandro.francesconi
    c# stream windows-phone isolatedstorage
    My Windows Phone application saves an object composed by some textual/numerical information (something like image capture date and so on) and a couple of JPEG image. For example and simplicity, a single file may be composed by the following data order:from byte 0 to 3 —–> INT NUMBER from byte 4 to 11 —-> TWO INTs DESCRIBING THE SIZE OF THE NEXT IMAGE from byte 12 to X —-> FIRST JPEG IMAGE from byte X+1 to X+7 -> TWO INTs DESCRIBING THE SIZE OF THE NEXT IMAGE from byte X+8 to Y

  • Jader Dias
    c# .net isolatedstorage
    I want to write a file where an external application can read it, but I want also some of the IsolatedStorage advantages, basically insurance against unexpected exceptions. Can I have it?

  • Cyberherbalist
    windows-phone-7 isolatedstorage
    I am getting some unexpected behavior using Isolated Storage. In this case, I am using it to maintain state for the purpose of tombstoning.This is a Ham Radio licensing exam practice app. Here is what happens. When the app is first run, the user is on the MainPage, and selects one of two links, OptionPage1 or OptionPage2 (they work similarly so I’ll just focus on one). On OptionsPage1, the user selects from a number of options, then clicks a Launch button to go to ExamPage, where the user an

  • Jakob
    c# silverlight synchronization isolatedstorage
    Since use of isolatedstorage storing for silverlight can provide a method for storing userdata locally and whikle not connected to the internet, I’m interested in hearing your thoughts about intelligently synchronizing dbdata and silverlight isolatedstoragedata.I’ve currently implemented a solution, but it seems a bit complex to me, so I’d like to hear if I could have done it differently.I have a list of documentobjects that I save to the isostore.the document has (datetime)DateModified and (boo

  • Peter Mortensen
    silverlight log4net isolatedstorage
    First, I know about Clog, and I do not want to implement this piece. The reason? We can’t maintain severeal logging ‘frameworks’.So to my question:Is it possible to implement log4net in a Silverlight application? What I want to achieve is logging to the Isolated Storage. I know, there’s only 1 MB of storage available, but this limit can be increased (the user has to accept this, I know too). By the way, please don’t provide me alternatives. I do only want to know if somebody implemented a log4ne

  • CognitiveDesire
    javascript html css windows-phone-8 isolatedstorage
    I have a HTML and JS file inside the application package of WP8 app and at runtime move the files to Isolated storage and then navigate the Browser to the html page.as give in the link hereWhen I keep these files in the folder and zip that folder and at run time unzip the files and do the same as above the page is rendered on the browser but CSS and JS files etc do not loadPlease help

  • Jeff Yates
    silverlight mvvm isolatedstorage
    I am using Silverlight MVVM and IsolatedStorageSettings.SiteSettings for session management. Everything is working fine and i am able to read the data in the next page , but design view is giving error as NotSupportedException.P.S. : I am storing one single value and bot my view and view model are in different project.

  • Pius
    visual-studio-2010 windows-phone-7 isolatedstorage
    I am making a small Windows Phone 7 application and have lots of text files used by the app. They all contains LOTS of lines. Is it possible to make some files be already installed when I launch the application? I know that emulator doesn’t save isolated storage when closed but I don’t need it. I want to make some data files which would be already in the storage when my app starts for the first time. If it is possible, how do I do that?I am using Visual Studio 2010

  • Qaiser
    sqlite windows-phone-8 isolatedstorage
    i’ve created a windows phone 8 app, that is giving the result of calculations at runtime, now i need to store that result for future use/access,what to do?i have totally no idea of storage in wp8, although i’ve seen many tutorials for isolated storage & sqlite, but did’nt understood whats going on in them……any suggestion? how to store my data..? easy steps to followthis is the code, which is showing result on a page at runtime,protected override void OnNavigatedTo(NavigationEventArgs e){

  • Rosarch
    c# .net windows-phone-7 isolatedstorage
    I’m building a Windows Phone 7 app in Silverlight. I’m having difficulty with IsolatedStorage.IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication();if (!storage.FileExists(STORIES_FILE)){storage.CreateFile(STORIES_FILE);}string contents;// fails hereusing (IsolatedStorageFileStream stream = storage.OpenFile(STORIES_FILE, FileMode.Open)){using (StreamReader reader = new StreamReader(stream)){contents = reader.ReadToEnd();}}The exception is:”Operation not permitted on Isol

Web site is in building