Wednesday, August 11, 2010

Workaround: Running ASP.NET 1.1 on Windows 64-bit

Problem

IIS manager crashes when modifying ASP.NET 1.1 sites on 64-bit Windows

Solution

Here is a long and good explanation how to solve the problem: http://blogs.iis.net/wonyoo/archive/2009/06/18/workaround-running-asp-net-1-1-on-vista-sp2-ws08-sp2.aspx

Short explanation:
1. Create the Framework64 directory for 1.1 \windows\microsoft.net\framework64\v1.1.4322\config\
2. Copy the 32bit config to 64bit config location created in step 1.
Copy file from \windows\microsoft.net\framework\v1.1.4322\config\machine.config to \windows\microsoft.net\framework64\v1.1.4322\config\

Wednesday, March 24, 2010

WCF: Error in deserializing body of reply message

Problem

You got an error "Error in deserializing body of reply message" when calling WCF service.

Solution

If your response message size is huge then check the reader quota settings in client app/web.config-file at bindings section and change them. For example:

<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>

Note that you must have same binding, which settings you are changing, in server side also!

More about reader quota: http://msdn.microsoft.com/en-us/library/ms731325.aspx

Tuesday, March 16, 2010

WCF Oracle adapter: Field xxx has a value with time zone information set. Specify a value without time zone

Problem

I tried to call a Oracle stored procedure from orchestration with WCF Oracle Adapter.

My source message contains a date element like this <deliveryDate>2010-03-17T16:20:34.252125+02:00</deliveryDate> and when I put that value to destination message which is sent to Oracle: <DELIVERYDATE>2010-03-15T16:20:34.2365000Z</DELIVERYDATE>

I got an error "Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: Field DELIVERYDATE has a value with time zone information set. Specify a value without time zone.


Solution
Destination messsage date value should be modified to XML date format without timezone:

DateTime date = XmlConvert.ToDateTime(xmldate, XmlDateTimeSerializationMode.Unspecified);
DestinationElementValue = date.ToString("yyyy-MM-ddThh:mm:ss"));

Wednesday, December 30, 2009

Looping in stored procedure

Problem
How to loop through the select result in a stored procedure

Solution
DECLARE @MyId int
DECLARE Scroller SCROLL CURSOR
FOR SELECT MyId FROM MyTable

OPEN Scroller
FETCH NEXT FROM Scroller INTO @MyId
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO MyTable2 (ReferenceId) VALUES (@MyId)
FETCH NEXT FROM Scroller INTO @MyId
END

CLOSE Scroller
DEALLOCATE Scroller

Tuesday, September 22, 2009

ORA-03114: not connected to ORACLE and Biztalk Oracle Adapter

Problem

You receive an error "ORA-03114: not connected to ORACLE" when you are trying to connect to the Oracle database with Biztalk Oracle Adapter. This error can occur even if you was connected to the database just few seconds ago.


Solution

Problem relates to the connection pool.

If the connection pooler detect that the connection with the server has been broken it will remove the broken connection from the connection pool. This doesn't happen all the time and you actually get a bad connection from the pool.

Workaround is to change Send port settings: Change useOracleConnectionPool to false at Bindings tab

Tuesday, March 24, 2009

Biztalk: Specified value has invalid CRLF characters

Problem

You may receive an error "System.ArgumentException: Specified value has invalid CRLF characters" when sending message to the WCF send port


Solution

Remove all linebreaks and spaces from send port's "Soap Action Header" action box

Wednesday, February 18, 2009

ASP.NET: UpdatePanel and Response.Write()

Problem

When you are modifying Response with Response.Write() from control which is inside UpdatePanel you may receive an error "Message received from the server could not be parsed"

Solution

Solution is to add a trigger to UpdatePanel like this:

</ContentTemplate>
  <Triggers>
    <asp:PostBackTrigger ControlID="btnExportToExcel" />
  </Triggers>
</asp:UpdatePanel>

This causes an UpdatePanel to refresh the page only in control specified in Triggers section