Category Archives: Microsoft

IIS Silverlight

How to solve Unhandled Error in Silverlight Application Code: 2104

The Problem: You ftp a Silverlight App to an IIS website, go to the website in a browser, and get the following error:

Message: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings

The Cause: The Silverlight Mime types (.xaml, .xap and .xbap) are not listed in that websites registered mime types, therefore IIS will not send those files to the browser.

The Solution: Open IIS on the server, go to HTTP headers, click on Mime Types, click “Add New” and add the following:

Extension – Mime Type
.xaml – application/xaml+xml
.xap – application/x-silverlight-app
.xbap – application/x-ms-xbap

Hit Apply and your application will load!

Microsoft Outlook

NK2View: View Outlook .NK2 AutoComplete Information

This feature is known as ‘AutoComplete’ and Outlook automatically build this emails list according to user activity and save it into a file with .NK2 extension.

In some circumstances, you may need to repair or modify the values appeared in the AutoComplete list, or you may want to remove unwanted email addresses and/or to add new email addresses. MS-Outlook doesn’t provide any ability to edit this AutoComplete list, so this is where NK2Edit software can help you.

NK2Edit Features:

  • Easily modify or fix all information stored in the NK2 file, including the display name, the email address, the exchange string, the Drop-Down display name, and the search string.
  • Easily remove unwanted single quote characters from the display name and from the Drop-Down list.
  • Delete unwanted emails, as well as add new emails, by typing them manually, or by choosing them from the address book of Outlook.
  • Copy NK2 records from one NK2 file to another – simply by copy and paste !
  • Build a completely new NK2 file and add the desired emails into it, by typing them manually, by adding them from your address book, or by copying records from another NK2 file.
  • Extract data from corrupted NK2 files that Outlook cannot read anymore (When Outlook AutoComplete stopped working) and even repair them so Outlook will be able to read them again.
  • Export all data stored in the NK2 file into a special Unicode text file in a stucture similar to .ini file of Windows. You can open it any text editor you like, make the changes you need, and then convert it back into NK2 file that Outlook can use.
  • Export the emails information stored inside NK2 file into HTML/Text/csv/xml file.
  • Export the emails information stored inside NK2 file directly into the contacts of Outlook.
  • Copy the selected NK2 records in tab-delimited format and then paste the information into Excel.
  • Change the order of the records in the NK2 file, which also affects the order they appear in the drop-down. You can also sort the list in alphabetical order of the Drop-Down display names.
  • Command-Line Support: Write simple scripts that can add, remove, or modify records inside the NK2 file, without displaying any user interface.
  • NK2Edit is a portable application that can be used from any computer with Windows operating system (Starting from Windows 2000) without need of any installation process, and without making changes in the Registry.
  • NK2 Control Center – Allows you to watch to location and the status of all NK2 files in your organization.

http://www.nirsoft.net/utils/outlook_nk2_edit.html

nk2edit


.NET Microsoft

Register .Net Framework 4.0 in IIS

Check your .Net framework location , usually is

C:\Windows\Microsoft.NET\Framework\v4.0.30319

you can put this in a batch file ( “iisreg_fx4.bat” ):

REM "Changing to the Framework install directory"
cd /d C:\Windows\Microsoft.NET\Framework\v4.0.30319
echo "Stopping IIS"
iisreset /stop
rem regiis
aspnet_regiis -i
echo "Restarting IIS"
iisreset /start
echo "----------------------"
pause
.NET ASP.Net 2.0 Microsoft

ASP.NET Web Configuration Guidelines

.NET Framework 4

ASP.NET enables you to specify configuration settings that affect all Web applications on a server, that affect only a single application, that affect individual pages, or that affect individual folders in a Web application. You can make configuration settings for features such as compiler options, debugging, user authentication, error-message display, connection strings, and more.

Configuration data is stored in XML files that are named Web.config.

This topic describes the main configuration settings that you can make in the Web.config file. The topic contains the following sections:

read more »

