Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Daniel Jansson

@Daniel Jansson
About
Posts
16
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Mqrtlarge and large message handling differ between Biztalk versions?
    D Daniel Jansson

    We've developed a component for sending and reading large messages to msmq queues for communication with Biztalk as implemented as described in this MSDN-article: http://msdn.microsoft.com/en-us/library/aa560386.aspx Simply explained, you use the PROPID_M_EXTENSION field to describe the parts of the messages using the following content: GUID defining that it is a multi-part message (16b) GUID for the message (16b) Total size of the entire message (4b) Current part number (2b) Number of message parts (2b) This works perfectly with Biztalk 2006, however with newer editions (2010/2013) it does not work at all. We've sent large messages out from Biztalk 2013 to a queue and analyzed the field and it seems that the content of PROPID_M_EXTENSION is: GUID defining that it is a multi-part message (16b) GUID for the message (16b) Part number (2b) Empty data (2b) 1 if it is the last part, otherwise 0 (1b) 3 unknown bytes The problem is the last three bytes, that we can't figure out the purpose of and how to calculate. The values differs depending on the message content and size. And it feels like some sort of check sum, but we need to be able to set this manually. Any ideas? There is very little information about this around the web? The existing mqlarge-dll is in native code and can only be decompiled to assembler, which (for me at least) is hard to debug. A way around it would be to include a reference to mqlarge in our project and use the existing assembly, but we would rather have our own code and not be dependent on a dll. And it bugs me not to know how it works as well :)

    C / C++ / MFC c++ com data-structures debugging help

  • C# WinService starts in win7 but not in win2088
    D Daniel Jansson

    We are using logging (log4net) but nothing was logged. But I added some logging points and found out that it is the dynamic loading of an external dll that fails. (Activator.CreateInstance)

    ERROR!! Assemblyladdningsfel! Exception has been thrown by the target of an invocation.
    ERROR!! Exception has been thrown by the target of an invocation.ERROR!! The type initializer for 'MyExternalDll' threw an exception.

    Don't know why yet, but probably due to some stupid 2008 security control.

    C# csharp visual-studio com sysadmin help

  • C# WinService starts in win7 but not in win2088
    D Daniel Jansson

    I have developed a C# .Net 3.5 Windows service application that works perfectly fine when I run it in Visual Studio, however when I try to install it on a Windows 2008 R2 64-bit server, it fails to start. The only error that is shown is:

    A system error has occurred.
    System error 1067 has occurred.
    The process terminated unexpectedly.
    

    No more information, nothing at all in the event log. There is no Com+ or similar, just a plain service. (Also tried to remove all logic from the service with no luck). I've tried to compile all parts with "AnyCPU" and 64-bit without luck. I've tried both the 32-bit and 64-bit installutil. If I copy the entire folder to a Win7 machine (64bit) and install it in the exact same way, it works like it should. Any ideas at all on how to resolve this? I'm pretty much out of ideas and without any logs whatsoever, it's hard to find out what it could be.

    C# csharp visual-studio com sysadmin help

  • .NET Runtime 2.0 Error Event ID 1000 - Need som help!
    D Daniel Jansson

    I have a .Net 2.0 C# Windows Service that reads messages from a message queue (xml), transforms them using XslCompiledTransform (does some other work using XmlTextReader and MemoryStreams) and then finally inserts data into a sql server database (In a distributed COM+ transaction). The problem is that sometimes the service crashes with the .NET Runtime 2.0 Error as source and EventId 1000.

    Faulting application application.exe, version 4.2.0.0, stamp 48a93225, faulting module kernel32.dll, version 5.2.3790.4062, stamp 462643a7, debug? 0, fault address 0x0000000000027d8d.

    (The machine is a has a multi-core CPU) My initial thought was that the service tried to read or write to a stream while the system was moving data between the ram and the swap. But after some more testing, the problem occurs even with ~750-1000mb free ram) Any ideas on how to locate and fix this problem?

    .NET (Core and Framework) help csharp database asp-net sql-server

  • How to add text to richtextbox from different thread with wcf?
    D Daniel Jansson

    Unfortunately, that won't help. Since i'm already on another thread when recieving the event, that's nothing I can control. The problem is access to the controls on the main thread when an event is recieved.

    WPF csharp question wpf wcf tutorial

  • How to add text to richtextbox from different thread with wcf?
    D Daniel Jansson

    I haven't found a solution for this yet, probably a lack of Google skills, but how can I update the contents in a richtextbox in wpf from a different thread? There is not Invoke or BeginInvoke on the control so delegates won't work? And using a delegate in this way: this.Dispatcher.Invoke(DispatcherPriority.Normal, new AddTextDelegate(_AppendtextLine), null, new object[] { text }); only makes the application hang. Any good ideas on this?

    WPF csharp question wpf wcf tutorial

  • AppDomain - Exchanging data between host and child processes
    D Daniel Jansson

    Yeah, I know. The problem is that the connections is never re-used. If I retrieve 1000 biz talk messages, I get 1000 connections, if I wait a couple of seconds and retrieves the messages again, another 1000 connections will be created and this brings down the performance on the entire server. (vital in a production environment) and there is no way to close or reuse the connections in my code since they are created and used purely within Microsoft's own assemblies. I've tried to use a appdomain to read messages and this works great. The problem is how to return the data.

    .NET (Core and Framework) help database com question

  • AppDomain - Exchanging data between host and child processes
    D Daniel Jansson

    I have a a problem that I haven't found found a solution for yet, so I'm turning to you guys. I need to execute an assembly in a new app domain in order to be able to completely garbage collect all resources that is used. The problem is that I need to return information to the host. How can this be accomplished? The reason I need to do this is that I'm using the Microsoft.Biztalk.Operations libraries to retrieve messages but (due to what I assume is a bug) sql connections used is not closed until the assembly is unloaded. Or is there any better way to do this? (GC.Collect does not close the sql connections) http://msdn.microsoft.com/en-us/library/microsoft.biztalk.operations.aspx[^]

    .NET (Core and Framework) help database com question

  • Authentication Problem
    D Daniel Jansson

    Hi We've encountered an authentication problem in a live-environment. Everything went fine in the test and stage environments. I'm out of ideas and need your help! Setup: - Impersonate is set to true in web.config - Anonymous access is turned off - Windows authentication is turned on Authorization: I have a setting in web.config, let's call it "AdministratorsGroup" and then I use this in the master page using Page.User.IsInRole to see if the current user is part of that active directory domain group. This works perfectly fine in our test environments, but once installed in a live environment, an exception is thrown: "Error in the relation between the confidence/reliance of the main domain and the domain which it relies on. " Any idea's on what might have happened?

    ASP.NET help security workspace windows-admin question

  • Extended splitpanel that supports multiple panels?
    D Daniel Jansson

    More like either 100 rows or 100 columns, but not that amount, more like 5 rows or columns. I want the user to be able to resize and show/hide the different rows / columns easily. The tablelayoutpanel can't be resize by default right?

    Windows Forms tutorial question

  • Extended splitpanel that supports multiple panels?
    D Daniel Jansson

    Has anyone created or seen an extension of the existing splitter panel that supports an "unlimited" number of panels? If now, any hints on how to do it would be appreciated!

    Windows Forms tutorial question

  • Fastest way to capture screen?
    D Daniel Jansson

    Thank you, that was a really interesting article. Can´t figure out why I didn't find it when I searched :) However, GDI as mentioned in the article is to slow and according to the author (not tried it myself yet though), directx is to slow as well ("GetFrontBufferData() is a slow operation by design") That leaves me with the WMEncoder solution which seems great but it requires the Windows Media Encoder to be distributed with the application, and I don't want to do that. Anyone seen another approach to this?

    Graphics graphics csharp question c++ game-dev

  • Fastest way to capture screen?
    D Daniel Jansson

    What is the fastest way to capture the entire screen or a single window? It's simple to do with GDI but I feel that there must be faster ways to do this. I want to capture at least 30 images per second without affecting the computers performance to much. Any ideas? Is it possible to use directx to directly access the buffer on the graphics card? Language: Preferably .net and C# but c++ will do as well.

    Graphics graphics csharp question c++ game-dev

  • XSLT for displaying generic XML-files
    D Daniel Jansson

    Does anyone have or know about a XSLT-file that is either "open-source" or license free that can generate HTML for displaying the content of any XML-file? (Similar to the internal XSLT Internet Explorer uses for displaying XML)

    XML / XSL xml html question

  • Enlisting IBM Websphere MQ Series in COM+ transaction
    D Daniel Jansson

    Hi guys, I have some serious problems with com+ and the ibm mq series. I have a windows service with a com+ defined class (inherits ServicedComponent, has [Transaction(TransactionOption.RequiresNew)] and [AutoComplete(true)] on the method. The problem is that the mq series part never rolls back in case of any errors, the other transactions works perfectly fine. When it comes to the mq connection, I have set up the enviroment to use server- bindings (a requirement for using transactions)

    MQEnvironment.properties[MQC.TRANSPORT_PROPERTY] = MQC.TRANSPORT_MQSERIES_BINDINGS;

    and the connection / send looks like this (stripped):

    queueManager = new MQQueueManager(queueManagerName, channel, host);
    queueManager.Connect();
    ...
    sendOptions = new MQPutMessageOptions();
    sendOptions.Options += MQC.MQRO_NEW_MSG_ID + MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
    sendOptions.Options += MQC.MQGMO_SYNCPOINT;
    ...
    queue = queueManager.AccessQueue(queueName, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
    queue.Put(msg, sendOptions);
    queue.Close();

    Do I have to do anything in perticular in the transaction-based method for this to work? Scaled down, it looks lite this:

    [AutoComplete(true)]
    function void DoWork()
    {
    try
    {
    send_message_on_mqqueue();
    do_some_db_work();
    ContextUtil.SetComplete();
    }
    catch (Exception)
    {
    ContextUtil.SetAbort();
    }
    }

    Any help, thoughts or suggestions are appreciated!

    COM help com sysadmin data-structures question

  • COM+ Transaction scope in .Net
    D Daniel Jansson

    I've just started to work on a windows service with distributed transactions using com+ and have stumbled upon a design question: When is a transaction started? Is it when the class is created or when a method is invoked. Consider the example below:

    [Transaction(TransactionOption.Required)]
    public class TransactionTest : ServicedComponent
    {
    public TransactionTest()
    {

        }
    
        public void BeginLoop(int count)
        {
            for (int i = 0; i < count; ++i)
                MakeTransactions();
        }
    
        \[AutoComplete\]
        private void MakeTransactions()
        {
            //Make some transactions
            if ((new Random()).Next(10) < 4)
                ContextUtil.SetAbort();
            else
                ContextUtil.SetComplete();
        }
    }
    

    A simple transaction based class with a method that is being invoked multiple times internally. Are all calls to MakeTransactions() in the same transaction or is a new transaction started each time SetAbort/Complete is invoked?

    .NET (Core and Framework) question csharp com design tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups