Things I Learnt Today

July 7, 2009

Reading web.config setting

Filed under: Web App, Windows — Ding @ 11:20 am

The other day I had cause to figure out how to read a value from a web.config file, and display it on the screen.

After searching for a bit, and using the help provided in this article (http://codersource.net/asp_net_web_configuration_file.html), I came up with the following :

In Windows Explorer, go to c:\inetpub\wwwroot
Create a folder there called TestFldr
Open IIS Manager, and right click on the Default Web Site, and create a new virtual directory as follows :

Alias : TestFldr
Browse to the path that you created before
Permissions: Read + Run Scripts

Create a simple web.config file in the EVTest folder :

<configuration>

 <appSettings>
 <add key="MyTestSetting" value="1234"/>
 </appSettings>

</configuration>

Create a file in that folder called test.aspx, and put in it :

<script runat="server">

sub Page_load
 dim aconfig as system.configuration.configurationsettings
 dim extver as string = aconfig.appsettings("MyTestSetting")

 div1.innerhtml = "<b>" & extver & "</b>"

end sub

</script>

<html>
<body>
<form runat="server">
MyTestSetting is: <div id="div1" runat="server"></div>

</form>
</body>
</html>

Now open Internet Explorer, and go to http://servername/TestFldr/Test.aspx

MSIEXEC logging

Filed under: Windows — Ding @ 11:15 am

I always wondered how to get the logging enabled when you run an MSI and something goes wrong.  I had thought it was amazingly complex to turn on, but in fact it’s not !  You can do it liks this :

MSIEXEC /i “MyMSI.msi” /L*v “c:\mylogfile.log”

That logs everything “verbosely” to the filename specified.

April 29, 2009

EV Connection Status

Filed under: Enterprise Vault — Ding @ 4:38 pm

In the EV Outlook Client trace you very often see the Connection Status listed as a number.. well, what does the number mean ?

0 = Unknown connection.  You sometimes see that near the start of a client trace.
1 = Online
2 = Offline
3 = No Exchange
4 = Disconnected
5 = Cached Mode, Offline
6 = Cached Mode, Disconnected
7 = Cached Connected, headers only
8 = Cached Connected, Full items
9 = Cached Connected, “Drizzle Mode”
These are of course the Outlook to Exchange connection states, and the EV Outlook Add-in often needs to know what state things are in so that various operations can be performed (or not as the case may be).

Gmail Add-On

Filed under: Uncategorized — Ding @ 4:33 pm

I know there are about 10,000,000 different ones, but today I saw this :

http://userscripts.org/scripts/show/46938

It’s pretty damn good if you ask me!  Makes the real estate down the left hand side of gmail much more useful.  Try it yourself, if you use Firefox with Greasemonkey

February 10, 2009

Ultramon Alternative?

Filed under: Windows — Ding @ 11:44 am

I’ve been on the look out for something to use for multiple monitor OTHER THAN Ultramon.  Whilst I like it, I kind of wanted to do something that wasn’t the de facto standard, and something that was preferably free.

After a bit of googling, I found :-

http://www.softsia.com/DynaDeskXP-download-npc5.htm
http://www.snapfiles.com/get/displayfusion.html
http://www.mediachance.com/free/multimon.htm

I tried Display Fusion, but it didn’t seem to do the multiple task bar thing (one on each monitor) .. that’s something that I really wanted.  I then tried, and I am currently using the product from MediaChance, called Oscar’s Multi-Monitor TaskBar.

It’s good .. so far.

February 4, 2009

BatteryBar

Filed under: Windows — Ding @ 10:20 pm

I came across a little utility that I eventually installed on my Windows 7 laptop last night.  It’s called BatteryBar, and it’s from this site.  I saw it described on lifehacker.  I didn’t think it would work properly on Windows 7 — but it does, it works well.  I think I’ll keep it installed, as the standard icon you get in the system tray just isn’t that accurate, and doesn’t tell you that much information.

Previously when this laptop was running Windows XP it had a Lenovo / IBM utility that ran in the task bar area that showed battery life, but, since the laptop went to Vista, and now to Windows 7 I’ve been missing that visual clue of battery life.

Check out the utility – you just might like it too.

January 22, 2009

Odd Windows 7 Issue

Filed under: Windows — Ding @ 10:56 am

Today I thought it would be a good idea to install some more apps on my Windows 7 machine.  I had previously installed things like Office.  The difference today is that it was straight after production activation (well an hour or so afterwards).  I repeatedly got the same error :-

Error    22/01/2009 10:47:51    Application Error    1000    (100)

Faulting application name: msiexec.exe, version: 5.0.7000.0, time stamp: 0×49431c33
Faulting module name: ntdll.dll, version: 6.1.7000.0, time stamp: 0×49433e67
Exception code: 0xc0000005
Fault offset: 0×0007f6d6
Faulting process id: 0xdf4
Faulting application start time: 0×01c97c7ede31df1e
Faulting application path: C:\Windows\System32\msiexec.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 1d4f5f49-e872-11dd-9d8d-001641a9741a

I thought it was because I was installing over the network, so I tried the files locally.  I tried other MSI’s, and had the same problem.  I hunted around a little bit, and Windows then helped me after I sent the error report … it said :-

function expand( obj ) { if( obj.nextSibling.style.display==’none’ ) { obj.nextSibling.style.display = ‘block’; obj.firstChild.firstChild.src= ‘http://wer.microsoft.com/Responses/include/images/down.gif’ } else { obj.nextSibling.style.display = ‘none’; obj.firstChild.firstChild.src= ‘http://wer.microsoft.com/Responses/include/images/right.gif’ } }

Solve a problem with Windows 7 beta

An issue with the Customer Experience Improvement Program (CEIP) client in Windows 7 beta is causing Explorer and some MSI-based installers to stop working properly.

To solve this problem, follow these steps:

  1. Click the Start button , click All Programs, and then click Accessories.
  2. Right-click Command Prompt, and then click Run as administrator. In the User Account Control window, verify that Program name is Windows Command Processor, and then click Yes.
  3. In the Administrator: Command Prompt window, type or paste the following text at the prompt:reg delete HKLM\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions /va /f
  4. Press Enter to install the solution.
  5. If The operation completed successfully displays, close the Administrator: Command Prompt window to complete this procedure. If “ERROR: Access is denied” displays, repeat this procedure from the top, making sure you clicked Run as administrator in step two.

Low and behold … after that the installations are now working again !

January 21, 2009

Manuals

Filed under: Enterprise Vault — Ding @ 3:51 pm

Lots of times I refer back to the EV manuals to see whether something that I “discover” is actually documented.  I have a copy locally on my machine in the office of many of the manuals, from many of the different versions.  I had often wondered about an externalised version of them, and whether they were easy to find.

With the power of Google, I found :

http://seer.support.veritas.com/docs/277782.htm

That goes back as far as V6, which is the beginning of time (almost) as far as I am concerned.

Windows 7

Filed under: Windows — Ding @ 11:42 am

So like many people I grabbed a copy of the Windows 7 Beta, build 7000.  I must say I am very impressed.  I created a new partition on my home machine, and installed it… in the blink of an eye, if not faster!  It also runs very well on the machine (whereas Vista runs BADDDLY).
Well done I say!

December 16, 2008

Changing Screen Resolution Quickly in Ubuntu

Filed under: Uncategorized — Ding @ 11:47 am

Yesterday I plugged in an external monitor to my laptop when it was running Ubuntu 8.10.  It didn’t pick up the external monitor :(

I did some digging this morning, and it might not solve the problem, but it seems like a super-cool application anyway :

If you have an external monitor or projector you occasionally attach to a notebook computer, you might be used to switching resolutions on a regular basis. Unlike with Windows, this isn’t just a right-click procedure—you must navigate the System —> Preferences menu.

A good solution is to use Synaptic to search for and install resapplet. For some reason, although it’s officially a GNOME applet, resapplet doesn’t appear on the standard applet list. Instead, it must be configured to start at login. To do this, click System —> Preferences —> Sessions, ensure the Startup Programs tab is selected, and click the Add button. In the Name and Command fields of the dialog box that appears, type resapplet. Leave the Comment field blank. Then close the dialog box, and log out and back in again.

You -can- just press Alt-F2 and run the applet from there, and it does indeed sit next to the network activity icon in the system tray type area.

Older Posts »

Blog at WordPress.com.