.NET ASP.Net 2.0

ASP.NET 2.0 – Enter Key – Default Submit Button

One of the most annoying things in developing web pages is handling the “Enter key” for form submission. Enter key has been the favourite way users like to submit forms. Though we provide Buttons to click on, the easiest and intuitive way is that, I can enter some text, make some changes and then hit “Enter” to accomplish my submission.
“Enter” Key is handled in a little tricky way by uplevel browsers like Internet Explorer, when it comes to ASP.NET.

* If there is a single Textbox and single button, then it becomes straight forward, the button is submitted. However, the event code doesnt get executed, though the page postsback.

* If there are two or more, buttons, then it takes up the first button as the default button. However, it still doesnt execute the event handler but just refreshes the page.

You can supress the Enter key event using Javascript. But this would result in other undesirable effects like, any Enter key in the form i.e. within Text Area or basically where large text is entered, would be disabled.

The earlier work around was to associate a javascript function to each Button to verify the that the relevant button is submitted upon Enter key.

ASP.NET 2.0 introduces a wonderful work around for this. By simply specifying the “defaultbutton” property to the ID of the <asp:Button>, whose event you want to fire, your job is done.

The defaultbutton property can be specified at the Form level in the form tag as well as at panel level in the <asp:panel> definition tag. The form level setting is overridden when specified at the panel level, for those controls that are inside the panel.
read more »

.NET ASP.Net Microsoft

List of Request.ServerVariables

ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:*/* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:sv HTTP_HOST:localhost:1229 HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
ALL_RAW Connection: Keep-Alive Accept: */* Accept-Encoding: gzip, deflate Accept-Language: sv Host: localhost:1229 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
APPL_MD_PATH
APPL_PHYSICAL_PATH D:\code\web\demos\membership\
AUTH_TYPE NTLM
AUTH_USER SYSTEMEN-D9AE02\Stefan Holmberg
AUTH_PASSWORD
LOGON_USER SYSTEMEN-D9AE02\Stefan Holmberg
REMOTE_USER SYSTEMEN-D9AE02\Stefan Holmberg
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE
HTTPS
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID
INSTANCE_META_PATH
LOCAL_ADDR 127.0.0.1
PATH_INFO /membership/servervariables.aspx
PATH_TRANSLATED D:\code\web\demos\membership\servervariables.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT
REQUEST_METHOD GET
SCRIPT_NAME /membership/servervariables.aspx
SERVER_NAME localhost
SERVER_PORT 1229
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE
URL /membership/servervariables.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE sv
HTTP_HOST localhost:1229
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
ASP.Net Microsoft

Colors in ASP.NET

System.Drawing.Color

