Навигация

Итоги года

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


Реклама

Счётчики


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

Cannot insert the value NULL into column 'uidSubID'

29.09.2006 Пятница 19:50

Software

BizTalk 2004

Symptoms

Error message in Event Log:


The following stored procedure call failed:
"{ call [dbo].[bts_CreateSubscription_BizTalkServerApplication]
( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}". SQL Server returned error string: "The statement has been terminated.;
Cannot insert the value NULL into column 'uidSubID', table
'BizTalkMsgBoxDb.dbo.Subscription'; column does not allow nulls."



Resolution

Delete dynamic ports, undeploy orchestrations assembly, then redeploy it.

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

Cannot specify parameters in a Call Rules shape

28.09.2006 Четверг 22:51

Software

BizTalk 2004
BizTalk 2006

Symptoms

While working on a orchestration I faced this problem. I added a Call Rules shape to the orch, double-clicked it, specified business policy I was going to call in this shape. Then I went on to specify parameters for the call. Unfortunately, I was not allowed to enter any parameters, even though the policy did use some schemas.

Cause

If policy you call uses vocabularies, the cause might be in how vocabluaries set up. When you create a new definition in a vocabulary, you select a schema and then a field you want to connect this definition to. As you do that, Business Rule Composer fills out some of the text boxes in the Add New Definition dialog box for you. Well, it turns out it not necessarily does it right. Particularly, DocumentType may be set wrong. Correct value for it should match the fully qualified name of the schema this field comes from.

If policy doesn't use vocabularies, similar problem may arise when using attributes directly from schema. When adding a schema in Business Rule Composer do check DocumentType of the schema as well. It also should coincide with its fully qualified name.

Fully qualified name can be seen in properies of the schema file displayed by Visual Studio.

Another reason for the behaviour may be that you created the policy using a schema, and then moved schema to another project. Although schema is still the same, its namespaces changes, because namespace by default depends on name of the project where schema is defined.

Resolution

Whenever a new definition is created in a vocabulary, check if DocumentType of the definition matches fully qualified name of the schema. Whenever a schema is added in Business Rules Composer, also check DocumentType of the schema.

If the schema was moved to another project and therefore its namespace has changed, re-create the policy using the new schema.

P.S.don't forget to fix the rules after you've fixed the vocabs.

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

The View State is invalid for this page and might be corrupted

28.09.2006 Четверг 17:48

Софт

ASP.Net

Симптомы

Пользователь смотрит некую ASP.Net-страницу. Затем не закрывая браузер надолго забывает о ней. Затем кликает линк на этой странице, который вызывает postback. И видит следующую ошибку:

[HttpException (0x80004005): The View State is invalid for this page and
might be corrupted.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()


Причина

.Net кодирует ViewState, для того, чтобы злобный хацкер с ним ничего не мог сделать. Ключ для кодирования генерируется средой автоматически. Судя по всему этот ключ может меняться если пользовательская сессия закончилась (что случается если пользователь долго ничего не делает со страницей). Кроме того, в случае Web Farm, этот ключ разный на разных серверах, входящих в состав Web Farm. Поэтому postback, пришедший не на тот сервер, на котором был сгенерирован ключ, которым закодирован Viewstate, завершится приведённой выше ошибкой.

Решение

Чтобы ключ был один и навсегда, надо его явно прописать. Это делается в файле web.config:

<configuration>
<system.web>
<machineKey validationKey="A_128_HEX_DIGITS_VALUE"
decryptionKey="A_48_HEX_DIGITS_VALUE"
validation='SHA1'/>
</system.web>
</configuration>
Для Web Farm надо прописать одинаковые ключи на всех машинах.

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

Заткнуть Винды и умереть

28.09.2006 Четверг 00:53

Скопировано правильно (copyright) из моего основного журнала:
http://raxxla.com/CommentRecord.aspx?Record=200512272008

Не могу не поделиться приятной находкой. Меня всегда раздражали звуки, производимые Виндами в ряде случаев - ошибки, предупреждения и так далее. Сидишь, скажем, в тишине, что-то сосредоточенно делаешь, уткнувшись в экран. И вдруг прямо перед носом выскакивает какое-нибудь окно с ошибкой, и из динамиков раздаётся пугающий звук, от которого перехватывает дыхание как при просмотре фильма ужасов. Обычно я ставлю звуковую схему "No Sound" сразу после установки Виндов. Однако выяснилось, что эта вредительская программа даже при "No Sound"'е всё равно время от времени воспроизводит какой-то мерзкий "бип!". Как убрать этот бип я не знал и терпел это издевательство. Но вчера, во время ночной работы чаша моего терпения переполнилась. Тогда я слушал в наушниках музыку. Причём запись попалась довольно тихая, поэтому громкость пришлось прибавить. И вот Винды опять совершенно внезапно обнаружили какую-то ошибку, о которой не замедлили мне сообщить громким резким бипом прямо в наушники. Тут уж я не выдержал и полез в Гугл. И вот что нашёл:

1.Идём в Computer Management (правый клик на My Computer, затем Manage).
2.Кликаем на Device Manager.
3.Выбираем в меню пункт View, затем Show Hidden Devices. (Sic! Hidden Devices, блин. Не операционная система, а квестовая игрушка какая-то!)
4.В правой части раскрываем ветку "Non-Plug and Play Drivers".
5.Находим устройство "Beep" (оно думало, я его не найду! ), кликаем на нём правой кнопкой и выбираем Properties.
6.В списке "Device Usage" выбираем "Do not use this device (disable)".
7.Нажимаем Ok. Voilà! Больше Винды пикать не будут!

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

The famous 'Class not registered'

28.09.2006 Четверг 00:25

Software

Windows XP
COM+

Issue

I faced this error trying to publish a web site on my office Windows XP computer. When I was hitting http://localhost in IE I got some generic error instead of my web page and the following error in Event Log:

The server failed to load application '/LM/W3SVC/1/ROOT. The error was 'Class not registered'.

Cause

The issue is with broken COM+ catalog.

Resolution

The following articles have helped me to successfully resolve the issue.



To resolve this problem, reinstall Component Services as follows:
1. Open registry editor, locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3, and then delete this key.
2. From the Start menu, point to Settings, click Control Panel, and then click Add/Remove Programs.
3. Click Add/Remove Windows Components.
4. Proceed through the wizard, and accept all of the defaults.
5. Restart the computer.

Source: http://support.microsoft.com/?id=301919



If the above didn't solve it, and you still receive the 'Class not registered' error message, then you need to recreate the IIS packages in COM+, try

a) Delete IIS related package in Component Services MMC
• IIS In-Process Applications
• IIS Out-of-Process Pooled Applications
• IIS Utilities

