Lately, I need to write a desktop application that needs to use a web service protected by Windows Authentication.
Most of the tutorials show you how easy it is to use a web services, and it is really easy till you hit the way of Windows Authentication. To get around it, you can try to want to check out this blog I found. It shows you how you can setup BasicHttpBinding to pass the Windows Authentication.
WCF BasicHttpBinding with Windows Authentication & a 2.0 Client
Tuesday, November 15, 2011
Monday, October 31, 2011
Security Groups and Policies for a Windows User
In Windows environment, resources authorizations are usually done by checking a users security policy. When you are writing a program, you often need to find out your own security group/ policy, so you can test your program with your own credentials. However, it isn't always convenient to bother the system administrators to get details of your settings.
In a situation like this, you may want to try the tool gpresult
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/gpresult.mspx?mfr=true
With it, you can see settings about yourself.
In a situation like this, you may want to try the tool gpresult
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/gpresult.mspx?mfr=true
With it, you can see settings about yourself.
Labels:
active directory,
c#,
credential,
gpresult,
policy
v-tools and Access
If you have inherited an Access database from someone, one of the problems you may face is finding your way round. As things can be done as queries, forms and modules etc., it can be a bit difficult to find your ways.
I have recently come across this tool called v-tools. It offers many features for Access database, but the one I found it most attractive is the ability to do "deep searches" on all objects. For example, if you search for the "Orders", it will look for all objects such as tables, queries, modules etc and show you any involved.
Did I also mention it is free?
I have recently come across this tool called v-tools. It offers many features for Access database, but the one I found it most attractive is the ability to do "deep searches" on all objects. For example, if you search for the "Orders", it will look for all objects such as tables, queries, modules etc and show you any involved.
Did I also mention it is free?
Wednesday, October 19, 2011
Routing paramaters in MVC
In .NET MVC, you can access the routing parameters by using RouteData property of the ViewContext object similar to below.
ViewContext.RouteData.Values["id"]
ViewContext.RouteData.Values["id"]
Labels:
mvc2,
parameters,
routedata,
routing,
viewcontext
Saturday, October 15, 2011
Ubuntu 11.10 ... and its problems
Ubuntu 11.10 seems to be the worst I have tried so far. Since my graphics card isn't new enough to support the new graphics features, I can tell the visual part of the system. However, it broke my sound. Now my system is "silent"
After upgrade, the system failed to detect my
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
I am a system user, and I just want a system work. Guess with Ubuntu ... it seems it is still too much to ask!
Update:
At last I found this website.
http://ubuntuforums.org/showthread.php?t=205449
By following the instructions, I at least managed to get sound back (sort of).
For some unknown reason, snd-intel8x0 was backlisted. Once I comment out the snd-intel8x0 in the /etc/modprobe.d/blacklist-alsa.conf , I got my sound back (well on speaker out jack anyway. My tower is a business machine with internal speaker. Still have no sound with the internal speaker. Nevertheless, it is a progress)
# blacklist snd-intel8x0
After upgrade, the system failed to detect my
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
I am a system user, and I just want a system work. Guess with Ubuntu ... it seems it is still too much to ask!
Update:
At last I found this website.
http://ubuntuforums.org/showthread.php?t=205449
By following the instructions, I at least managed to get sound back (sort of).
For some unknown reason, snd-intel8x0 was backlisted. Once I comment out the snd-intel8x0 in the /etc/modprobe.d/blacklist-alsa.conf , I got my sound back (well on speaker out jack anyway. My tower is a business machine with internal speaker. Still have no sound with the internal speaker. Nevertheless, it is a progress)
# blacklist snd-intel8x0
Friday, September 23, 2011
Ubuntu, KVM and Resolution
Ubuntu is a nice alternative to Windows. I have tried few distros like Redhat, SuSe, Mandrive, and Ubuntu is the distro I finally settle mainly because of the APT package system. I do like to use Linux but I don't like to "fix" Linux. Flexibility and customizability of Linux to me is a double edged sword, it is great for enthusiasts, but terrible to people just want to use. Ubuntu is closest I can found (mind you, there is always something better in Linux world)
However, there is one essential thing I really hope can get fixed that is setting the resolution of a monitor. Yes, there are GUI tools for it but they all seem to work only if the auto detection work. For instance, if the monitor is connected through KVM, you are out of luck. You are most likely need to set it manually, and doing so it isn't not nice at all.
For instance, I have recently moved to a newer version of Ubuntu which uses a newer implementation of XOrg. Unfortunately, the changes made in the new XOrg breaks the driver of my old AGP GeForce graphics card. I don't really bother too much about all these 3D thing, but one nice feature of a property GeForce driver is its ability to force a resolution and a refresh rate graphically (okay I am still using a CRT monitor). Without the nVidia driver, I need to do things manually. To make things even more complicate, the old xorg.conf has been demoted in favor of something else (though you can still use it)
Anyway, cutting a long story short, I had tried a few settings combinations and with my limit knowledge and impatience, I gave up after ending up many times in recovery mode (so I can change my xorg.conf settings) I finally gave up on my GeForce 400MX card and replaced it with a Radeon 9600 card. And this time, things is a bit easier. I can use the xrandr to set the resolution and refresh rate using the instructions from this site:
http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html
Except, I put all these commands in a script file, and call this script file within the /etc/gdm/Init/Default
As I said at the beginning, I would prefer this can be done graphically so average users like myself can do simply basic things such as setting resolutions and refresh rate easily without the need of editing setting files with text editors.
However, there is one essential thing I really hope can get fixed that is setting the resolution of a monitor. Yes, there are GUI tools for it but they all seem to work only if the auto detection work. For instance, if the monitor is connected through KVM, you are out of luck. You are most likely need to set it manually, and doing so it isn't not nice at all.
For instance, I have recently moved to a newer version of Ubuntu which uses a newer implementation of XOrg. Unfortunately, the changes made in the new XOrg breaks the driver of my old AGP GeForce graphics card. I don't really bother too much about all these 3D thing, but one nice feature of a property GeForce driver is its ability to force a resolution and a refresh rate graphically (okay I am still using a CRT monitor). Without the nVidia driver, I need to do things manually. To make things even more complicate, the old xorg.conf has been demoted in favor of something else (though you can still use it)
Anyway, cutting a long story short, I had tried a few settings combinations and with my limit knowledge and impatience, I gave up after ending up many times in recovery mode (so I can change my xorg.conf settings) I finally gave up on my GeForce 400MX card and replaced it with a Radeon 9600 card. And this time, things is a bit easier. I can use the xrandr to set the resolution and refresh rate using the instructions from this site:
http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html
Except, I put all these commands in a script file, and call this script file within the /etc/gdm/Init/Default
As I said at the beginning, I would prefer this can be done graphically so average users like myself can do simply basic things such as setting resolutions and refresh rate easily without the need of editing setting files with text editors.
Labels:
/etc/gdm/Init/Default,
refresh rate,
resolution,
ubuntu,
xrandr
Wednesday, September 21, 2011
I was testing my MVC2 application on a new IIS server setup by my colleague. However, when I tried to run it, I got error said it can't locate the file. Then I poked around the server to see if there were any setting mistakes. When I hit the .NET Compilation option on the Site settings, I got an error. After a bit of research on Google, it seems this problem was caused by the order of installation.
It seems if IIS server was installed after the .NET installation, the IIS will not pick up the necessary changes made by .NET Framework installer to run the MVC2. To fix it, you can run the aspnet_regiis tool within the .NET folder (located in %windir%\Microsoft.NET\Framework\v4.0.30319) with the iru option as suggested in Scott Hanselman's blog http://www.hanselman.com/blog/ASPNET4BreakingChangesAndStuffToBeAwareOf.aspx.
In Scott's blog, he suggests to enter the command as
aspnet_regiis -iru
However, on my Windows Server 2008 (NOT R2), I found the -iru didn't work, but /iru works, e.g. aspnet_regiis /iru. Therefore, I would suggest you to try using /iru if -iru did not work for you.
Further references can be found at: http://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=VS.100%29.aspx
It seems if IIS server was installed after the .NET installation, the IIS will not pick up the necessary changes made by .NET Framework installer to run the MVC2. To fix it, you can run the aspnet_regiis tool within the .NET folder (located in %windir%\Microsoft.NET\Framework\v4.0.30319) with the iru option as suggested in Scott Hanselman's blog http://www.hanselman.com/blog/ASPNET4BreakingChangesAndStuffToBeAwareOf.aspx.
In Scott's blog, he suggests to enter the command as
aspnet_regiis -iru
However, on my Windows Server 2008 (NOT R2), I found the -iru didn't work, but /iru works, e.g. aspnet_regiis /iru. Therefore, I would suggest you to try using /iru if -iru did not work for you.
Further references can be found at: http://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=VS.100%29.aspx
Labels:
.net,
aspnet_regiis,
Compilation Error,
IIS,
install after,
mvc2
Subscribe to:
Posts (Atom)