AliceBlue Hex Code: #F0F8FF
AntiqueWhite Hex Code: #FAEBD7
Aqua Hex Code: #00FFFF
Aquamarine Hex Code: #7FFFD4
Azure Hex Code: #F0FFFF
Beige Hex Code: #F5F5DC
Bisque Hex Code: #FFE4C4
Black Hex Code: #000000
BlanchedAlmond Hex Code: #FFEBCD
Blue Hex Code: #0000FF
BlueViolet Hex Code: #8A2BE2
Brown Hex Code: #A52A2A
BurlyWood Hex Code: #DEB887
CadetBlue Hex Code: #5F9EA0
Chartreuse Hex Code: #7FFF00
Chocolate Hex Code: #D2691E
Coral Hex Code: #FF7F50
CornflowerBlue Hex Code: #6495ED
Cornsilk Hex Code: #FFF8DC
Crimson Hex Code: #DC143C
Cyan Hex Code: #00FFFF
DarkBlue Hex Code: #00008B
DarkCyan Hex Code: #008B8B
DarkGoldenrod Hex Code: #B8860B
DarkGray Hex Code: #A9A9A9
DarkGreen Hex Code: #006400
DarkKhaki Hex Code: #BDB76B
DarkMagenta Hex Code: #8B008B
DarkOliveGreen Hex Code: #556B2F
DarkOrange Hex Code: #FF8C00
DarkOrchid Hex Code: #9932CC
DarkRed Hex Code: #8B0000
DarkSalmon Hex Code: #E9967A
DarkSeaGreen Hex Code: #8FBC8B
DarkSlateBlue Hex Code: #483D8B
DarkSlateGray Hex Code: #2F4F4F
DarkTurquoise Hex Code: #00CED1
DarkViolet Hex Code: #9400D3
DeepPink Hex Code: #FF1493
DeepSkyBlue Hex Code: #00BFFF
DimGray Hex Code: #696969
DodgerBlue Hex Code: #1E90FF
Firebrick Hex Code: #B22222
FloralWhite Hex Code: #FFFAF0
ForestGreen Hex Code: #228B22
Fuchsia Hex Code: #FF00FF
Gainsboro Hex Code: #DCDCDC
GhostWhite Hex Code: #F8F8FF
Gold Hex Code: #FFD700
Goldenrod Hex Code: #DAA520
Gray Hex Code: #808080
Green Hex Code: #008000
GreenYellow Hex Code: #ADFF2F
Honeydew Hex Code: #F0FFF0
HotPink Hex Code: #FF69B4
IndianRed Hex Code: #CD5C5C
Indigo Hex Code: #4B0082
Ivory Hex Code: #FFFFF0
Khaki Hex Code: #F0E68C
Lavender Hex Code: #E6E6FA
LavenderBlush Hex Code: #FFF0F5
LawnGreen Hex Code: #7CFC00
LemonChiffon Hex Code: #FFFACD
LightBlue Hex Code: #ADD8E6
LightCoral Hex Code: #F08080
LightCyan Hex Code: #E0FFFF
LightGoldenrodYellow Hex Code: #FAFAD2
LightGray Hex Code: #D3D3D3
LightGreen Hex Code: #90EE90
LightPink Hex Code: #FFB6C1
LightSalmon Hex Code: #FFA07A
LightSeaGreen Hex Code: #20B2AA
LightSkyBlue Hex Code: #87CEFA
LightSlateGray Hex Code: #778899
LightSteelBlue Hex Code: #B0C4DE
LightYellow Hex Code: #FFFFE0
Lime Hex Code: #00FF00
LimeGreen Hex Code: #32CD32
Linen Hex Code: #FAF0E6
Magenta Hex Code: #FF00FF
Maroon Hex Code: #800000
MediumAquamarine Hex Code: #66CDAA
MediumBlue Hex Code: #0000CD
MediumOrchid Hex Code: #BA55D3
MediumPurple Hex Code: #9370DB
MediumSeaGreen Hex Code: #3CB371
MediumSlateBlue Hex Code: #7B68EE
MediumSpringGreen Hex Code: #00FA9A
MediumTurquoise Hex Code: #48D1CC
MediumVioletRed Hex Code: #C71585
MidnightBlue Hex Code: #191970
MintCream Hex Code: #F5FFFA
MistyRose Hex Code: #FFE4E1
Moccasin Hex Code: #FFE4B5
NavajoWhite Hex Code: #FFDEAD
Navy Hex Code: #000080
OldLace Hex Code: #FDF5E6
Olive Hex Code: #808000
OliveDrab Hex Code: #6B8E23
Orange Hex Code: #FFA500
OrangeRed Hex Code: #FF4500
Orchid Hex Code: #DA70D6
PaleGoldenrod Hex Code: #EEE8AA
PaleGreen Hex Code: #98FB98
PaleTurquoise Hex Code: #AFEEEE
PaleVioletRed Hex Code: #DB7093
PapayaWhip Hex Code: #FFEFD5
PeachPuff Hex Code: #FFDAB9
Peru Hex Code: #CD853F
Pink Hex Code: #FFC0CB
Plum Hex Code: #DDA0DD
PowderBlue Hex Code: #B0E0E6
Purple Hex Code: #800080
Red Hex Code: #FF0000
RosyBrown Hex Code: #BC8F8F
RoyalBlue Hex Code: #4169E1
SaddleBrown Hex Code: #8B4513
Salmon Hex Code: #FA8072
SandyBrown Hex Code: #F4A460
SeaGreen Hex Code: #2E8B57
SeaShell Hex Code: #FFF5EE
Sienna Hex Code: #A0522D
Silver Hex Code: #C0C0C0
SkyBlue Hex Code: #87CEEB
SlateBlue Hex Code: #6A5ACD
SlateGray Hex Code: #708090
Snow Hex Code: #FFFAFA
SpringGreen Hex Code: #00FF7F
SteelBlue Hex Code: #4682B4
Tan Hex Code: #D2B48C
Teal Hex Code: #008080
Thistle Hex Code: #D8BFD8
Tomato Hex Code: #FF6347
Transparent Hex Code: #FFFFFF
Turquoise Hex Code: #40E0D0
Violet Hex Code: #EE82EE
Wheat Hex Code: #F5DEB3
White Hex Code: #FFFFFF
WhiteSmoke Hex Code: #F5F5F5
Yellow Hex Code: #FFFF00
YellowGreen Hex Code: #9ACD32
.NET ASP.Net Microsoft

