Thursday, January 14, 2016

The Template Persistent Cache initialization failed for Application Pool

Problem:

Log Name: Application
Source: Active Server Pages
Event ID: 5
Level: Error
Description: Error: The Template Persistent Cache initialization failed for Application Pool ‘My Classic ASP App’ because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes.

Solution:


Step 1:
%windir%\system32\inetsrv\appcmd list config -section:system.webServer/asp
Step 2:
Go to location ASP Compiled Templates is under C:\inetpub\temp.
Step 3:
Grant network service full control of the folder.



Source:

  1. http://www.mcbsys.com/blog/2010/07/template-persistent-cache-error-with-classic-asp-under-iis-7/

Wednesday, January 13, 2016

DateTime.UtcNow vs DateTime.ToUniversalTime

Problem

I was updating an algorithm on a logging solution.  The time stamps were off due to the server sitting in Arizona and the process being started in Europe.  The issue was how to get the time displayed as true UTC time.

Solution

Initially I was playing with UtcNow in the namespace.  However, this will give you the local time of the server in UTC.  That is not what we were looking for!  We needed to use ToUniversalTime which gives the true time in UTC (Zulu). 

Source

  1. https://msdn.microsoft.com/en-us/library/system.datetime.utcnow.aspx
  2. http://stackoverflow.com/questions/10884549/datetime-conversion-to-filetimeutc

Monday, January 11, 2016

The Xap version number needs to be higher than previous version

Problem:

I ran into this issue when I tried to publish the latest version of windows phone application.  I had to refer back to my article,  http://fetchmytip.blogspot.com/2015/08/the-publisher-display-name-username.html


Key quote:

"Turns out that Visual Studio can't update two very important files, package.appmanifest.xml and WMAppManifest.xml.  These have to be done by hand."  This keyed me into the fact that the appxmanifest.xml file was not updated to what was set in the project.  The build process set the version to 1.0.0.0 regardless of what you set the WMmanifest too!!

Solution:

The version number for the wmappmanifest.xml was set in the project to correct value 1.0.0.3.  However, each time I built the xap the Appxmanifest.xml file listed the version as 1.0.0.0.  This is what the Store loader kept chocking on.   I had to manual change the version number in the appxmanifest.xml file to 1.0.0.3.  Once this was done I could upload the project to the store.

Wednesday, December 16, 2015

Error ITMS-90047: Disallowed paths ("iTunesArtwork,"iTunesMetadata.plist") found at: App Name

Problem:

I upgraded to dev environment to the latest versions of XCode 7.2 and Xamarin iOS 9.2.  
I have been unable to build a production ipa file in Visual Studio or Xamarin Studio.  

I am focusing on getting the Xamarin Studio solution to work before proceeding to Visual Studio.   

XS will build in simulator or deploy to local phone.  It will compile and build the ipa for release but when I go to the application loader.  The ipa fails to load to the store.


Build Case to get the error:
  1. XS right-click and build on iPhone project.
  2. Dig the ipa out of the bin directory.
  3. Launch Application Loader
  4. Load ipa into loader
  5. Click Send    

Solution:

What I have been able to do successfully is to follow the directions provided by Xamarin here Xamarin Studio: http://developer.xamarin.com/releases/studio/xamarin.studio_5.9/xamarin.studio_5.9/#Publishing_Workflow

The publish to archive option will build an ipa file which the application loader will accept.  This is a workaround until I can determine what is going on.

Source:
  1. https://forums.xamarin.com/discussion/comment/123046#Comment_123046
  2. https://forums.xamarin.com/discussion/40388/disallowed-paths-itunesmetadata-plist-found-at-when-submitting-to-app-store/p1
  3. http://forums.xamarin.com/discussion/50979/error-itms-90475-invalid-bundle-ipad-multitasking-support-requires-launch-story-board-in-bundle
  4. https://forums.xamarin.com/discussion/40338/ios-archive-submissions-failed-with-errors-disallowed-paths-itunesmetadata-plist

Kill a running iPhone App

Problem:

We had a situation in an app where the user should not be able to proceed without accepting a condition.  We had the view prompt them when they chose to exit.  The method called Thread.Abort() which lead to an error report.

Solution:

Using the System library, call the CloseMainWindow().  This will gracefully kill the app and return control back to the base OS.

system.diagnostics.process.getcurrentprocess().CloseMainWindow()

Source:

http://forums.xamarin.com/discussion/12026/close-an-application-programmatically
http://stackoverflow.com/questions/3622120/monotouch-reuse-uialertview

Monday, December 14, 2015

Cricket phone for Travel to US

Problem:

We are traveling to the US this week.  I wanted to be able to use my Lumia 730
while I am there.  This is the dual sim phone and so I thought I would just slip in
a US SIM and go.   I looked around and located cricket as an option.  They offer
"reasonable" priced plans for the US Market.  We are spoiled by all the options
here in European market.

Solution:

I ordered my card from US amazon and they shipped within a week.
Once I had the sim here is what I did.
1.) Go to their website: https://www.cricketwireless.com/shop/cart.html
2.) Get the ICCID off the card
3.) Get the IMEI number off your phone.  How? Dial
*#006# and dial
4.) The website will ask you for a stateside address which you will have to provide.

Or you can call 1-855-619-6021

IIS 8.5 - Unable to make the session state request to the session state server.

Problem: 


Got this jewel of an error message after coming in from a great weekend


Solution:

As the error message mentions,  I checked the asp.net service


And yes, the service was disabled and set to manual.  I set it to active and automatic.  But this issue was still there.

Next I checked the registry setting.


Set the value to 1 and rebooted.

Problem Solved!