Навигация

Итоги года

Другие ссылки


Реклама

Счётчики


<- Предыдущие записи Следующие записи ->

Remote Desktop Console Connection

25.07.2007 Среда 23:17

mstsc /console

Комментариев: 1

Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB886903)

02.06.2007 Суббота 14:15

Automatic Update in Windows downloaded the following item and was trying to install it:

Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB886903)

But intallation was failing with no explanation given. I'll skip details of how I found what was wrong and tell the final result. The problem was with TEMP and TMP environment variables. They contained invalid characters (in my case it was a semicolon).

Доктор, меня все игнорируют (нет комментариев)

Viewing Debug and Trace messages in .Net

25.05.2007 Пятница 18:25

You can put these in your .Net C# code:

System.Diagnostics.Debug.Write("A debug message");
System.Diagnostics.Trace.Write("A debug message");
And use DebugView to view your debug and trace messages.

Доктор, меня все игнорируют (нет комментариев)

XmlDocument.Load locks for writing

25.05.2007 Пятница 18:01

Yesterday I saw the following error message in the Event Log:

The process cannot access the file 'C:\Bla-bla.Config.xml' because it is being used by another process.

Exception type: IOException
Source: mscorlib
Target Site: Void WinIOError(Int32, System.String)


The error was happening in a function that was attempting to write to the file. I remembered that previously I had a similar issue that was caused by incorrect locking used to prevent multiple threads from writing simultaneously to the file (link). I tweaked code to make locking mechanism work as expected but... surprisingly, I still got the same message.

I spent some time digging for real cause of the problem. Finally, I found out that XmlDocument.Load(System.String) function, that was used in other places in code to read the same file, for some reason locks the file when openning it. You can read but you can't write.

I solved the issue by replacing

XmlDocument doc = new XmlDocument();
doc.Load("C:\Bla-bla.Config.xml");
with

XmlDocument doc = new XmlDocument();
using (FileStream stream = new FileStream
("C:\Bla-bla.Config.xml", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
doc.Load(stream);
stream.Close();
}
Question remains open as to what will happen when a thread attempts to read the file when it's being written to by another thread. May be locking should be implemented on read attempts too.

Доктор, меня все игнорируют (нет комментариев)

Unable to add an assembly to GAC

22.02.2007 Четверг 00:06

Got this when trying to add an assembly to the GAC using the .Net Framework configuration tool:

"Unable to add the selected assembly. The assembly must have a strong name (name, version and public key)."

When tried to use gatutil.exe got this:

"Failure adding assembly to the cache: Unknown Error"

The reason... Well, it's simple. I was trying to add a .Net 2.0 assembly to the .Net 1.1 GAC. My cold must've been giving me hard time today.

Доктор, меня все игнорируют (нет комментариев)

Wake-on-LAN settings

20.02.2007 Вторник 18:20

Software: Windows XP

To make Wake-on-LAN (WOL) work verify your system against the following check list:

- WOL feature should be supported by mother board

- WOL feature should be enabled in the mother board BIOS setup

- WOL feature should be supported by the LAN adapter (the network card)

- I heard some mention that in order for WOL to work, LAN adapter should be connected to the mother board with a 3-pin connector.

The drawing source

I suspect it relates to some older hardware stuff. Wasn't required in my case because I use a built-in LAN card anyway.

- In Windows, check properties of the network adapter in Device Manager. Anything related to WOL should be enabled. For example, in Windows XP: Network card properties —> Power Management —> Allow this device to bring the computer out of standby.

- You cannot wake up a computer by an arbitraty network request, e.g. by a ping. Wake-on-LAN is a special UDP packet. It has specific format and contains computer network card's MAC address. In order to send such a packet, special software is required. This one can be recommened (it is very simple and proven to work): http://magicpacket.free.fr/. To use it you'll need to know IP address of the computer and MAC address of the network card.

- Make sure all neccessary holes exist in the firewall. Unfortunatley, I don't know what holes are required, because in my case everything worked right away, no tweaking to the firewall was required.

Доктор, меня все игнорируют (нет комментариев)

btm to XSLT

14.02.2007 Среда 19:33

Software: BizTalk 2006, Visual Studio 2005

BizTalk Mapper creates files with .btm extension. At compilation time it converts it to XSLT code and embeds it into the resulting assembly. To see the generated XSLT, validate the map (right-click on the btm file in Visual Studio and select "Validate Map"). After validation is done you'll see two path lines in the output pane. They contain paths of the generated XSLT file and Extension Object XML file.

Доктор, меня все игнорируют (нет комментариев)

What's this "clicking" noise I hear when surfing the net?

28.01.2007 Воскресенье 14:38

Q: What's this "clicking" noise I hear when surfing the net?

A: The "click" is the sound that Microsoft Internet Explorer makes when you click on a web link. If you wish, you can turn this feature off in the Control Panel. In Windows XP, open the Sounds, Speech and Audio Devices (it's just Sounds & Multimedia in Windows 2000), then Sounds and Audio Devices, then on the Sounds tab, scroll down to the section for Windows Explorer. Click the event called "Start Navigation," and change the setting to "none" from the dropdown box. Click OK to apply the change, and the clicks are gone.

via Skype.com

Доктор, меня все игнорируют (нет комментариев)

Pic 2 ASCII converter

15.12.2006 Пятница 07:59

Some sort of Pic 2 ASCII converter. The web site is German.

Доктор, меня все игнорируют (нет комментариев)

error X2230: the type is in assembly that needs to be referenced

12.12.2006 Вторник 19:45

Sowftare: .Net

error X2230: the type '' is in assembly '' that needs to be referenced

This error is seemingly caused by the fact than one of referenced assemblies was built against another assembly with version different from the one available on the machine in compilation time.

Доктор, меня все игнорируют (нет комментариев)

Distinguished fields vs. Property fields

23.11.2006 Четверг 20:55

Software: BizTalk

Distinguished fields are to be used in:
- Expression shapes in orchs

Property fields are to be used in:
- Correlation sets

... to be appended.

Доктор, меня все игнорируют (нет комментариев)
<- Предыдущие записи Следующие записи ->