Custom paging nav on GridView control

<PagerTemplate>
      <asp:LinkButton CommandName="Page" CommandArgument="First"
        ID="LinkButton1" runat="server" Style="color: white">
        &lt;&lt;First</asp:LinkButton>
      <asp:LinkButton CommandName="Page" CommandArgument="Prev"
        ID="LinkButton2" runat="server" Style="color: white">
        &lt; Prev</asp:LinkButton>
      [Records <%= GridView1.PageIndex * GridView1.PageSize %>
        - <%= GridView1.PageIndex * GridView1.PageSize +
           GridView1.PageSize - 1 %>]
      <asp:LinkButton CommandName="Page" CommandArgument="Next"
        ID="LinkButton3" runat="server" Style="color: white">
        Next &gt;</asp:LinkButton>
      <asp:LinkButton CommandName="Page" CommandArgument="Last"
       ID="LinkButton4" runat="server" Style="color: white">
        Last &gt;&gt;</asp:LinkButton>
</PagerTemplate>
Microsoft Outlook

Erro ao abrir Outlook 2003/2007

“Não é possível iniciar o microsoft office outlook. Não é possível abrir a janela do Outlook.”

Erro ao abrir o Outlook 2007 (Não é possivel abrir a janela do outlook)
Hoje depois de um reboot ao PC não estava a conseguir abri o Outlook.

Após alguma pesquisa e debug, lá encontrei a solução: “Limpar e gerar novamente o painel de navegação do perfil actual.”

Para isso basta ir ao “Menu Iniciar”, escolher a opção “Executar” e escrever o comando outlook /resetnavpane

Outros comandos que podem ser úteis para o Outlook:
http://office.microsoft.com/pt-pt/outlook/HP010031102070.aspx
http://www.mundibrasil.org/news/atualizacao-pode-causar-pane-no-outlook-saiba-como-resolver.html

Microsoft

Error “The report server database is an invalid version”

Source: Report Server Windows
Event ID: 117
Description: The report server database is an invalid version.

Reporting Services Configuration Manager

  1. Open up the “Reporting Services Configuration Manager” by going to Start -> Programs ->Microsoft SQL Server 2005 -> Configuration Tools -> Reporting Services Configuration.
  2. On the left hand side, click on “Database Setup”. (there should be a red “x” to the left of Database Setup.
  3. Choose the appropriate Server Name.
  4. For the Database Name, click “New” and do not use the default name “ReportServer” since it’s possible a .MDF file was already created with this name. I used “ReportServer2”.
  5. Make sure to choose the “Credentials Type” and enter the account information for a user who has create database permissions.
  6. Click “Upgrade”. Make sure you get all green check marks (even a warning message means the process probably didn’t complete properly).
  7. Click “Apply” at the bottom.