.net - Forms Authentication Fails To Recognize As Logged In Under IE?
Jun 29, 2010
In my asp.net webforms application I am using plain and simple forms authentication hooked up into my database (with the standard membership provider). Everything works well, I can log in , log out, get roles, etc...However, after deploying my site to the intranet IIS server I noticed that IE cannot be authenticated. The actual authentication process for logging in works (as it does tell you when your password/username is wrong) but after authentication completes it claims you aren't logged in.
This is only on my deployed IIS environment as locally while in my VS environment everything works just fine in IE. While in the deployed IIS chrome and Firefox work just fine.The only thing I can tell is it looks like IE isn't getting or saving the authentication cookie. This is not IE setting related as I have my IE8 set to accept all cookies, and I tested on a coworker's IE8 machine and another's IE7 with the same results. My web.config is using the following settings:
<authentication mode="Forms" >
<forms cookieless="UseCookies" />
</authentication>
where I would look to begin debugging this issue?
Edit: I have been forced to fix this issue now, since my webserver is not working well with URL authentication.I have used fiddler and figured out that IIS7 is not sending any cookies to me when I am in IE. No cookies are in the headers. The cookies are correctly in the headers when serving the site to Mozilla and Chrome browsers though. I am at a loss as to why.....
Edit2: As a side note, when I log into the web server directly, if I go to Http://localhost/ IIS sends IE the cookies fine, but if I go to http://qa_build/ (that's the computer name for the server) IIS won't send the cookies to IE.
View 2 Replies
Similar Messages:
Mar 29, 2011
I have a web application (intranet based) which uses Windows Authentication. Unfortunately there are public computers that have public logins at some company locations. My web app doesn't support these public logins because I need to know the user workingSo, even though these public users are windows authentication users, my app will fail because I have no user account setup for that particular account. I want to then try Active Directory Authentication.In my Default.aspx.cs I'd have something like this
protected void Page_Load(object sender, EventArgs e)
{try
userContext = new UserContext(); // If the authenticated user isn't a user in my system then throw an exception
}
[code]...
View 2 Replies
Sep 30, 2010
i'm using forms based authentication within my aspnet (c#) website. At the log in page i'm capturing username, password and email. the email addressed is stored within the membership table. now on a new page, i'd just like to display the users' email address so they update it as well as another boolean field. i've tried using a gridview but i can't figure out how to modify the query so it only reveals the current logged in user.
View 1 Replies
Jun 16, 2010
For some reason my users are logged out of the system every 10-15 minutes or so...regardless of the configuration below....am I missing something?
[code]....
View 1 Replies
Dec 18, 2010
we are migrating existing windows form application to asp.net(3.5) intranet portal, there is a requirement whereby database connection should be made by the logged in windows user. Is it possible to achieve this functionality?
View 1 Replies
Aug 12, 2010
we would like to redirect the user to a given page if the authentication to our SharePoint site fails (i.e. the standard windows login prompt pops up three times - we are using windows authentication). No matter what option we try it always ends up bringing the user back to a blank page.
We have tried writing a HttpModule (and catch the if Response.StatusCode = 401), which doesn't seem to fire any events if the user is not authenticated. We have tried writing a HttpHandler, but of course we can redirect the user if there is an error code but can't continue onto the desired site if not. We have tried doing the following in the web.config:
<customErrors mode="Off">
<error statusCode="401" redirect="http://social.msdn.microsoft.com"/>
</customErrors>
Which doesn't work, again taking us to a blank page.
View 3 Replies
Dec 16, 2010
I am in the process of designing application in case user authentication if failed i need to redirect to default page (NT Authentication). Is there any way you can redirect the user on IIS if the user is fail go through the NT authenticaiton at IIS level.Options 1 : Always land the user to defalut page and validate there and redirect to site based on the access give the directory level access. I am looking if there any options to let the user to default page in case user access is denied.
View 4 Replies
Sep 29, 2010
When a user log into my asp.net site I use the following code:
FormsAuthentication.RedirectFromLoginPage(userid, false);
As I often need to use the userid I can then later get the userid by:
string userid = System.Web.HttpContext.Current.User.Identity.Name;
Now I also want to show the logged in username on each page and my questions is therefore where do I place the username best if I need to use it on every page. User.Identity.Name is already taken by the userid so I can't use that one. Another solution would be to get the username from the database on each page, but that seems like a bad solution.
View 4 Replies
Jan 26, 2010
I created a mixed mode authentication mechanism based on a few of the articles that I have read on this topic. It's similar to something like this: [URL]
Basically, there are two web applications. One accepts the Windows Auth and one accepts Forms Auth. The Windows Auth then creates a forms auth ticket and passes control to the Forms auth application. This solution works fine when both applications are housed within the same IIS web site.
Now, order to control the security of this solution we set up multiple IIS web sites on the same machine. Web Site 1 serves external traffic (forms auth) and Web Site 2 serves internal traffic (windows auth).
So the design is that an internal user can hit the site using Windows auth via a internal name (myserver) while the external users use Forms Auth hitting [URL].
All that said, the solution works when the two applications are in the same site. Doesn't work when they are in different sites.
View 4 Replies
Mar 21, 2011
While running an app from the server where it is deployed the website works fine, however when trying to access it from a different machine(placed in same network), using the same credentials, it shows that I am not an authenticated user.
[code]....
View 13 Replies
Oct 5, 2010
I am trying to implement a simple role based authorization using forms authentication in ASP.net. It works perfectly fine in my local system but fails when I deploy in production (shared hosting). Whenever I try to log in, rather than taking me to the default page in specified directory it throws me back to the login page. I suspect that there is some issues with the configuration but not sure where the problem is. The code is provided below:
Web.config (root):
[Code]....
Web.config (Member directory):
[Code]....
Login.aspx:
[Code]....
Global.asax:
[Code]....
Works fine in local machine but shared hosting is not taking the authenticated user to the pages inside the secured folders. What can be the issue?
View 1 Replies
May 5, 2010
I'm using VS 2010 RTM and SQL Server 2008 on my clean development laptop, running Windows 7 Pro.
Using Visual Studio's Server Explorer, I can easily do an Add Connection by simply right-clicking, and then completing the dialog, and choosing "Use Windows Authentication". I can then click the button "Test Connection".
However, if I wish to do an Add Connection, and then choose "Use SQL Server Authentication", I get a message "Login failed for user 'appSlir'", as shown here:
When I try the same thing on my other development machine, which is VS 2008, SQL Server 2008, and Windows XP Pro, it works fine.
There seems to be a problem/bug that prevents Add Connection with "Use SQL Server Authentication" to SQL Server 2008, when running on Windows 7 Pro.
View 5 Replies
Aug 16, 2010
One of our client uses squid proxy and tries to connect to our asmx web service(which is deployed on our server over internet) via our windows application. But windows application fails to connect to our web service and gives below error.."This method call needs the custom bla bla.. " Soap ExceptionProxy (squid) shows this error:127.0.0.1 - - [10/Aug/2010:14:35:55 +0300] "POST http://abc:83/service.asmx HTTP/1.1" 500 759 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4927)" TCP_MISS DIRECTWe have used soap header security and we are also passing soap header credential while calling the service. Application runs well at our end but can anybody guid me, what could be the problem ?
View 4 Replies
Oct 18, 2010
Just to describe the scenario. I have a website. This lives on a webserver. On that webserver is an SQL server. The website connects to this database using windows authentication. I have written a windows form application that connects to the SQL Server on the webserver. This application is being run from a location on out intranet. The Winform application use SQL authentication to connect to the database. The SQL Server didn't have mix mode authentication enabled. So I enabled it. The winform application could now connect to the SQL Server.
This is where it starts getting a little strange.
The Website that was already connecting find using integrated authentication starts failing with:
Login failed for user 'NT AUTHORITYNETWORK SERVICE'
When you are enabling mixed mode authentication, you are adding another authentication method, why would the original Windows authentication fail?
View 1 Replies
Oct 19, 2010
I am having an issue, with the membership and form authentication. I am having a problem where when an logged in user types a url they can see the content of pages they're not suppose to. When the user tries to click on the screen or any ajax fires they are redirected to the main page. What is going on? I have all the items setup in the webconfig properly just wondering what is happening. Also I don't want to use a redirect solution for each page since that is what I thought webconfig was setup for.
View 1 Replies
Oct 6, 2010
To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.
As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.
I pasted in the code using the text only option becuase the format was getting messed up. I probably need more background on why the fields are blanking out.
[code]....
View 8 Replies
Mar 17, 2011
We are using membership provider for LDAP authentication. It is working as it should.
But what all configuration settings I have to do so that
all the future requests to this application run under the security context of the Logged in user account not through the some default user set in IIS.
We need to have this working because all the permissions on the database are based on the logged in user.
We are using form authentication for LDAP authentication. And having impersonation = true in web.config.
View 1 Replies
Jul 23, 2010
I need to recognize the url from my Personalized plugin. Based on that for specialized url I need to fetch the credential from my database.
Is it possible to recognize the url from my plugin.
View 1 Replies
Jan 7, 2010
i build a web application in C# and asp.net. my question is if i opennig a few windows, how can i know wich windows is active, i mean wich windows is in the front right now?
View 4 Replies
May 28, 2010
I have created profile objects in my web.config file:
[Code]....
[Code]....
In all tutorials I am finding on the net it says in order to read/write from these properties I just need to use the syntax with C#:
Profile.Surname = "Surname";
But this does not work on my web site code when I'm using C# it underlines and recommends I change to System.Web.Profile.Surname (which I do) but then Intellisense and the compiler do not recognise Surname. What am I doing wrong? I am using Visual Studio 2010 and .Net V4.
View 5 Replies
Jan 13, 2010
I added some javascript to fill in a dropdown and it works wonderfully. However, when I try to access the value in codebehind to submit the data, the value shows as null. (string strValue = ddlName.SelectedValue;).
[Code]....
View 3 Replies
Aug 30, 2010
I tried this code snippet from ASP. NET 3.5 Unleashed with Visual Studio 2010, I got it built succesfully, but whenever I run it, I got comipler errors:
Compilation Error Description:
An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.webform1_aspx' does not contain a definition for 'answerCustomValidator_ServerValidate' and no extension method 'answerCustomValidator_ServerValidate' accepting a first argument of type 'ASP.webform1_aspx' could be found (are you missing a using directive or an assembly reference?)
Source Error:
[Code]....
Source File: c:Visual Studio 2010 ASP.NET ProjectsWebApplicationThreeWebApplicationThreeWebForm1.aspx Line: 28
Show Detailed Compiler Output:
View 3 Replies
Sep 17, 2010
Just going to start making a web application and was wondering which was better, or at least what are the main differences between them (as it probably matters what I am using them for)?
View 3 Replies
Apr 15, 2010
'm using the AutoCompleteExtender from the AJAX control toolkit on my aspx page - I have it wired up to a WCF service that is returning a string array and everything works happily.
If I change my service definition to include a demand for the caller to be authenticated, like so:
<OperationContract(), PrincipalPermission(SecurityAction.Demand, Authenticated:=True)> _Public Function GetLookupValues(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As String()
Then the autocomplete extender stops working, and I get an authentication error in the service. The service is set up to use ASPNetCompatibility mode, and I was hoping that the extender would pass the authentication credentials for my logged in user - does anyone know how to make this work?
View 2 Replies
Sep 3, 2010
What do I need to do in order to change an application from Forms Authentication to windows authentication?
View 2 Replies