Alvin’s Blog

January 27, 2012

Crystal Reports 2010: How to get it to run using IIS (vs IIS Express)

Filed under: Crystal Reports — amcbride @ 8:23 pm

cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1

January 5, 2012

Windows 7: How to resolve sleep issues

Filed under: Windows 7 — amcbride @ 5:17 pm

http://support.microsoft.com/kb/976877

*** Very important ***
Check this to see what is preventing the computer from sleeping…

powercfg -requests

Tip: Prevent open files from disabling sleep (System)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\ Power\ PowerSettings\ 238C9FA8-0AAD-41ED-83F4-97BE242C8F20\d4c1d4c8-d5cc-43d3-b83e-fc51215cb04d]

In there, set Attributes to 0 (the default value is 1, which means hide).”

Then… Power options -> Change Plan Settigns -> Change Advanced Power settings -> Sleep -> Allow sleep with remote opens (make sure show hidden if not shown)

December 14, 2011

ASP.NET: Web.config transformations

Filed under: web — amcbride @ 4:38 pm

web.config transformation

December 12, 2011

Logging Blocks: FAQ

Filed under: Blocks — amcbride @ 1:13 am

Set to local time
Timestamp: {timestamp(local)} will get the local system time

December 11, 2011

Validation Blocks: Data Annotations

Filed under: Blocks — amcbride @ 4:53 pm

Annotations

December 2, 2011

Developer Tools: Hanselman

Filed under: Developer Tools — amcbride @ 3:59 pm

Ultimate Tools

November 30, 2011

Active Directory

Filed under: Active Directory — amcbride @ 7:36 pm

Property lookup

November 29, 2011

RDP: Keep session active

Filed under: RDP — amcbride @ 12:02 am
push Start > then type "Local Security Policy"

Inside the Local Secuirty Policy Snap in

Security settings > Local Policies > Secuirty Options > Microsoft network server: Amount of idle time required before suspending session

Default is 15 minutes.

November 27, 2011

EF: Database functions

Filed under: Entity Framework — amcbride @ 8:02 pm

FROM o in ctx.Orders
WHERE SqlFunctions.DateDiff(“d”, o.OrderDate, o.ActualDate) > 5
select o;

November 25, 2011

ActiveMQ: Consumer

Filed under: ActiveMQ — amcbride @ 8:59 pm

using System;
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;
using Apache.NMS.ActiveMQ.Commands;


namespace TestActiveMQ
{
    class Program
    {
        static void Main(string[] args)
        {
            IConnectionFactory factory = new ConnectionFactory("tcp://localhost:61616/");

            using (IConnection connection = factory.CreateConnection())
            {
                connection.ClientId = "MYID";
                connection.Start();

                using (ISession session = connection.CreateSession())
                {
                    IMessageConsumer consumer = session.CreateConsumer(new ActiveMQQueue("px_contracts_update"), null, false);
                    consumer.Listener += consumer_Listener;

                    Console.ReadLine();
                }

                connection.Stop();
            }
        }

        private static void consumer_Listener(IMessage message)
        {
            Console.WriteLine("Got: " + ((ITextMessage)message).Text);
        } 

    }
}

Next Page »

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.