Thursday, November 10, 2011

Mix different .Net Framework on Windows 2003 Server

This tutorial is for setting up websites based on .Net Framework 2.0 and 4.0 on windows 2003 server.

Very first thing we should keep in mind that IIS 6.0 application pools do not allow mixed .Net Framework.


Here I am showing pictures for making new application pool in IIS 6.0 and IIS 7.0

IIS 6.0 New application pool dialogue

IIS 7.0 New application pool dialogue
As you can see in IIS 6.0 we do not have option for selecting .Net Framework
Steps to setting up mixed .Net Framework(2.0/4.0) on Windows 2003 ServerStep-1We will create two different application pool. I named them DotNet2Pool and DotNet4Pool you can give any name as per your choice.

Step-2Now assign application pool as per .Net requirement of your website as shown in figure


You can check and set your website .Net Framework requirement as shown in below image.

Please make sure do not use .Net Framework 2.0 application pool on ASP.net 4.0 website and vice-versa.


Thanks!

Wednesday, November 9, 2011

Facebook not showing YouTube videos thumbnails

Hi,

When I putting YouTube video link on my Facebook page. Video thumbnail doesn’t show up on Facebook. Sometimes it shows sometimes not. During my search & research process I got two workarounds


  1. This is a lengthy process but generate thumbnail for my this video
    1. Login Facebook and YouTube
    2. Select video to share and click share button below video
    3. Copy long link, paste in Facebook link
    4. Click on attach and post video
    5. Facebook will not generate thumbnail, delete post
    6. From YouTube this time copy short link
    7. Paste in Facebook and post
    8. Hopefully it will generate thumbnail (it works for me, but not always)
  2. This I got from Google support forum it works for this video
    1. Just add &feature=related In last of YouTube link

Thanks

Tuesday, November 1, 2011

Format numbers with Indian style commas.

In our ERP projects we usually need to display commas in numbers. In most of the format we did not get Indian style commas. So I had developed this class. Its main function is Put_Commas it take string as input and return string with commas.

Public Class ClsCommas
    Public Function Put_Commas(ByVal PassString As String) As String
        Dim IsNegative As Boolean
        Dim DecimalPart As String
        Dim TLen As Long            'Length of String without "-" and "."
        Dim LString As String       'String for Storing Changed String
        '-------
        'Check Must Be Greater than 999
        '------

        If System.Math.Abs(Decimal.Parse(PassString)) <= 999 Then
            Put_Commas = PassString
            Exit Function
        End If

        '-------------
        'Check Negative Values
        '-------------
        If Decimal.Parse(PassString) < 0 Then
            IsNegative = True
            PassString = Right(PassString, Len(PassString) - 1)
        Else
            IsNegative = False
        End If
        '---------
        'Remove Decimal Part
        '---------

        If PassString.Contains(".") Then
            DecimalPart = Right(PassString, Len(PassString) - PassString.IndexOf("."))
            PassString = Left(PassString, InStr(1, PassString, ".") - 1)
        Else
            DecimalPart = ""
        End If
        '-----------------
        TLen = Len(PassString)
        If TLen > 3 Then            'First Time Three Char
            LString = Right(PassString, 3)
            TLen = TLen - 3
            PassString = Left(PassString, Len(PassString) - 3)
        Else
            LString = ""

        End If
        Do While TLen > 2
            LString = Right(PassString, 2) + "," + LString
            TLen = TLen - 2
            PassString = Left(PassString, Len(PassString) - 2)

        Loop
        LString = Trim(PassString) + "," + Trim(LString)
        '--------------
        'Add Decimal Part
        '-------------
        If Trim(DecimalPart) <> "" Then
            If Trim(DecimalPart.Contains(".")) = False Then
                LString = LString + "." + DecimalPart
            Else
                LString = LString + DecimalPart
            End If
            '-------------------------------------------------
        End If
        '-----------
        'Check for Negative
        '-----------
        If IsNegative Then
            LString = "-" + Trim(LString)
        End If
        Put_Commas = LString
    End Function
    Private Function Right(ByVal PassStr As String, ByVal RChar As Integer) As String
        Dim LStr As String
        Try
            LStr = PassStr.Substring(PassStr.Length - RChar, RChar)
            Return LStr
        Catch ex As Exception
            Return PassStr
        End Try
    End Function
    Private Function Left(ByVal PassStr As String, ByVal LChar As Integer) As String
        Dim LStr As String
        Try
            LStr = PassStr.Substring(0, LChar)
            Return LStr
        Catch ex As Exception
            Return PassStr
        End Try
    End Function
End Class

Happy Coding!!
Tariq


Monday, October 31, 2011

The specified network name is no longer available

Hi,


I am posting this information in hope that It will save some time of yours.

I was facing a strange issue when trying to connect my windows 7 ultimate to windows 2003 domain.


Windows 7 computer configuration is


Processor: Intel(R) Core(TM) i3-2100 CPU @3.10GHz 3.10 GHz
Installed memory (RAM) 2.00 GB
System type: 32-bit Operating System


Wireless card: WG311v3 (54 Mbps Wireless PCI Adapter from NetGear)


After installation of driver from netgear website i am able to install card and also able to ping my server and router. Now when I am trying to connect this windows 7 system to windows 2003 domain it produce error "The specified network name is no longer available" after a very long duration.


Where as same configuration (with Intel Core 2 Duo) on my another system is working perfectly and I am able to connect to my domain.

So I decided to change my network card and used DIGISOL DG-WN1150N and it works and I am able to connect to my domain.

What I feel that some issue exist with netgear and i3 processor. If you have same problem and able to solve with netgear please update me also.

Tariq

driver cannot start code 10 windows 7 (Solved)



Hi,


Finally I am able to solve this issue. In my case main problem was 4 GB RAM. 


During search on Internet I found on netgear website following knows issues


1) Win7 32 and Win 64 are not WHQL certified.
2) Win7 64 users have to "disable driver signing¨ when restarting PC every time. (Win7 x86 is fine)
3) For Win7 32 and Win 64, If the user has 4GB or more of ram installed on PC, it could show code 10 error and fail for installation.
4) Error code 10 occuring when installing or running driver for some PC.




click here to read full details for WG311v3 card.


Happy Coding!!
Tariq

Sunday, October 30, 2011

driver cannot start code 10 windows 7

Hi,

  • I installed windows 7 on new system.
  • Installed wireless card of netgear (WG311v3)
  • Its not working and in devices it shows "driver cannot start code 10"
  • Still working on this issue search lot of information on Google but not able to solve.
  • Any suggestions are welcome.
Thanks & regards,
Tariq