Tuesday, May 19, 2009

Manage your Windows Services

Check out the sc.exe from the command line.

Tuesday, May 12, 2009

MSDTC TCP/IP Ports

http://support.microsoft.com/kb/250367/en-us

Monday, May 04, 2009

Dll not found. Reflection.

Hi,

If you have a error something like this one:

File Not Found. at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail) at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail) at System.Web.UI.TemplateParser.AddAssemblyDependency(String assemblyName, Boolean addDependentAssemblies) at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

Try this:
From the Vs.net command ptompt, run the tool Fuslogvw.exe.
On settings select the "log bind failures to disk" option, and choose a local path for the log, and click ok.
Run you app, and after the error, select the refresh button, the dll missing should appear. If you select it, with double click you sould have some info to help you.
WARNING: After you are done, disable the log.
Thanks Mister Daniel for this info.
Cheers.

Tuesday, March 03, 2009

Configure the S.O. proxy settings to all users

Use proxycfg to display the current proxy setting.

Use the option “proxycfg –d”, to disable the proxy setting.

Use the option “proxycfg -u” to copy the proxy settings from the Internet Explorer user current settings

Search strings in files, the good old way

 

FINDSTR

 

The Command Help (FINDSTR /?)

Utilize espaços para separar múltiplas cadeias de procura, excepto se o
argumento incluir o prefixo /C. Por exemplo, 'FINDSTR "quem está" x.y'
procura "quem" ou "está" no ficheiro x.y.  'FINDSTR /C:"quem está" x.y'
procura "quem está" no ficheiro x.y.

 

Online Help

http://technet.microsoft.com/en-us/library/bb490907.aspx

Thursday, July 10, 2008

BizTalk Must Have Documentation

 

Just a small note for some good documentation. I keep forgetting or losing this links. :)

 

For installation, administration and monitoring:

http://www.microsoft.com/downloads/details.aspx?FamilyID=5251f103-329d-4f8d-95b5-64f99f2f6dfc&DisplayLang=en

 

For HardCode Sql Queries:

BizTalkServer2004AdvancedMessageBoxQueries.doc

And just the BizTalk Community Bible:

http://www.codeplex.com/bloggersguide/Release/ProjectReleases.aspx?ReleaseId=14524

Wednesday, June 18, 2008

Teste do Windows Live Writer

Parece que agora a coisa está a começar a mexer.

Na mesma aplicação (leve), temos RSS Reader, Mail, Contactos Newsgroups, Autor de Blog,  Messenger.

Aquilo que gosto (desta fase de teste) é o facto de ser uma aplicação sem leve. Pena é que a funcionalidade de descarregar mails de outras contas seja para pagantes.

Tuesday, February 19, 2008

Reporting Services 2005 uninstall

Remove the trash on your sql server database engine
http://technet.microsoft.com/en-us/library/ms143518.aspx
And then remove the product
http://support.microsoft.com/default.aspx?scid=kb;en-us;290301

Friday, January 11, 2008

Unit Test On Internal Methods DotNet C#

Place this inside the assembly info of the project that you want to test:
//Taken from the Ent. Lib. 2.0 Solution.
[assembly: InternalsVisibleTo("Microsoft.Practices.EnterpriseLibrary.Data.Tests")]

The argument, in this case "Microsoft.Practices.EnterpriseLibrary.Data.Tests", should be the name of the project containing the tests.

Tuesday, December 18, 2007

Script sql muito simples para eliminar todos os registos de um BD

--Não é nada de especial. É só uma nota para não fica esquecido.

USE Database

DECLARE @Table_Name nvarchar(200)
DECLARE Table_Cursor CURSOR FOR
SELECT name
FROM sysobjects
WHERE (xtype = 'U')

OPEN Table_Cursor

FETCH NEXT FROM Table_Cursor
INTO @Table_Name

EXEC ('DELETE FROM ' + @Table_Name )

