Tuesday, 13 October 2009

"Access is Denied" when working with Process + ASP.NET





  1. Open Control Panel
  2. Open Services
  3. Find IIS Admin Service and right click Properties
  4. Go to Log On Tab
  5. Check "Allow service to interact with desktop"
  6. Click OK
  7. Restart the service(right click, restart)



The solution I found from Microsoft Support here.


Tuesday, 29 September 2009

取消煩人的 使用者帳戶控制(User Account Control)

控制台 -> 使用者帳戶 -> 關閉UAC

Control Panel -> User Accounts -> Turn User Account Control on or off

Wednesday, 19 August 2009

Silverlight code running order

  1. App.xaml.cs - > Application_Startup
  2. MainPage.xaml.cs -> Mainpage()
  3. Page_loaded event if registered




Thursday, 13 August 2009

Developing Flowplayer Flash Plugin environment setup guide

  1. Download JAVA SE , Flex SDK, and ANT if you don't have
    ANT downloaded filename: apache-ant-1.7.1-bin.zip
    Flex SDK downloaded filename: flex_sdk_3.zip
    JAVA SE downloaded filename: jdk-6u16-windows


    Environment Variable:
    JAVA_HOME : C:\Program Files \Java\jdk1.6.0_15
    Path : C:\apache-ant\bin;C:\Program Files (x86)\Java\jdk1.6.0_15\bin
    The folder path is differ depends on your own preference. The above is just my setup

    To check if it's installed, go to Command Prompt and then enter texts like image shown.


    Subversion is needed if you want to get the latest source code from Flowplayer's server.
    Click here to download.(setup the bin folder in Path as well (ex.C:\svn-win32-1.6.3\bin))

  2. To be continued

Saturday, 25 July 2009

ASP.NET IIS Firefox authentication required problem



Today, I had problem with running my asp.net project while using Firefox. It asked me to enter username and password to see the page. However, I tried all the passwords and none of them worked. This problem never occurred before, so I googled and finally found the solution.

  1. Enter about:config at firefox address bar. (You will see warning message indicating that these are advanced settings that may affect the browser security and stability)
  2. Click "I'll be care, I promise" button
  3. Search network.automatic-ntlm-auth.trusted-uris at filter. (Only one entry will be appear)
  4. Double click the entry and type localhost.
  5. Save it and reload your web page then DONE!
Here's the original link from ASP.net forum.



Friday, 24 July 2009

Accessing Posted Data in ASP.NET

There are two ways to access data using Page.PreviousPage in asp.net

1. Using FindControl function

string username = ((TextBox)PreviousPage.FindControl("tbxUsername")).Text;

2. Using Strongly Typed Data
I personally like this one because I don't care about what the control name is. Also, no typo mistakes will be made.
Here is how to make a strongly typed data

public string UserName
{
get{return tbxUsername.Text;}
}

Also we have to set the code below at the page that receives the posted data.

<%@ PreviousPageType VirtualPath="~/pageName.aspx" %>


Last step, you have to rebuild in order for page to see the property in receiver page.



Wednesday, 22 July 2009

ASP.NET CustomValidator with Javascript

To use CustomValidator with client side javascript validation, we need to implement a javascript with two parameters.


function YourFunctionName(source, arguments)



Set property ClientValidationFunction to the name of your javascript at CustomValidator control.

arguments.Value is the data that we will be validated.

arguments.IsValid indicates validation success or failure.

If the validation is passed, we set arguments.IsValid = true. False otherwise.