Category: Programming RSS feed for this category
HelloWorld using Maven + Spring
A step by step guide to create a HelloWorld java application using Spring framework.
ASP.net & IIS & Basic Authentication
If you want to specific your asp.net web app to be access from some one, then you could, My assumption, there is an AD for user/password checking, No need setup NTFS security Turn on Basic Authentication in your application setting in IIS manager Modify the web.config to use Windows as the authentication mode <system.web> <authentication mode=”Windows” /> </system.web> Add allowed user or group in .NET authorization rule in your application setting in IIS manager
Running ASP.NET MVC 3 appliction on non MVC reday IIS.
Running ASP.NET MVC 3 appliction on non MVC reday IIS. When you running your MVC app and you got Parser Error Message: Could not load file or assembly ‘System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. Most probably, your IIS server do not have MVC installed. Since MVC is built on top of .NET, so you may install MVC RTM on your server or deploy the necessary assemblies with your application. Reference: Running ASP.NET MVC 3 RC2 on GoDaddy Shared Hosting Basically, in your project references section, set copy local to true
.net MVC with JASIG-CAS
Using official .net Cas client and modify web.config Register casClientConfig Section <configSections> <section name=”casClientConfig” type=”DotNetCasClient.Configuration.CasClientConfiguration, DotNetCasClient”/> <!– Other custom sections here –> </configSections> Place a configuration element directly under the root element. <casClientConfig casServerLoginUrl=”https://server.example.com/cas/login” casServerUrlPrefix=”https://server.example.com/cas/” serverName=”https://client.example.com:8443″ notAuthorizedUrl=”~/NotAuthorized.aspx” cookiesRequiredUrl=”~/CookiesRequired.aspx” redirectAfterValidation=”true” renew=”false” singleSignOut=”true” ticketValidatorName=”Cas20″ serviceTicketManager=”CacheServiceTicketManager” /> Register CasAuthenticationModule with the ASP.NET pipeline by adding it to theandsections as demonstrated in the following configuration blocks. <system.web> <!– Other system.web elements here –> <httpModules> <add name=”DotNetCasClient” type=”DotNetCasClient.CasAuthenticationModule,DotNetCasClient”/> <!– Other modules here –> </httpModules>
Non-root user install perl modules
Finding perl included path perl -e “print qq(@INC)” Extend the library path Use PERL5LIB PERL5LIB=/home/xxx/myperllib:/another/path/lib; export PERL5LIB Use -I parameter > perl -I /home/xxx/myperllib abc.pl Add the path into your script #!/usr/bin/perl use lib “/home/xxx/myperllib”; use MyPerlLibModule; Using local::lib to install perl module without root Get the package perl Makefile.PL –bootstrap make make test make install Setup the environment variable into your shell, you may echo ‘eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)’ >>~/.bashrc Now, you can run perl -MCAPN -eshell to install perl module.