Archive for the 'ASP.Net' Category

FormsAuthentication.Encrypt(ticket) returns null

Friday, December 5th, 2008

I’ve done a sample today and I need to create FormsAuthenticationTicket manually in order to make it inexpiable. I create specifying null for user data in the constructor.

1: FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, FormsAuthentication.FormsCookieName,
2: DateTime.Now, expiredTime, persist, null, FormsAuthentication.FormsCookiePath);
3: 
[...]

Access an web service from web application with different default credentials

Wednesday, December 3rd, 2008

Today, a developer from the team asked me how to access a web service in our domain with user default credentials but for different user that those in WindowsIdentity.GetCurrent().
Let’s say that there is a web site that is configured to use Windows authentication in ISS and in the web configuration file we have Windows authentication [...]

My attempt to use Composite Web Application Block with ASP.Net MVC Application

Thursday, November 20th, 2008

Let’s say that there is an application written in ASP.Net MVC and that there is a  need to make it composite. I’ve searched the Interenet and I didn’t find so much about how to do it. For sure using Web Client Software Factory (WCSF) it can be done but it is not suitable for my [...]