Posts

IIS "Access to the path 'C:\inetpub\wwwroot...' is denied."

Image
When a website in IIS gives you the following yellow screen of death with "Access to the path 'C:\inetpub\wwwroot...' is denied." this means that it is a permission thing. The account running your application pool doesn’t have permission to access this path. This will usually happen when you run your website under a different application pool other than the DefaultAppPool. When a new application pool is created, a new virtual account is created in Windows and it is this account that doesn’t have permission. To solve this issue: In Windows Explorer, right click on the folder you have your website files; in my case C:\inetpub\wwwroot\dnndev8.me\, and select Properties Go to tab “Security” Click “Edit” Click the “Add” button In the “Select Users or Group” window click “Locations” and select your local computer Then in the “Enter the object names to select” textbox write “IIS AppPool\dnndev8.me” without the double quotes. My app pool name was dnndev8.me

Delete data from table in chunks without getting out of disk space due to transaction log

Today I found myself trying to delete million of rows from a table with over 200.000.000 rows. A simple Delete From tbData Where ID < 100000000 resulted in a full disk space and a huge transaction log file. The solution came from this post : deleteMore: Delete TOP(10000)  tbData  Where CDRID < 100000000 IF @@ROWCOUNT != 0     goto deleteMore; The  TOP(10000) is up to you and you should adjust it to your data. For me the optimal value was 500000.

ASP.NET entity datasource control error - The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata.The following error(s) occurred. The provider did not return a Provider Manifest instance.

Image
When you add an entity datasource control and you try to configure it you might get the following error: The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata.The following error(s) occurred. The provider did not return a Provider Manifest instance. Error trying to configure Entity Datasource control In order to fix this you have to open your edmx file with notepad, locate ProviderManifestToken and change it's value from 2012 to 2008 as shown in the picture below. Save, rebuild in Visual Studio and you are done.

Chage the highlighting color for braces in Visual Studio

Image
The default color of matching braces in Microsoft Visual Studio doesn't help spotting the braces because it's a light grey. You can change that from Tools --> Options --> Environment --> Fonts and Colors --> Text Editor and from the Display Items list select Brace matching (Rectangle). Pick a color you like and you are good to go.

Google maps are slow! //well not exactly :)

Image
The new Google Maps are here. New, improved maps, it's an eye candy! But as you may have noticed if your machine isn't powerful enough the google maps is going to be slow and sluggish. The reason for this is that the new google maps use WebGL technology to render everything locally on the browser. WebGL tries to use your GPU to render things. If your browser does not support WebGL or your GPU isn't powerful enough then you can use Google Maps Lite mode. In order to enable Lite mode use the following link:       https://www.google.com/maps/preview/?force=canvas To go back to full mode use this link:       https://www.google.com/maps/preview/?force=webgl source: Google Help Update 25/10/2013 Google has added a message in their help page that they use by default Lite mode in Firefox: "We currently default to Lite mode on Firefox while we work on improving the 3D experience."

Convert Outlook EntryID to EwsID Exchange Web Services

I found myself trying to find an email in Exchange the other day, based on the EntryID I could retrieve from the email in Outlook (Exchange account). I was using Exchange Web Services EWS to access the mailbox the email was stored in. In EWS you can retrieve an item by providing its ID Dim item As Item = item.Bind(service, New ItemId(entryid))   Well quickly I found out that the EntryID of the email in Outlook was not what I wanted. After some reading I discovered the ConvertId function that converts ids from one format to another. The available formats are  EntryId EwsId EwsLegacyId HexEntryId OwaId StoreId   So I went on to do the obvious, convert my ID from EntryId to EwsId. I wish! Microsoft.Exchange.WebServices.Data.ServiceResponseException "The specified object was not found in the store." was what I got to my surprise! What actually was wrong was that the EntryID was not in EntryId format but i n HexEntryId format . The code that gets the job don

Color picker extension for Visual Studio CSS editor

Image
Well I have been looking for this for quite some time! No more wondering which color is #808080 or going outside VS to find/convert a color. devColor is a Visual Studio extension that " underlines hex/rgb/named colors in stylesheets and XAML files with the correct color. It also includes a color picker. " Download it from here .