quarta-feira, 31 de julho de 2013

ITILV3 - Day 33

Incident

And incident is an event that causes IT service interruption or degradation.

Major incidents have severe impact to service operations and require separate procedures to handle them effectively.

Any person who notices a change in normal service operation should report it as a possible incident.


terça-feira, 30 de julho de 2013

No matter what I do, the menu item doesn't show - Team Foundation Server

You're using team foundation system.
And you have installed the client on the developer's machine, but when you right-click on a folder the item Team Foundation Server with its sub-items

Get Latest Version
Add
Check Out for Edit
and etc...

don't show
What do you have to do?

Probably you forgot to install

TFS_ObjectModel_enu.exe
 
After you install the exe above, when right-click the folder, the Team Foundation Server will show on the suspended menu.
 
Há!
 
 

sexta-feira, 26 de julho de 2013

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel

There are many reasons for this error, but in my case I solved in this way:

When this message appears it's probably 'cause, in general, you have two versions of ServiceModule; 3.0 and 4.0.

What did I do?
I delete the version 3.0

And where is it?

>Default Web Site
>>IIS
>>>Modules
Search for the list of modules the following ones
ServiceModel e ServiceModel-4.0

The first one is the 3.0 version. Deleted this.
You are done.

Some times you can have both assemblies working without problem. But in my case, they don't.
 
System.ServiceModel.Activation.ServiceHttpModule, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 
Cdigo do evento: 3008
Mensagem do evento: Ocorreu um erro de configurao.
Horrio do evento: 25/07/2013 16:09:19
Horrio do evento (UTC): 25/07/2013 19:09:19
Ident. do evento: d3b0c16cdf8442748406e1b2da8db9d0
Seqncia do evento: 1
Ocorrncia do evento: 1
Cdigo de detalhes do evento: 0

Informaes do aplicativo:
    Domnio do aplicativo: /LM/W3SVC/1/ROOT/Xanadu.Barramento.Credito-38-130192529590408741
    Nvel de confiana: Full
    Caminho Virtual do Aplicativo: /Xanadu.Barramento.Credito
    Caminho do Aplicativo: C:\inetpub\wwwroot\Xanadu.Barramento.Credito\
    Nome do computador: FAB0065

Informaes do processo:
    Ident. do processo: 84696
    Nome do processo: w3wp.exe
    Nome da conta: AUTORIDADE NT\SERVIO DE REDE

Informaes da exceo:
    Tipo da exceo: ConfigurationErrorsException
    Mensagem da exceo: No foi possvel carregar o tipo System.ServiceModel.Activation.HttpModule do assembly System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit)
   em System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
   em System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
   em System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
   em System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
   em System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   em System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   em System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   em System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
No foi possvel carregar o tipo System.ServiceModel.Activation.HttpModule do assembly System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
   em System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   em System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   em System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   em System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   em System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)

segunda-feira, 22 de julho de 2013

How to access MQSeries using VB6

Hi!

First of all you have to find the following reference and add to your vb project.

REFERENCE

IBM MQSeries Automation Classes for Activex

Once you did it, do the following

* * *

Sub AccessMQSeriesByNetdaniels()

On Error GoTo TrataErro

Dim MQSess As New MQSession
Dim QMgr As New MQQueueManager
Dim Queue As MQQueue
Dim msg As MQMessage
Dim pmo As MQPutMessageOptions
Dim MQDList As MQDistributionList

STEP 1
Set MQSess = New MQSession

Set QMgr = MQSess.AccessQueueManager("QM.000000.01")

MsgBox "I was able to connect to the queue manager"

STEP 2

Set Queue = QMgr.AccessQueue("QL.XXXXXXXXX.01", MQOO_INPUT_AS_Q_DEF, "QM.000000.01")

MsgBox "Queue was created"

STEP 3

Call msg.Write("Queue test" & Now)

MsgBox "I was able to write a message"

STEP 4

Queue.Open

MsgBox "I was able to open the queue"

STEP 5

Queue.Put msg

MsgBox "Put was successfully"

Exit Sub

TrataErro:

MsgBox Err.Description

End Sub

* * *  
Et voilà!


A very simple code for you to test your connection with MQSeries!


How simple is that?

How to call webbrowser from VB6 using API

To perform this task the code is extremely simple.

Private Declare Function ShellExecute _
                            Lib "shell32.dll" _
                            Alias "ShellExecuteA" ( _
                            ByVal hwnd As Long, _
                            ByVal lpOperation As String, _
                            ByVal lpFile As String, _
                            ByVal lpParameters As String, _
                            ByVal lpDirectory As String, _
                            ByVal nShowCmd As Long) _
                            As Long
Private Sub Command1_Click()
   Dim r As Long
   r = ShellExecute(0, "open", "http://www.microsoft.com", 0, 0, 1)
End Sub
 
 Really simple, isn't it?

XML, XSD and DataSet - How to read xml and transform into a dataset

Hi!

To transform XML into a DataSet is really simple.

Step 1


Create a XML.

<xml>
        <car>
            <brand>honda</brand>
        </car>
        <car>
            <brand>ford</brand>
        </car>
        <car>
            <brand>volkswagen</brand>
        </car>
        <car>
            <brand>toyota</brand>
        </car>
        <car>
            <brand>chevrolet</brand>
        </car>
</xml>

Step 2

Create the XSD

<?xml version="1.0" encoding="Windows-1252"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="xml">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="cars">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="car">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="brand" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

How do I generate the XSD? If you are using Visual Studio, you're gonna find the following menu item



Step 3