b) Open command prompt, navigate to %windir%\system32\inetsrv folder, and enter (case sensitive)
c:\winnt\system32\inetsrv\>rundll32 wamreg.dll, CreateIISPackage
then
c:\winnt\system32\inetsrv\>regsvr32 asptxn.dll

c) Enter IISRESET at command prompt to restart IIS services, then re-open Component Services MMC to verfiy the IIS packages are recreated.

If you got this while trying to fix the component services.
Error Code = 0x80040206
Non expected internal error
Not enable to register COM+ events classes.


Try regsvr32 %windows%/system32/ole32.dll, then retry the kb to fix the component services.

Source: http://msmvps.com/blogs/bernard/archive/2005/03/22/39216.aspx



If nothing of the above helped or some actions could not be completed, try this:

To clean up a damaged COM+ catalog:

01. Rename %SystemRoot%\System32\Clbcatq.dll to %SystemRoot%\System32\~Clbcatq.dll, making sure that you include the tilde (~).

02. Shutdown and restart your computer.

03. Delete the COM3 sub-key from the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.

04. Open a CMD.EXE prompt.

05. Type pushd %SystemRoot% and press Enter.

06. Type rd /s /q Registration and press Enter.

07. Type popd and press Enter.

08. Type exit and press Enter.

09. Use Notepad to remove Hide from the COM= line in %SystemRoot%\Inf\Sysoc.inf.

10. For Windows XP:

A. Open a CMD.EXE window
B. Type the following commands, pressing ENTER after each line:
regsvr32 /s ole32.dll
regsvr32 /s oleaut32.dll

11. Start / Settings / Control Panel / Add/Remove Programs / Add/Remove Windows Components.

12. Press Next and reinstall COM+.

NOTE: If Windows File Protection blocks any of the above renaming and/or deletions, perform those steps in Safe Mode.

Source: http://www.jsifaq.com/SF/Tips/Tip.aspx?id=6951

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

IE shows blank page when opening a URL link

27.09.2006 Среда 22:40

Software

Internet Explorer 6.0

Cause

This might be caused by wrong character encoding. For example, on a Win-1251 page, UTF-8 encoding set in IE was causing this error.

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

Setup project - how to exclude file dependencies

27.09.2006 Среда 22:10

Software

Visual Studio 2005

Issue

Other day I was working on a setup project. I noticed that when I include a file into the project, all of its dependencies get included as well. Which I didn't like because what is the point in installing, say, a standard .Net or Windows library? Its presense on the target system is a platform requirement. So I decided to exclude dependencies from the setup project. But I failed to do that. It turned out you cannot delete them by simply pressing Del button on the keyboard or by selecting "Delete" in the context menu because it is not there.

Solution

Dependenices can be deleted from the project by the following:

1) Select them.
2) Right-click selection, click Properties, in Properties sheet set Exclude to True, that's it.

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

Coping with DTC issues

27.09.2006 Среда 19:51

Software

Windows Server 2003 SP1
DTC (Distributed Transaction Coordinator)

Issue

Whenever you get an error in Event Log about some transaction issue the reason may be in broken DTC (Distributed Transaction Coordinator) communication between your servers.

Solution

Here are some tips on how to cope with DTC-related issues that I collected while working on my projects:

- Use Microsoft's dtcping.exe utility to check if communication is ok between the servers
- Windows Server 2003 should have SP1
- In Component services, right-click My Computer, Properties, on MSDTC tab, in Security settings: Enable Inbound, Outbound; No athentication. This might not be good for prod scenario, but is ok to diagnose the problem.
- if machines are virtual PCs and were cloned from a common parent, then do the following on both servers:
msdtc -uninstall
msdtc -install
- make sure port 135 is open bi-directionally (use telnet or nmap)
- if there's internal network make sure host names are resolved as internal IPs; external IPs may have a firewall between them that prevents communications
- Make sure Distributed Transaction Coordinator service is started on both machines
- Restart the machines

UPDATE (on 7 March 2014)

- This registry fix may be required for the dtcping utility to work:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\RPC]
"RestrictRemoteClients"=dword:00000000
"EnableAuthEpresolution"=dword:00000000

- One more thing that seems to have fixed DTC communication in my case was that I added servers to WINS configuration in IPv4 properties. The server IPs I entered were taken from similar configuration on a machine which was known to have been properly configured for DTC communication.

- Also. Select option "Enable NetBIOS over TCP/IP" in WINS configuration screen in IPv4 properties.

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

The given assembly name or codebase was invalid

27.09.2006 Среда 17:42

Софт

BizTalk 2006
.Net Framework 2.0

Симптомы

Итак, проблема проявилась при тестировании только что развёрнутого BizTalk-приложения. На первом же receive pipeline'е в Event log'е появлялось следующее сообщение:


There was a failure executing the receive pipeline

blah-blah-blah...

Reason: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)


При этом имел место следующий симптом - при добавлении pipeline'а в приложение при помощи BizTalk Administration Console (Resourses -> Add) pipeline вполне нормально добавлялся и в дальнейшем отображался с правильным именем. Однако при назначении pipeline'а какому-либо receive location'у, в списке доступных pipeline'ов имя моего pipeline'а было неправильным - а именно, отсутствовала последняя цифра в PublicKeyToken! То есть правильное имя, например, такое:

MyPipeline, MyCustomPipelines, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=f90fe11c5553f473


А отображалось такое имя:

MyPipeline, MyCustomPipelines, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=f90fe11c5553f47


Причина

Выяснилось, что pipeline имел очень длинное fully qualified name (значительно длиннее приведённого выше примера). А в базе данных BizTalk, в таблице BizTalkMgmtDb.dbo.bts_pipeline, предназначенной для хранения данных о pipeline'ах, колонка, содержащая fully qualified name pipeline'а имеет длину 256 символов, каковой и не хватало для моего pipeline'а, имя которого имело в длину 257 символов.

Решение

Проблема была решена уменьшением длины fully qualified name pipeline'а. А именно, было изменено имя assembly, содержащей pipeline, как наиболее безболезненный вариант решения. Коллега предлагал и вовсе кардинальный способ - увеличить длину колонки в BizTalk'овской таблице. :) Но мне это показалось слишком "грубым" решением. В конце концов, имя pipeline'а может содержаться далеко не только в этой таблице. И вообще, править внутренние BizTalk'овские таблицы - это уже хакерство какое-то.

Мораль

Не нужно слишком усердствовать в изобретении длинных имён, namespace'ов и т.п. Как показывает практика, иногда существуют вполне реальные ограничения по длине для таких вещей. Также можно посоветовать Microsoft увеличить максимально допустимую длину fully quialified name pipeline'а.

Примечания

1) Стоит отметить, что в настоящий момент упомянутый выше pipeline, имеющий 257 символов в имени, вполне успешно работает на production box'е. Каким образом - остаётся загадкой. Возможно, это как-то связано с разными вариантами deployment'а - через BizTalk Administration Console, через BizTalk Explorer в Visual Studio, через командую строку и т.д. Как бы то ни было, принято решение срочно это дело исправить.

2) Ошибка "The given assembly name or codebase was invalid" появляется тогда когда assembly с таким именем найдена, но её Version, PublicKeyToken или Culture не совпадают с ожидаемыми. Она может появляться в самых разнообразных контекстах, никак не связанных с BizTalk'ом.

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

Открылся новый блог на Raxxla.com

27.09.2006 Среда 03:41

Это первая запись в моём новом блоге ProgBlog. Этот блог будет посвящён вопросам программирования, конфигурирования и администрирования. Главная задача этого блога - сохранение полезной информации, накапливающейся в процессе работы над разнообразными программными проектами. Прежде всего это нужно самому мне, ибо как показала практика, всякие неочевидные вещи, которые удаётся выявить в процессе борьбы с багами, через некоторое время надёжно забываются. А так они будут сохранятся здесь и авось когда-нибудь пригодятся. Если кроме меня этот блог поможет ещё хоть кому-нибудь, буду только рад.

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