forms-authentication

Winforms client and SSL WCF forms authentication

I am writing a console application to make calls to a wcf service that is hosted in iis and uses FormsAuthentication over SSL in production but not so in dev if possible. I have the following link http://www.zamd.net/2009/03/05/FlowingFormsAuthenticationCookieToWCF.aspx and am looking for both the server and client configs as well as th...

ASP.NET Web Service inside Forms Authentication Application

I have an existing ASP.NET application that implements Forms Authentication site-wide. The application is deployed in multiple instances (e.g., customer1, customer2, test, dev, etc...), with a separate database per instance. SSL is in play. Instance configuration is via an XML config file. I have a new requirement to allow upload/downlo...

Forms authentication for xml files

Hi, I was wondering if you could protect xml files through forms authentication in ASP.NET 3.5. I have some licensekeys that are found online, but you shouldn't be able to download them unless you are logged on. For aspx pages this works automatically but not for xml files. ...

WSS 3.0 on Windows 2003 Server with Forms-Based Authentication 'File not Found' Error

Hi, We have WSS 3.0 running on Windows 2003 Server with Forms-Based Authentication. It has been running for months but now if I now try selecting ‘Register’ or ‘Forgot password’ I now get a ‘File not found’ error (looking for https: //www.....uk/_layouts/useradmin/register.aspx and https: //www.....org.uk/_layouts/useradmin/retrieve-pas...

Forms authentication in ASP.NET 2.0

Hi, I am using Forms authentication in one of my web application. Following are the code i am using in a. Web.config forms loginurl="***" defaulturl="***" b. Login.aspx OnAuthenticate(object sender, AuthenticateEventArgs e) { e. Authenticated = validateuser(Login1.UserName, Login1.Password) if (e.Authenticated =true) { // ...

Authentication through web.config not authenticating in ASP.net 3.5

Hi, This is one of this things that should be extremely simple and I just can't work out why it's not working. I'm trying to set up some very quick authentication for an ASP.net 3.5 app but storing the usernames and passwords in the web.config file (I know it's not very secure but it's an internal app that I keep getting asked to add a...

ASP.NET2.0 FormsAuthentication.RedirectFromLoginPage()

Hi i am using ASP.NET 2.0 form authentication. Also i am using Login Web server control in aspx page. My question is that , Is it necessary to write FormsAuthentication.RedirectFromLoginPage() method when we are using "Login Web server control " because i think it automatically create authentication cookie when we are using login con...

Asp.Net Mvc Can Not Log Out

Here is My Code To Log In var expire = DateTime.Now.AddDays(7); // Create a new ticket used for authentication var ticket = new FormsAuthenticationTicket( 1, // Ticket version username, // Username to be associated with this ticket DateTime.Now, // Date/time issued expire, // Date/time to...

FBA (forms authentication) site - Export to Excel

Office Client Integration features are disabled by design on an FBA site. How would I export a list into Excel programmatically? Pointers appreciated! ...

Storing more information using FormsAuthentication.SetAuthCookie

I am using aspx and c# for a setting a authentication cookie for a login. FormsAuthentication.SetAuthCookie(UserName, True) I want to store more information in the same cookie. Can I add values to this authentication cookie or do I have to use a second http cookie? Basically I'm looking for away to store the User's Id so I may be able ...

How to implement authorization checks in ASP.NET MVC based on Session data?

This will be my first ASP.NET MVC application with forms authentication so I am trying to make sure I don't miss anything. The scenario is this: Public / Secured Areas. Within the private area it is even further limited to specific areas / user. These 'Areas' are defined by customizations to the base area that is customized per user gro...

ASP.NET Page posting back while it should be redirecting

Hi all The first page of our webapplication is a Login-Page. We are using FormsAuthentication. We are not using a database, but multiple Active Directories. So we fill the FormsAuthenticationTicket by ourselfs. This works great for one Active Directory, which is on our own network, but this isn't working for another Active Directory w...

IP check using ASP.NET Forms Authentication

I'm implementing simple authentication on an asp.net web site. Using the basic forms authentication is almost perfect: I set the auth mode to Forms and have a short credentials section in web.config, and use a simple Login aspx page that uses FormsAuthentication.Authenticate() and FormsAuthentication.RedirectFromLoginPage(). However, I...

How do I access additional querystring keys from ReturnUrl

I need to access additional querystring parameters from the ReturnUrl querystring. The entire site requires authentication so all pages will redirect to the login page if the user is not logged in or has timed out. So www.mysite.com/Default.aspx?id=H1234 will redirct to www.mysite.com/login.aspx?ReturnUrl=%2fDefault.aspx%3fid%3dH1234 an...

How to prevent non-local access, using ASP.NET windows forms authentication

I have an application that uses http-calls to local webservices. While the whole application secured by ASP.NET forms authorization, I want a specific folder to be available to local-calls only. How can I do that? Thanks! ...

Can't create custom forms authentication cookie

I'm trying to add custom data to a standard ASP.Net forms authentication ticket as shown in the code sample here. My call to FormsAuthentication.Encrypt always returns null. I've seen people say that it returns null when the userData param to the FormsAuthenticationTicket constructor is null, but my authTicket object looks fine. I'm j...

.net Url rewriting for localization, issues with forms authentication and the loginUrl

I'm using a HttpModule to rewrite the urls on a multi-lingual site. In the HttpModule, I'm adding a handler for the BeginRequest event, and looking for the first part of the path which contains the culture name. For example, /fr-ca/index.aspx will be rewritten to /index.aspx and set the thread's culture and ui culture to 3084. This work...

Forms Authentication Redirect cause Anchor loss

So here is the problem. I use Anchors as a non-refreshing way to allow bookmarking of currently view objects. http://myserver/showobject.aspx#objectid=10 I use this so when updating the object id it doesn't try to do a refresh on the page. Heres the rub. I am using forms Authentication to handle access to these pages. So When you t...

.Net Forms Authentication Cookie Expiration Problem for SSO

Let me describe my setup a little before I get into the problem. I have two web servers (www.mydomain.com and www2.mydomain.com) using Forms Authentication. On each web server I have a main application for authentication and numerous sub-apps. It looks kind of like this: www.mydomain.com |__MainApp (.Net 2.0) |__SubApp1 (.Net 1....

Using authorization in ASP.NET, images not visible on page

I have implemented forms authentication using the below mentioned code. My login URL is "Login.aspx". With these settings my site images do not get loaded on login.aspx. However if I comment the authorization section the images are displayed. <authentication mode="Forms"> <forms name="TBHFORMAUTH" defaultUrl="~/User/Default.aspx" lo...