Create a ConsoleApp project and use the following code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Data;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            DataSet lObjDataset = new DataSet();
            lObjDataset.ReadXmlSchema(@"C:\netdaniels\ConsoleApplication1\cars.xsd");
            lObjDataset.ReadXml(@"C:\netdaniels\ConsoleApplication1\cars.xml");

            Console.WriteLine("Table count:" + lObjDataset.Tables.Count.ToString());

            foreach (DataTable lObjDT in lObjDataset.Tables)
            {
               
                Console.WriteLine("Table name:" + lObjDT.TableName);

                foreach (DataColumn lObjDC in lObjDT.Columns)
                {
                    Console.WriteLine("Column name:" + lObjDC.ColumnName);
                }
            }
           
        }
    }
}

Et voilà! We're done!

The result is:


How simple is that?!

Há!!!



Integration Serivces x Sybase

Well, I didn't want to say that, but the interaction between integration services and Sybase is not good at all.

The version of my Sybase Database

Adaptive Server Enterprise/12.5.4/EBF 15444 ESD#8/P/ia64/HP-UX B.11.23/ase1254/2105/64-bit/OPT/Mon Mar 24 04:38:00 2008

Example:

When you try to preview a OLEDB Source configured with a Sybase Data Source, the following message appears.


If you try to click OK anyway, you're gonna receive another message


Is there a solution to this problem? No.

Sybase, at least the version I am working with, and when it comes to Data Flow Task, is completely incompatible with SQL Integration Server.

There are other tasks, those who don't need column mapping, that can work with Sybase. But the the great breakthrough of using Integration Services is exactly that, the column mapping to perform transformations without the need of code programming.

Conclusion: the use of Integration Services with Sybase is very limited.

Há!

: (

SOAPUI - the jvm could not be started. the maximum heap size xmx might be too large or an antivirus or firewall tool could block the execution

This problems came from nowhere.

The SOAPUI began to fail.
First of all I tried to reinstall Java. I didn't work.
 So I reinstalled SOAPUI. That worked!!


terça-feira, 16 de julho de 2013

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'.

Hei!

Un muchacho como yo,
Que vive simplemente,
Que confía en los demás,
Y dice lo que siente,

- Palito Ortega -

Scenario
A WCF service was calling another WCF. The second wcf was exploding the message bellow.

How did I solve the problem?

Well, I used the following technique

 <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding sendTimeout="00:10:00" />
      </netTcpBinding>
    </bindings>

And where did I find the solution?
Here => http://stackoverflow.com/questions/919287/wcf-windows-service-timeout

When you start to search for a solution you're gonna find a lot of "garbage". The solution presented, I can guarantee you, works!

PS: I'm using WCF on AppFabric, ok?



System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'. ---> System.IO.IOException: The write operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.DelegatingConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.DelegatingConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.BufferedConnection.WriteNow(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, BufferManager bufferManager)
   at System.ServiceModel.Channels.BufferedConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security.NegotiateStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   --- End of inner exception stack trace ---
   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)
   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout, BufferManager bufferManager)
   at System.ServiceModel.Channels.FramingDuplexSessionChannel.OnSend(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.OutputChannel.Send(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.DuplexChannelBinder.DuplexRequestContext.OnReply(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)

segunda-feira, 15 de julho de 2013

Add identity column to table already created - Sybase


Today somebody asked me if we could add identity column to a table already created.
Well, it works.

To test it just copy and past the code bellow.

CREATE TABLE tablex
(
   columny VARCHAR(01)
)
go

INSERT INTO tablex (columny) SELECT "a"
INSERT INTO tablex (columny) SELECT "b"
INSERT INTO tablex (columny) SELECT "c"
INSERT INTO tablex (columny) SELECT "d"
INSERT INTO tablex (columny) SELECT "e"
INSERT INTO tablex (columny) SELECT "f"
INSERT INTO tablex (columny) SELECT "g"
INSERT INTO tablex (columny) SELECT "h"
go

ALTER TABLE tablex ADD columnz NUMERIC (5,0) IDENTITY
go
SELECT * FROM tablex
go
DROP TABLE tablex
go

Result
----------------------------------

columny columnz
a 1
b 2
c 3
d 4
e 5
f 6
g 7
h 8

quinta-feira, 11 de julho de 2013

ITILV3 - Day 32

Impact, Urgency, and Priority

Impact calculates the effect an incident has on business processes.

Urgency is a calculation of how long it will be before an incident impacts business operations in a major way.

Impact and urgency combined are used to determine priority, which is a category of how important the incident is.
Nothing new, at least, not for me.

Use .Net from VB6 (Interop Forms Toolkit)

Hi!

Sometimes you need to do something that is impossible when it comes to VB6. In those cases a possible solution is create a library in .Net.
The trick is to create a interop that will allow you VB6 application to access the .Net library.
When I need to do so, I use to use the interop forms toolkit.
Even though you see the word "forms", it's possible to call the library without activate any form.

Important: the toolkit comes in VB.NET programming language. For those who are accustomed to program in C# this fact could be annoying, but that's the way it is. Despite this fact, the toolkit works perfectly.

Interop Forms Toolkit

And that's all folks.

quarta-feira, 10 de julho de 2013

ITILV3 - Day 31

Governance

Governance drives organizations and controls them by defining directions, policies and rules used to conduct business.

Corporate Governance provides socially acceptable, truthful and responsible organizational management.

Effective Business Governance can result in improved organizational performance.

IT Governance is concerned with making sure that the IT process are implemented according to the organization's strategies and policies.

To be honest, all of those definitions are too generic. Are they valuable information? I don't think so. Sorry.