i develop webpage to get the username and password for user who browse this page the logined user in pc.
ex. i login to my pc with domainwael as username and i have ip when i run this page on my pc inside VS2008 it is ok give me this information but when i published on proudaction server with win 2008 and iis7 64bit it not give me this information
the code that i used for retrive the username and ip is:
i am running windows server 2008 R2 with IIS 7.5 (asp.net 4.0 - integrated pipeline mode) and a web forms application. now i want to work my site with the url routing feature.
i already defined some routes in the global.asax which work perfectly in my local environment with vs2010, but when i run the same things on my webserver i just get 404-errors from the browser.
I have tried to replace Response.AddHeader with Response.AppendHeader, however the result is still the same. Also, I have tried to replace the Response.ContentType with application/octet-stream and image/jpeg, I also faced the same result.
Is there any setting/modification on server/code that I need to look on?
I have an ASP.NET web application that is using forms authentication. Everything is configured and working correctly. However, i'm dealing with the issue of creating and maintaining users and role membership.
I know that I can roll my own solution but I'm wondering if there is an alternative solution?
Does iis7 provide screens for managing forms authentication users? Is there a reliable, free solution that someone would recommend?
I'm using ASP.net 3.5 to run a .exe with Process.Start(). It works fine if I use the host that's built-in to VS2008, WinServer 2003 but if I use IIS7 it no longer runs. I am using the following code.
Process proc = new Process(); proc.StartInfo = psi; proc.StartInfo.FileName = "cmd.exe"; proc.StartInfo.Arguments = args; proc.Start();
Before I get started it's important to note that this issue only happens in IIS7 and IE7, which means it works fine in all our IIS6 environments and Chrome and Firefox hitting IIS7.
We have an ASP.NET 3.5 application that is doing a very basic window.open to open our report server.
Once launched the user is prompted for their username and password. If the user selects cancel and goes back to the parent window they can use all the Ajax functionality just fine; however, if the user logs into report server then all the Ajax functionality on the parent window ceases to work (example error below). We changed the javascript line above to popup a window to google and everything worked fine. We even tried changing it to '_self' to act like a redirect and we had the same results, everything failed. The issue appears to be related to something in IE7 and the authentication popup.
We've already set the application pool hosting the site in IIS7 to classic mode and this did not resolve our problem.
Error:
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by call to Reponse.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error Parsing near ' <!DOCTYPE html PUB'.
I'm using Forms authentication.In Windows Authentication for get the user name of the PC i use: User.Identity.Name
I need this information also in Forms authentication but User.Identity.Name doesn't work.How can I get the User.Identity.Name without using Windows authentication?
I have some issues regarding listing images from inside a directory. What I want to do is to create a Default.aspx page that will search and list the images located inside a folder of my website (where I simply drop them in it). I tried with a treeview, DirectoryInfo and both worked when I compiled my website with visual studio, but when I access them via another computer, I get a 404 for the page. My bet is that iis7 is blocking my code from accessing the folder containing the images. Any idea of how to fix this and make it work ?the code I use to browse in my image folder
string path = AppDomain.CurrentDomain.BaseDirectory; DirectoryInfo diFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"contentmiscimages"); foreach (var f in diFiles.GetFiles("*.jpg")) { Lit.Text += "<a href="" + f + ""rel="lightbox[img]" title=" + f + ">" + f + "</a>" + "<br />"; //I format the image as an url inside a literal }
How to check wether username exist in database or not in my regestration page? and plus i want to implement this feature also...suppose i allowed one user to select username as 'user01' and that user is still completing his form and same time another user tries to check whether 'user01' exist in database or not then i should show user as that 'user01' is not available for him and he should try to select some other username for him...
After a user is authenticated I store their username in session state but if the session times out, I want to create a new session for the user based on their username they authenticated with original. How can I get from Forms Authentication the currently authenticated user?
So I'm almost finished my project but I'm stuck. In my application's database I save some records that contain the currently logged in user's userID - and so when it comes to displaying these records, I've been just been outputting the userID whilst developing the rest of the application. Through googling I've found this line of code that will get the a username based on a userID:
Dim membershipUser As MembershipUser = Membership.GetUser(New Guid(userGUID))
Which works great if I can supply it with a GUID - but I'm struggling to see how I can use this line of code if for example I want to show the usernames for comments on an article which are contained in a repeater control.Maybe it would be simpler to just merge my application's database with the asp.net membership database (ASPNETDB.mdf) so I can just select the username in SQL instead - but I'm not even sure how to do that.
Below is the code of the actual login page I'm looking to modify. I'm wanting to capture the login name/account & ip address and automatically port it out to a spreadsheet. I'm a novice at .asp(x) and am looking at the following code:
I have a page called rateuser.aspx. Basically, this page allows one user (eg. me) to give a feedback on another user (eg: user b). These username should been retrieved when i logged in and when i go to user b's profile page. how do i retrieve these 2 different member id without clashing?Also, when i want to insert the feedback, how do i insert these 2 different id into the rateuser table w/o clashing because my member id is retrieved from the user table.
I had implemented the Forms Authentication for my application and used in-built login control for validating user credentials. I am creating persistant cookie using FormsAuthenticationTicket when the user checks 'Remeber Me' checkbox in login page.
Next time when I browse my application, it directly goes to resource access pages without redirecting to login page. This is the common approach in Forms Authentication with persistant cookie.
My requirement is, Is it possible to get username only in login page when using persistant cookie with Forms Authentication without redirecting into resource pages?
The same can achieve using cookies without using forms authentication. I need get the username automatically in login page using Form Authentication.
I want to create a login page in asp .net .... The username and password are same as my gmail account username and password. When I enter the username and password it go to gmail server and check the username and password are available or not available means redirect a new page
I have created a page that pulls some data from a database based on a query string parameter.This works fine.
Then I added some site login, created roles and configured access to folders. I then restricted access to that page in a secure members folder using securityTrimmingEnabled="true" in the site map configuration.
I'm sure this is very simple but what I'd like to do now is use the login user name as my query parameter. I've been going round in circles trying to add it in the Page_Load event but not having any joy.
how to check if a particular data in the database already, for example, i want to check if a username already exist in database, then the user cant choose that username.
I'm currently doing sign up page where customer can sign up to use my website.however, when they type username, they will prompt that username is taken.how to check in database if the username is already been taken? i got 2 sign up page. 1st page is where the customer type their username, and password.2nd page is where they type thier personal particulars and then it will store in database..