Category Archives: Microsoft

Code Snippets .NET Tips & tricks

Code Translation for .NET (C#<->VB.NET)

This service will translate the code for you, just start typing the code or upload a file to convert it.
For now it only supports from VB.NET to C# and from C# to VB.NET.
To use it you can either:

  1. Start typing your code.
  2. Copy and Paste the code in the Code Text Box.
  3. Translate an entire file using the file upload.

Disclaimer: No copy is done whatsoever of the code that you either type, or upload for translation. Everything is processed in the server in memory and returned immediately to the browser.
If you want to give feedback on the translation, please send me an email including the code you used and the desired translation to me@carlosag.net.

http://www.carlosag.net/Tools/CodeTranslator/

see also:

http://www.developerfusion.com/tools/convert/csharp-to-vb/

Exchange Microsoft

Microsoft Exchange POP3 Service Stuck on ‘Starting’ State

The Microsoft Exchange POP3 service  stuck in an infinite state of  ”Starting” status after tried to manually restart it .

Try

  1. Open Task Manager. [Ctrl+Alt+Delete]
  2. Find the process “inetinfo.exe” .
  3. Click on ‘End Process’

The service should now start .

ASP.Net

ASP.NET 4.0 potentially dangerous Request.Form value was detected

This was because .NET detected something in the entered text which looked like an HTML statement.
This is a feature put in place to protect your application cross site scripting attack and followed accordingly.

To disable request validation, I added the following to the existing “page” directive in that .aspx file.

ValidateRequest=&quot;false&quot;

For .NET 4, we need to add requestValidationMode=”2.0″ to the httpRuntime configuration section of the web.config file like the following:

&lt;httpRuntime requestValidationMode=&quot;2.0&quot;/&gt;

But if there is no httpRuntime section in the web.config file, then this goes inside the <system.web> section.

If anyone wants to turn off request validation for globally user, the following line in the web.config file within <system.web> section:

&lt;pages validateRequest=&quot;false&quot; /&gt; 
Metro Style Microsoft Windows

Metro style app

A Metro style app is a new type of application that runs on Windows 8 Release Preview devices. Read on if you want to learn more about what makes Metro style apps different from traditional desktop apps.

Apps have one window that supports multiple views

Unlike traditional desktop apps, a Metro style app has a single, chromeless window that fills the entire screen by default, so there are no distractions.

A Metro style app that fills the screen

read more »

Microsoft Visual Studio

Visual Studio shortcut keys

You are familiar with many of Visual Studio’s shortcut keys, but not all of them. Here is a handy reference that can make your .NET lifestyle easier and a lot more productive.
read more »

.NET Charts jQuery

Highcharts .Net (with vb sample)

Highcharts .Net is a charts library written in pure javascript, offering an easy way to add complex charts to your Web application. Highcharts .Net encapsulates the Highcharts API on ASP.net controls making it easier to use.

Project page at codeplex: http://highcharts.codeplex.com

You can see some Highcharts.Net examples at this link: http://highcharts.paulovich.com.br/

Install:

After download the newest release, add it as reference on your web application, and then add it to the page controls on your web.config:

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls>
<add tagPrefix="highchart" namespace="Highchart.UI" assembly="Highchart"/>
</controls>
</pages>

After that, you only need to import the jQuery script.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

it’s ready to use 😉

aspx:

 

<highchart:columnchart id="hcVendas" width="600" height="400" runat="server"></highchart:columnchart>

VB Sample:


read more »

Exchange Microsoft

Manually update and rebuild the Exchange 2003 GAL

This how-to walks through the process of manually updating offline address books for users from Exchange 2003 as well as the Global Address List.

  1. Open Exchange System Manager
    This how-to was actually made on a WS2003STD SP2.
  2. Expand Recipients and Select “Offline Address Lists”
  3. In the right pane, right click the “Default Offline Address List” and select “Rebuild”
  4. It will give you a prompt about how long it can take
    Just click “Yes”
  5. Repeat this for the “Global Address List”
    In the left pane, now click on “Recipient Update Services”
  6. In the right pane, right click on each choice, first selecting “Update Now” on both, and then again selecting “Rebuild” on both
  7. That’s all

This can take several hours though, with my 100 users it generally takes about 40 minutes max.

I would also submit that you can manually re-download the address books via Outlook by selecting the small arrow next to send/receive and then clicking on (you guessed right!) “Download Address Book”.

.NET AJAX

CalendarExtender and globalization

Set the ScriptManager:


&lt;asp:ScriptManager ID=&quot;ScriptManager1&quot; runat=&quot;server&quot; EnableScriptGlobalization=true  &gt;&lt;/asp:ScriptManager&gt;

Microsoft

Microsoft Visual Studio LightSwitch 2011

Microsoft Visual Studio LightSwitch is a simplified, self-service development tool that enables you to build business applications quickly and easily for the desktop and cloud.

read more »

Microsoft

Windows 8 preview

Microsoft is also baking cloud-based services like Windows Live, SkyDrive and Bing into all of its consumer products. Sign in on any device and you’ll have access to all of your content, apps, preferences and search history.