Muqeet's blog

  • How To: Configure MySql to work with IIS DB Manager

    As we are aware that with the release of version 1 of IIS Database Manager came in the support for managing MySql Databases. This is a cool thing specially for all the PHP guys out there as MySql is extensively used with PHP applications all over the world. I being a PHP lover myself have been trying to configure the MySql part of IIS DB Manager. It looked pretty simple but turned out to be my miss that made me struggle to get MySql work with DB Manager for quite sometime now. There dint seem to be an article around this so I thought I would write one myself.

    Let's start: The first thing we need is IIS DB Manager it self. Information and download location on DB Manager can be obtained from the IIS Extensions site. Once you have downloaded the installation package and installed DB Manager you should be seeing an entry as follows in administration.config.

    Note: The above command in the image will only work if you are using IIS 7.5 (ie. you run that command on Windows 7 or Windows Server 2008 R2)
    Now, it's time to get it working with MySql. I have a free edition of MySql installed on my local Windows 7 machine so that's what I will be working with. If you don't have MySql you can get it from here. Once that's installed and ready to run try making a few Databases to play around with.

    We now have IIS and MySql setup properly to get the whole thing working. Lets open up IIS manager drill down to Default Website. Now double click Database manager. Create a new connection. Give it a new name and click on the drop down for database provider so that we can select "MySql 5.x, 6.x". But hey hold on ... do you see that option?? NO! ... :-) now that's fun aint it??

    You have IIS DB Manager configured properly, MySql working properly but you JUST cant see the provider even though it's present in the administration.config file. That was exactly what I missed.

    If we check the image above carefully it states MySql provider name to be MySql.Data.MySqlClient ... Now open up your 2.0 machine.config located at %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG and find MySql.Data.MySqlClient. You are not going to find it. Aha! Now it makes you think what is MySql.Data.MySqlClient after all? Well MySql.Data.MySqlClient is an all-managed .NET driver for MySQL DB from MySql team. Bingo! suddenly everything makes sense. We had the parts but just missed the connector to tie it all up. The latest available version of the connector can be downloaded from the MySql Site for free. It's a pretty simple setup, however you would be requiring Admin privileges to complete the installation.

    Once the installation is completed open up machine.config and search the entry. This time you will find it and BANG we are good to go. Now open up your IIS manager, drill down to the default website and double click Database Manager. Now create a new connection. Creating a new connection to MySql is very simple and straight forward. You will be seeing a screen as shown below:


    As you can see now we select the Database provider to be "MySql 5.x, 6.x". The rest of the entries as just as simple as the other.

    Server: Put down your servername. In my case it was localhost.
    Database: Give your database name
    User ID: For default installation of MySql it will be root. If that is not the case then put down the User name given to your by your DB Administrator.
    Password: Provide the appropriate password for the user id.
    Port: The default port used by MySql is 3306.

    Click on Ok once all the details are entered and you are now good to go with the IIS DB Manger and MySql. Time to play around! Have Fun!

    If you have any problems check this topic at iis.net forums. If the topic doesn't solve your problem then post the issue at the DB Manager forum at iis.net

  • Community TechDays in Hyderabad: September 20th 2009

    Hey Everybody,

    Community TechDays India is back and with loads of action. And why is that? Because, it is in 11 Cities with 19 insightful Technical Sessions. I would be participating in the event that is being held in Hyderabad, A.P, India. I will be taking a session on IIS 7.5 Administration with Windows Server 2008 R2. It's going to be a level 100-200 session where in I would like to bring people up to date with the latest developments in IIS 7.5 that ships with Windows 7 and Windows Server 2008 R2. I would also be speaking on PHP enhancements and the web platform installer.

    Community TechDays is a free event and all you need to do is, register to the event. You can also view the event live from your desktop just by joining into the session. Here's how you could register for the online event.

    The agenda for the event in Hyderabad can be found here. The Venue is Microsoft IDC, Beside ISB at Gachibowli, Hyderabad.

    My Speaker Profile is here. :D ;)

    I should be having more to write post event. Hope to see a lot of you at the event... Have Fun...

  • IIS Workstation: Successful 1st Anniversary

    Recently, I successfully completed 1 year of my blog IIS Workstation. It was the year of recession, year of financial crisis, year of elections, year of new relations, year of global disturbances; but for me it was the year of learning. I think I have learned more than ever by contributing to one and all through this blog. I also became an IIS MVP during this year so can't complain. :-)

    I was just going through the site analytics to celebrate by contributions to the community and realized it would be even greater if I shared it with you. For, without my readers I would not have learned so much. Following is a snapshot of my blog details:

    Analysis Period: 13 months
    Total Page views: 37,646
    % New visits: 90.06%

    Traffic Sources:
    Search Engines: 85.84%
    Referring Sites: 7.33%

    Geographies:
    Site Viewed in: 163 countries
    Top 3 Countries in order of views: United States of America, India, United Kingdom

    Search:
    Top Keywords on Google:
    difference between iis 6 and 7 - Rank 1 (checked on July 4th 2009)
    how to open iis admin - Rank 1 (checked on July 4th 2009)
    difference between iis application and virtual directory - Rank 1 (checked on July 4th 2009)
    substatus code - Rank 1 (checked on July 4th 2009)
    iis admin could not start - Rank 1 (checked on July 4th 2009)

    Top 5 Pages (Most viewed):
    Difference between Virtual Directory and an Application in IIS
    How To: Create a Website using IIS 6 - Level 100
    Troubleshooting: Could not start the IIS Admin Service on Local Computer
    Troubleshooting: IIS 6 Status and Substatus codes
    IIS Workstation

    Hope this year turns out to be good news as well for me. Have fun and keep watching this place for more info!

    Oh and Thanks! :)

  • Sessions: Tech Ed on the Road, HydTechies

    I recently took a couple of sessions on IIS 7 & 7.5 as part of Hyderabad Techies and "Tech-Ed on the Road" revival campaign here in Hyderabad, India. It was great to see the enthusiasm people had for different Microsoft technologies. We had sessions ranging from ASP.NET - Windows Azure and IIS - to SQL Server 2008.

    I was responsible for delivering sessions on IIS 7.5 which is going to ship along with Windows Server 2008 R2 and Windows 7. I think I was kind of lucky in that sense, because there is always so much to speak on IIS. There is so much that is running on the web these days and you love it when lots of it is running on IIS.

    I knew the best way to spread the word on IIS, is to show what makes IIS the way it is. Then lets leave it to the people to decide what they want... shouldn't we? Anyways, I started from level 100, so that I could show the basic architectural changes in IIS 6 and IIS 7. Detailed explanation can be found in my previous post on differences between IIS 6 and IIS 7 and IIS: changes from 6 to 7.

    Moving on I showed the advancements in IIS UI, IIS security and IIS extensions and how they help both the Admins and the developers. IIS extension are these out of band modules which are released by the IIS PG and the community making use of the great extensibility modules available.

    It was great to see how much people loved the idea of including a module and the ease of it's installation which originally dint come with the product.

    As promised, details on the IIS extensions and download location can be found at http://www.iis.net/extensions. All the information on the Microsoft web application gallery and platform can be found here.

    Check out this cool blog on IIS history to see and learn how IIS has evolved. It also answers the 1st question I always face when speaking on IIS... "How to download IIS" ... :)

    Have fun... !!!

  • Troubleshooting: IIS Powershell Module on Windows 7 RC

    First thing that you need to know in regard to the IIS PowerShell Snap-in or the module when using it with Windows 7 is that you do not need to download & install the snap-in. In Windows 7 the snap-in is part of the default install of IIS. Moving on, if you want to use the snap-in with PowerShell in Windows 7 RC then you would need to import the module. Now that sounds simple. However, there is a problem. When you try to import the IIS module which is named WebAdministration you are most likely to view the error below.

    PS C:\Users\admin> Import-Module WebAdministration
    Process should have elevated status to access IIS configuration data.

    Fair enough. We are going to access the configuration data from IIS, we would need to be on elevated privileges. Let's try with elevated privileges.

    PS C:\Windows\system32> Import-Module WebAdministration
    Import-Module : File C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdministrationAliases.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.


    Huh! Now, why did this happen? Lets try and troubleshoot. Windows PowerShell has a concept called "Execution Policy". It is the execution policy that determines as to how a script runs on PowerShell. By default, the execution policy in Windows 7 RC is set at "Restricted" ... Oouch. Restricted here means you will not be able to run any script (even the ones you write yourself). Why so severe? Don't know so can't answer. But for sure we wouldn't be working with that execution policy and would have to change that.

    There are several levels of Execution Policy that you can set like Restricted, All Signed, RemoteSigned and Unrestricted. But the one we are going to work with is RemoteSigned. So, what is RemoteSigned execution policy anyways? It means, if you want to configure PowerShell to run any scripts that you write yourself, but to run scripts downloaded from the Internet only if those scripts have been signed by a trusted publisher. Sounds fair enough now doesn't it.

    To set RemoteSigned as the execution policy, run the following command.
    > Set-ExecutionPolicy RemoteSigned

    Lets try importing now.
    PS C:\Windows\system32> Import-Module WebAdministration
    Import-Module : The following error occurred while loading the extended type data file:
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\iisprovider.types.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".

    No go even now :) . When we try to execute any IIS cmd-let like get-website we will get an not recognised cmd-let error. Here's how to solve the entire situation. Close the PowerShell window and re-open it with elevated privileges and enter Get-ExecutionPolicy:

    > Get-ExecutionPolicy
    RemoteSigned

    That's good news ... no more Restricted. Lets try importing the IIS module yet again.

    >Import-Module WebAdministration

    No error. Success! Now lets try running some simple IIS cmd-let.

    > Get-Website

    Name ID State Physical Path bindings
    ---- -- ----- ------------- ---------
    Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http *:80:

    Problem Solved! However, to me this still looks like a workaround. Will let you know if and when I come across a solution to this. Till then, have fun!

  • How To: Web PI and Web Gallery and IIS live in action

    IIS Product Unit Manager Mai-Lan has come up with a number of video podcasts which give information on how to work with the Web PI and the Web Application Gallery. These videos can be found here:

    1.Real World IIS: Finding and Installing Web Platform Installer 2.0 (videocast).

    2.Real World IIS: Staying Current with the Latest Microsoft Web Platform with Web Platform Installer (videocast)

    3.Real World IIS: Packaging and Deploying an Open Source Application Using Web Deployment Tool (videocast)

    4.Real World IIS: Installing a Free Community Application Using Web Platform Installer (videocast)

    These videos cover all the basic information that is needed to get the Web PI and the Web App gallery up and running smoothly. However, that is not the only cool thing about these videos. All the videos are brought to us by the new HTTP streaming mechanism called Smooth Streaming. Trust me it's pretty cool. I have a dead slow connection at my place and yet I was able to watch the videos almost without any interruption. Smooth Streaming dynamically detects your PC and Network conditions and streams the silverlight videos appropriately. What that means is, the better your speed and PC hardware the better quality of video you get.

    On the other hand, the web application gallery lets you download and install some of the famous applications on web almost on the fly. Both ASP.Net and PHP. Microsoft has seen to it that the web app gallery includes everything that a beginner requires to kick start a basic website. For those who are not aware of Web PI and Web App Gallery yet, it works with Windows Server 2003 as well. Hope you work with it and deliver some great video content and quality :)

    Yes, I am now thinking of including some of this in Tech Ed India as well.

    See ya.

  • MS Teched India 2009

    Hey everybody, the fun time is back. Microsoft Tech-Ed India is being held at Hyderabad from 13th May to 15th May. Tech-Ed is an annual event that focuses on the latest offerings from Microsoft on various platforms. If you are into technology and love to know about all the latest in the industry then this is the place for you to be.

    All the information you need is available at the TechEd website.