WHILE @@FETCH_STATUS = 0
BEGIN

FETCH NEXT FROM Table_Cursor
INTO @Table_Name

EXEC ('DELETE FROM ' + @Table_Name )
END

CLOSE Table_Cursor
DEALLOCATE Table_Cursor

Friday, December 07, 2007

C# procurar strings desprezando os acentos. String search with case and accent insensitive

using System;
using System.Collections.Generic;
using System.Globalization;

public class StringHelper
{

public static int IndexOfWithCaseAndAccentInsensitive (string source, string stringToSearch)
{
CompareInfo ci = new CultureInfo("en-US").CompareInfo;
CompareOptions co = CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace;
return ci.IndexOf(source, stringToSearch, co);
}

public static void Main()
{
RL();

WL(IndexOfWithCaseAndAccentuationIncensite("zzzzzzzzzzzÁbc", "a"));

RL();
}

#region Helper methods

private static void WL(object text, params object[] args)
{
Console.WriteLine(text.ToString(), args);
}

private static void RL()
{
Console.ReadLine();
}

private static void Break()
{
System.Diagnostics.Debugger.Break();
}

#endregion
}

Obrigado João, pode vir a ser útil.

Monday, November 19, 2007

How to generate a insert script for your SQL DataBase?

Microsoft SQL Server Database Publishing Wizard 1.1:

http://www.microsoft.com/downloads/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

Very nice tool

You can use this to convert a DataBase from Sql Server 2005 into Sql Server 2000.

Tuning your Sql Server DataBase performance

Tuning your Sql Server DataBase performance:
1. Using Sql Profiler. Using the "Tunning template" record a trace file. Don't forget that if you trace a long period of time you get better tips, but the processing time of such task is not the same (you could always test for yourself).
2. Save the trace file and run it against the Tunning Advisor( included with in the SQL package).
3. Use other tools in order to take numbers about processing time and total # of uses.
4. Apply your modifications and start over until....

You can also make use of a sql stress tool in order to make better use of the Tunning Advisor: http://www.datamanipulation.net/SQLQueryStress/

Thursday, October 25, 2007

Diff DataBases

Just a memo for the good tablediff command.

C:\Program Files\Microsoft SQL Server\90\COM>tablediff -sourceserver "SQL2005" -
sourcedatabase "MyDB1" -sourcetable "ABC" -destinationserver "SQL2005" -destinat
iondatabase "MyDB2" -destinationtable "ABC" -f "c:\Diff"

Quick example can be found at:
http://www.databasejournal.com/features/mssql/article.php/3594926

Tuesday, October 23, 2007

SQL string compare with accent-insensitive

I'm always forgetting the collation name used for this prupose.
How to compare strings without caring about accents:

select *
from t1 inner join t2 on t1.description collate SQL_Latin1_General_Cp850_CI_AI like t2.description collate SQL_Latin1_General_Cp850_CI_AI

Friday, September 21, 2007

Convert WSDL to HTML

I was searching for a good xslt to convert a wsdl to a html, doc, rtf ou pdf.
It's not rocket science but it is hard to find.
http://tomi.vanek.sk/xml/wsdl-viewer.xsl

Cheers

Friday, September 14, 2007

Vs.net 2005 Xml Documentation

Try this link:
http://www.sandcastledocs.com/

Monday, September 03, 2007

How to copy files from GAC

cd C:\WINDOWS\assembly
xcopy GAC c:\tmp\ /E
xcopy GAC_MSIL c:\tmp\ /E
xcopy GAC_32 c:\tmp\ /E



Then explore the c:\tmp\ directory.

Tuesday, August 21, 2007

Programa para facilitar o copy paste

Esta tool possibilita fazer o paste como objecto StringBuilder ;).
http://weblogs.asp.net/Alex_Papadimoulis/archive/2004/05/25/141400.aspx

Muito bom...
Mais uma nota.