Re: [Mono-list] ASP.NET Forms Authentication

2008-03-29 Thread Kevin Berry
Here's my original issue... It was with forms authentication but I  
tried it with basic auth too.  Maybe the ? vs * is throwing mono...  
I'll try that when I'm back on my laptop...

Sent from my iPhone

On Mar 11, 2008, at 9:55 AM, Kevin Berry [EMAIL PROTECTED] wrote:

 I haven't seen any replies on this yet.  Is anyone using forms  
 authentication in this way?

 On Mar 7, 2008, at 11:06 PM, Kevin Berry [EMAIL PROTECTED] wrote:

 I can't get forms authentication to work under XSP
 2.0.  I'm using the following code in my login button
 click event handler if the login entered is correct:

 FormsAuthentication.Initialize();
 String strRole = assignRoles(loginTextBox.Text);

 //The AddMinutes determines how long the user will be
 logged in after leaving
 //the site if he doesn't log off.
 FormsAuthenticationTicket fat = new
 FormsAuthenticationTicket(1, loginTextBox.Text,
 DateTime.Now, DateTime.Now.AddMinutes(30), false,
 strRole, FormsAuthentication.FormsCookiePath);

 Response.Cookies.Add(new
 HttpCookie(FormsAuthentication.FormsCookieName,
 FormsAuthentication.Encrypt(fat)));

 Response.Redirect(FormsAuthentication.GetRedirectUrl 
 (loginTextBox.Text,
 false));

 In the Web.config file I have:
 location path=Protected
 system.web
   authorization
 allow roles=admin/
 allow roles=stduser/
 deny users=*/
   /authorization
 /system.web
 /location

 authentication mode=Forms
 forms name=login
loginUrl=LoginPage.aspx
defaultUrl=Default.aspx
protection=All
timeout=30
path=/
requireSSL=false
slidingExpiration=true
cookieless=UseDeviceProfile
domain=
enableCrossAppRedirects=false/
 /authentication

 authorization
 allow users=*/
 /authorization

 This works with VS 2005 and the ASP.NET web dev
 server.  Why doesn't this work with Mono's XSP 2.0 web
 server?  Is there something I can change to make sure
 this works?

 NOTE: I'm using Mono 1.2.6 under Windows Vista x64 but
 plan to move this to a Linux Apache web server once I
 have it working on Windows.  Surely this doesn't make
 any difference though...

 Thanks,
 Kevin.



  
 
 

 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



   
 
 

 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ASP.NET Forms Authentication

2008-03-29 Thread Kevin Berry
Sending this again because it failed the first time...

Sent from my iPhone

On Mar 29, 2008, at 2:07 PM, Kevin Berry [EMAIL PROTECTED] wrote:

Here's my original issue... It was with forms authentication but I tried it 
with basic auth too.  Maybe the ? vs * is throwing mono... I'll try that when 
I'm back on my laptop...

Sent from my iPhone

On Mar 11, 2008, at 9:55 AM, Kevin Berry [EMAIL PROTECTED] wrote:

I haven't seen any replies on this yet.  Is anyone using forms authentication 
in this way?

On Mar 7, 2008, at 11:06 PM, Kevin Berry [EMAIL PROTECTED] wrote:

I can't get forms authentication to work under XSP
2.0.  I'm using the following code in my login button
click event handler if the login entered is correct:

FormsAuthentication.Initialize();
String strRole = assignRoles(loginTextBox.Text);

//The AddMinutes determines how long the user will be
logged in after leaving
//the site if he doesn't log off.
FormsAuthenticationTicket fat = new
FormsAuthenticationTicket(1, loginTextBox.Text,
DateTime.Now, DateTime.Now.AddMinutes(30), false,
strRole, FormsAuthentication.FormsCookiePath);

Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(fat)));

Response.Redirect(FormsAuthentication.GetRedirectUrl(loginTextBox.Text,
false));

In the Web.config file I have:
location path=Protected
system.web
 authorization
   allow roles=admin/
   allow roles=stduser/
   deny users=*/
 /authorization
/system.web
/location

authentication mode=Forms
forms name=login
  loginUrl=LoginPage.aspx
  defaultUrl=Default.aspx
  protection=All
  timeout=30
  path=/
  requireSSL=false
  slidingExpiration=true
  cookieless=UseDeviceProfile
  domain=
  enableCrossAppRedirects=false/
/authentication

authorization
allow users=*/
/authorization

This works with VS 2005 and the ASP.NET web dev
server.  Why doesn't this work with Mono's XSP 2.0 web
server?  Is there something I can change to make sure
this works?

NOTE: I'm using Mono 1.2.6 under Windows Vista x64 but
plan to move this to a Linux Apache web server once I
have it working on Windows.  Surely this doesn't make
any difference though...

Thanks,
Kevin.



   


Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list






Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




  

OMG, Sweet deal for Yahoo! users/friends:Get A Month of Blockbuster Total 
Access, No Cost. W00t 
http://tc.deals.yahoo.com/tc/blockbuster/text2.com
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ASP.NET Forms Authentication

