Search This Blog

Saturday, August 16, 2014

Virtual Router for Windows 8


I tried several attempts to setup my win8.1 laptop as a wifi hotspot.
None of the straight forward ways worked for me.

Here is what I found that worked:

http://virtualrouterplus.com/

http://virtualrouterplus.com/submit/virtualrouterplussetup.exe

Saturday, August 2, 2014

Mouse not working correctly in Chrome in a Windows 8 laptop

Here is the oddest mouse I've seen in years....

Open Chrome, search google, open URL in new tab.
Left click on tab and it closes !!!?

Found this issue: Cause low battery in wireless mouse except I'm not using a wireless mouse.
https://productforums.google.com/forum/#!topic/chrome/Op4Zema2hyo

Unplug the mouse and plugged it back in and everything is good.

Very Odd.

Tuesday, June 24, 2014

ApplicationPoolIdentity ran web service cannot write to the Event log


http://support.thycotic.com/KB/a220/giving-application-pool-access-to-event-log.aspx

(From Article) states giving NETWORK SERVICE permission to eventLog

1. Determine the account that is running Secret Server. This can be done by logging in to Secret Server, clicking on "Administration", and then on "Diagnostics". Look for any of the "Thread Identity" labels. These will contain the identity of Secret Server (often NT AUTHORITY\NETWORK SERVICE).

You can also determine the identity by logging in and navigating to http://yoursecretserverurl/Installer.aspx

The first step of this installer/updater page will tell you the application pool identity.

2. Open the Registry Editor on the machine running Secret Server (start->run-regedit)

3. On the left, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog

4. Right click on the "eventlog" folder in your registry editor and select "Permissions"

5. Give the account running Secret Server Full Control to this folder

Saturday, May 10, 2014

AutoMapper


AutoMapper:
(from automapper.org)

AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another.

https://github.com/AutoMapper/AutoMapper
http://automapper.org/

Another essential open source library...

For Microsoft Visual Studio 2013, you can install Automapper from the nuget manager.

Amazing little code needed to convert one class into another.
Typically, DTOs deserialized from data source are often less then ideal to use display data in UI or databind.
Automapper saved me 4-5hrs today and I have my code working in under 30 mins.


    public class LegoCategory : INotifyPropertyChanged
    // ReSharper restore InconsistentNaming
    {
        private bool _inUse;

        [Column]
        public Int32 CatID { get; set; }

        [Column]
        public string CatDesc { get; set; }

        [Column]
        public bool InUse
        {
            get { return _inUse; }
            set
            {
                if (value == _inUse) return;
                _inUse = value;
                OnPropertyChanged("InUse");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }


    public class LegoCategoryDto 
    // ReSharper restore InconsistentNaming
    {

        [DataMember,Column]
        public object CatID { get; set; }

        [DataMember, Column]
        public string CatDesc { get; set; }

        [DataMember, Column]
        public object InUse { get; set; }
        

    }

//Code fragment...
//fetches data from SQLite => LegoCategoryDTO converts to LegoCategory using
//AUTOMAPPER

 var cmd = new SQLiteCommand(sql);
 var list = cmd.Deserialize<LegoCategoryDto>(Database.SQLITE);
 Mapper.CreateMap<LegoCategoryDto, LegoCategory>();
 return list.Select(Mapper.Map<LegoCategory>).ToList();





Wednesday, May 7, 2014