2008-03-11 Thread Kevin Berry
I haven't seen any replies on this yet.  Is anyone using forms authentication 
in this way?

On Mar 7, 2008, at 11:06 PM, Kevin Berry [EMAIL PROTECTED] wrote:

I can't get forms authentication to work under XSP
2.0.  I'm using the following code in my login button
click event handler if the login entered is correct:

FormsAuthentication.Initialize();
String strRole = assignRoles(loginTextBox.Text);

//The AddMinutes determines how long the user will be
logged in after leaving
//the site if he doesn't log off.
FormsAuthenticationTicket fat = new
FormsAuthenticationTicket(1, loginTextBox.Text,
DateTime.Now, DateTime.Now.AddMinutes(30), false,
strRole, FormsAuthentication.FormsCookiePath);

Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(fat)));

Response.Redirect(FormsAuthentication.GetRedirectUrl(loginTextBox.Text,
false));

In the Web.config file I have:
location path=Protected
 system.web
   authorization
 allow roles=admin/
 allow roles=stduser/
 deny users=*/
   /authorization
 /system.web
/location

authentication mode=Forms
 forms name=login 
loginUrl=LoginPage.aspx 
defaultUrl=Default.aspx 
protection=All 
timeout=30 
path=/ 
requireSSL=false 
slidingExpiration=true 
cookieless=UseDeviceProfile 
domain= 
enableCrossAppRedirects=false/
/authentication

authorization
 allow users=*/
/authorization

This works with VS 2005 and the ASP.NET web dev
server.  Why doesn't this work with Mono's XSP 2.0 web
server?  Is there something I can change to make sure
this works?

NOTE: I'm using Mono 1.2.6 under Windows Vista x64 but
plan to move this to a Linux Apache web server once I
have it working on Windows.  Surely this doesn't make
any difference though...

Thanks,
Kevin.



 

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] ASP.NET Forms Authentication

2008-03-07 Thread Kevin Berry
I can't get forms authentication to work under XSP
2.0.  I'm using the following code in my login button
click event handler if the login entered is correct:

FormsAuthentication.Initialize();
String strRole = assignRoles(loginTextBox.Text);

//The AddMinutes determines how long the user will be
logged in after leaving
//the site if he doesn't log off.
FormsAuthenticationTicket fat = new
FormsAuthenticationTicket(1, loginTextBox.Text,
DateTime.Now, DateTime.Now.AddMinutes(30), false,
strRole, FormsAuthentication.FormsCookiePath);

Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(fat)));

Response.Redirect(FormsAuthentication.GetRedirectUrl(loginTextBox.Text,
false));

In the Web.config file I have:
location path=Protected
  system.web
authorization
  allow roles=admin/
  allow roles=stduser/
  deny users=*/
/authorization
  /system.web
/location

authentication mode=Forms
  forms name=login 
 loginUrl=LoginPage.aspx 
 defaultUrl=Default.aspx 
 protection=All 
 timeout=30 
 path=/ 
 requireSSL=false 
 slidingExpiration=true 
 cookieless=UseDeviceProfile 
 domain= 
 enableCrossAppRedirects=false/
/authentication

authorization
  allow users=*/
/authorization

This works with VS 2005 and the ASP.NET web dev
server.  Why doesn't this work with Mono's XSP 2.0 web
server?  Is there something I can change to make sure
this works?

NOTE: I'm using Mono 1.2.6 under Windows Vista x64 but
plan to move this to a Linux Apache web server once I
have it working on Windows.  Surely this doesn't make
any difference though...

Thanks,
Kevin.



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Using BasicAuthenticationModule

2008-01-26 Thread Kevin Berry
Is nobody doing this?  I haven't received any replies
yet.  Is anybody using authentication of any kind
(that isn't the built-in Apache authentication)?

In any case, I've managed to now get this working with
Apache's basic auth module but this isn't great
because I now have to maintain two password lists- one
for Apache and one for my app.  That really sucks.

As an alternative, I'd like to find out who updated
this web page last so I can e-mail them about this:
http://www.mono-project.com/ASP.NET_Modules

Does anyone know how I can find that out?

Thanks,
Kevin.

--- Kevin Berry [EMAIL PROTECTED] wrote:

 I'm trying to use BasicAuthenticationModule and I
 haven't managed to get it to do anything.  It just
 seems to ignore the web.config file I've created
 below.  I created a test.html file in the root
 folder
 (where the web.config file is located) and launched
 xsp in that same folder.  I'm expecting it to prompt
 the user for a login and password but nothing
 happens.
 
 I've also tried mod_mono as well without success. 
 The
 module I'm using is documented at this URL:
 
 http://www.mono-project.com/ASP.NET_Modules
 
 The web.config file I'm using is similar to the one
 below:
 
 ?xml version=1.0?
 configuration
   appSettings
 add key=Basic.Users
  value=/MySite/MySite_Priv/testusers.xml
 /
 add key=Basic.Realm value=My Realm /
   /appSettings
   connectionStrings/
   system.web
 compilation debug=true/
 httpModules
   add name=BasicAuthenticationModule
 type=Mono.Http.Modules.BasicAuthenticationModule, 
 Mono.Http, Version=1.0.5000.0,
 PublicKeyToken=0738eb9f132ed756 /
 /httpModules
   /system.web
 /configuration
 
 Is there any way I can troubleshoot whether these
 settings are even being used by XSP?  It seems to me
 that they're simply being ignored.
 
 Thanks,
 Kevin.
 
 
  


 Looking for last minute shopping deals?  
 Find them fast with Yahoo! Search. 

http://tools.search.yahoo.com/newsearch/category.php?category=shopping
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
 



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Using BasicAuthenticationModule

2008-01-21 Thread Kevin Berry
I'm trying to use BasicAuthenticationModule and I
haven't managed to get it to do anything.  It just
seems to ignore the web.config file I've created
below.  I created a test.html file in the root folder
(where the web.config file is located) and launched
xsp in that same folder.  I'm expecting it to prompt
the user for a login and password but nothing happens.

I've also tried mod_mono as well without success.  The
module I'm using is documented at this URL:

http://www.mono-project.com/ASP.NET_Modules

The web.config file I'm using is similar to the one
below:

?xml version=1.0?
configuration
  appSettings
add key=Basic.Users
 value=/MySite/MySite_Priv/testusers.xml /
add key=Basic.Realm value=My Realm /
  /appSettings
  connectionStrings/
  system.web
compilation debug=true/
httpModules
  add name=BasicAuthenticationModule
type=Mono.Http.Modules.BasicAuthenticationModule, 
Mono.Http, Version=1.0.5000.0,
PublicKeyToken=0738eb9f132ed756 /
/httpModules
  /system.web
/configuration

Is there any way I can troubleshoot whether these
settings are even being used by XSP?  It seems to me
that they're simply being ignored.

Thanks,
Kevin.


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Bug in DateTime Parsing

2004-05-22 Thread Kevin Berry
Hi,

Found another discrepancy between .NET and mono...

The code below produces different results under
Windows XP with .NET vs Linux with Mono.  Is this
intended?  Note: The hours are out by the time zone
adjustment.  So it's like Mono assumes the time is GMT
while .NET assumes the time is relative to the
system's time zone.  Is there anyway to work around
this easily?

%@ Page Language=C# %
html
body
Expecting hour to be 19...  It's actually...
%
  DateTime date = DateTime.Parse(2002-12-16
19:20:00);
%
%= date.Hour %
/body
/html

Thanks,
Kevin.





__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] C# Patterns Web Site

2004-05-21 Thread Kevin Berry
Since C# is now popular on Linux ;-) it is a bit
irritating when you encounter a site like this...

http://www.dofactory.com/Patterns/PatternCommand.aspx

The Show Code link doesn't expand when used with
Mozilla.  Obviously if you're using Linux it is a bit
of a problem to just go into IE and browse it. ;-)

I've submitted my comments via their contact page. 
Could someone else also do the same.  Maybe if enough
people complain they'll do something about this.

Thanks,
Kevin.





__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Can't Get XSP To Work

2003-01-24 Thread Kevin Berry
I've compiled and installed xsp but I'm getting errors
when I try to use it.

I am able to compile the a HelloWorld type app (the
sample in the beginning docs) using Mono so I know
that the mcs compiler works (and the exe runs).

I type mono server.exe in the server/test folder. 
No errors and it reports that it is listening on port
8080.

I then try and access it using Mozilla
(http://devbox:8080/;).  I wait a bit and after a few
seconds I get the following in the browser:

Error

System.Web.HttpException: File
'/home/kevin/inst/xsp/xsp-0.2/server/test/' does not
exist
in 0x000e4 00
System.Web.StaticFileHandler:ProcessRequest
(System.Web.HttpContext)
in 0x001b6 00 .ExecuteHandlerState:Execute ()
in 0x0005e 00 .StateMachine:ExecuteState
(IStateHandler,bool)

In the terminal window I see that xsp has displayed:

GC Warning: Finalization cycle involving 81c310
GC Warning: Finalization cycle involving 81c310
GC Warning: Finalization cycle involving 81c310
GC Warning: Finalization cycle involving 81c310
context.Error: System.Web.HttpException: File
'/home/kevin/inst/xsp/xsp-0.2/server/test/' does not
exist
in 0x000e4 00
System.Web.StaticFileHandler:ProcessRequest
(System.Web.HttpContext)
in 0x001b6 00 .ExecutingHandlerState:Execute ()
in 0x0005e 00 .StateMachine:ExecuteState
(IStateHandler,bool)

What could be causing this?

BTW, I've also tried to get mod_haydn working and I
could get that to work either.  It was complaining
about different versions of corlib or something like
that.  However, I'd only installed one version of mono
at the time.

Thanks,
Kevin.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list