Detecting Which User Is Viewing The Page?

Jul 20, 2010

I wondered if there were any 'tricks of the trade' to try and determine the user looking at a specific page. The server which currently hosts our Intranet is configured to use anonymous authentication so most of the usual methods return the account running IIS. I also have the same issue when trying to read the registry using some VB code.

I did get around this by using some VBScript to read the registry and get the username, but I seem to be unable to use this to determine if a column in a GridView should be visible or not. I have a stand-alone page and wondered if this was possible?

View 1 Replies


Similar Messages:

Detecting If User Closes The Page?

Jun 7, 2010

Is there a way to detect if the user closes the browser/popup page? I am trying to implement a chat functionality by when the user closes the browser/page, I will update the flag in the database from active to not active. But I cannot seem to find a better way to handle that besides from detecting if the user closes the page.

View 13 Replies

How To Check On A Certain Page If The User Is Viewing That Page Via Ssl

Jul 15, 2010

I'm a bit confused. Using asp.net VB 2010 - how can i make it when someone types mydomainname.com it automatically pushes the site to www.mydomainname.com? I am using a hosted server so I dont have access to the IIS.

Also, how can i check on a certain page if the user is viewing that page via ssl? ex: send [URL]

View 5 Replies

Restricting Certain Pages -- Redirect On Every Page? Or On Master Page By Viewing Current Page In Url?

Feb 6, 2011

Per different user mode, some pages should not be accessible by users unless they have a valid session key.In your opinions -- would it be better to have a list of acceptable pages in the master page, and check if the current page is valid for the current user? Or handle this on every child page?I'm thinking master page, just want to hear what your input would be.

View 2 Replies

Web Forms :: Scroll Bar Disabled When Viewing Page Linked To Master Page?

Apr 26, 2010

I have a project that is based on a Master Page. I also have user controls that I use as well. Any page that requires scrolling in Design Mode will not scroll. The scroll bar is disabled. I have to switch to Source Mode and then add the text that I need or find the controls that need modified or updated. I have user controls that require scrolling as well but they work just fine. Only the pages tied to the master page. This is very annoying and only happens on certain projects.

View 2 Replies

Can Develop Visual Studio Extension For Viewing Web User Control In Temp Webpage

Jul 14, 2010

I work now in a huge project that we build all interface as Web User Controls .. every time I want to view & test one i should add it in web page and then view .. I think in a way to develop a visual studio extension that show "View in Temp Web Page" when I make right click on a user control to allow me view user control in a generated temp web page without needing to add it in a test page each time i want to test but i don't know is there any way to achieve that ... Is it possible to develop such a thing ?

View 1 Replies

Viewing 'hello World' Page From Remote Computer?

Mar 28, 2011

I've been a VB programmer for years, and friend asked me to write a program that does data storage and is executable from PC & MAC browsers. It seems like I need ASP.NET for this, so I tried to write a server-side 'hello world' ASP.NET program. I did this using VWD 2010 Express, and after successfully 'building' the website, it works great if I view it on the development machine. But when I copy it to my web server (running on a Windows XP Tablet machine) and try to view default.aspx, instead of getting a nicely-formatted page, my browser (IE8) is displaying the HTML source code. I tried hosting the site on both Apache and IIS , and I'm getting the same results.

1. What am I doing wrong?

2. Is ASP.NET the best platform for building a database-based application that can be viewed from both PC's and Macs? If so, should this work from iPads / Safari as well?

View 4 Replies

Prompts For Windows Authentication When Viewing A Page In Website?

Jun 17, 2010

When i try to view a PARTICULAR page in my web site, it prompts for user name and password. Irrespective of providing proper user name/password and clicking OK or directly clicking Cancel button, the page is getting loaded properly. I am not sure why the authentication screen appears!!! It happens only for that particular page. Initially I thought it could be with file permission but copy pasted another page (which works fine) and renaming it doesn't solve the problem.

EDIT

I copied the source from the browser for that particular page and saved it as HTML. When i try to open the HTML file, it prompts for authentication.

Solution

I disabled the Integrated Windows Authentication in IIS and it works fine.

View 2 Replies

VS 2008 - Viewing ASPX Page In IFrame With IE Fails

Oct 31, 2011

A client of ours uses a home owners association website as a service. They can add pages to the site. We added a page and used an iframe in the html code to display another website which is needed. It works fine in all browsers except some copies of Internet Explorer. For example, it does not work at my home IE8 but may for others.

But here is where it gets wierd! When I try to view it in IE, it fails by just keep trying and eventually fails. Then if I past the URL it is trying in the browser by itself, it loads. Then I go back to the association website and try and it will work by loading the website in the iframe page. It does this only after I view the website url by itself in the browser.

View 3 Replies

Access :: Viewing Database Using Template / Activity Id Changes But The Page Content Does Not?

Jan 22, 2011

I am running a Access Database and I have a Intranet site, Administrators can post News to a table in the Access database and Intranet users can see the news when they go to the Intranet site.

Any important/companie news is posted to the Front page and the user can access the news vie a link.

BUT;

if there are more than one post when the user clicks on the link they can only read the first post.

When they click on the 2nd link the first post opens but the Activity ID from my table in access changes!

The Activity Id changes but the page content does not, I am using form view on the Activitydetails2.aspx to view the news table

View 3 Replies

Prevent Viewing A Restricted Page On Pressing Back/forward Button?

Jan 21, 2011

I am trying to implement Login/Logout functionality in my website without using inbuilt functionality of Login controls in ASP.NET. In some pages, which require the user to be logged in, I have written this in Page_Load

if (Session["cod"] == null && Session["admin"] == null)
{
Response.Redirect("You need to Login.aspx");
}
if (Session["cod"] != null || Session["admin"] != null)
{
LinkButton1.Text = "Logout";
}
if (Page.IsPostBack == false)
{
log_bind();
grid1_bind();
grid2_bind();
}

But while I was testing this, I noticed that when I press the Back/Forward button on the browser, these pages are viewable without being logged in. How do I prevent this?

View 5 Replies

Viewing File Using .net / To Copy/download File To Local User Machine And To Open

Nov 16, 2010

In our application, we allow user to upload documents which can be PDF, Doc, XLS, TXT. Uploaded documents will be saved on web server. We need to display link for each document user uploaded and when user click on that link, it should open relevant document. it is expected to have required software to open relevant documents.

To upload document, we use saveAs method of FileUpload control and it works absolutely fine.Now, how to view it?I believe, i need to copy/download file to local user machine and need to open it using Process.Start.For that i need to find user local temp directory. if i put path.GetTempPath(), it gives me web server directory and copy file there.

File.Copy(
sPath + dataReader["url"].ToString(),
Path.GetTempPath() + dataReader["url"].ToString(),
true);

View 4 Replies

Detecting Javascript During Login Of An MVC App

Jan 24, 2011

My LogIn action originally looked like this:

return new RedirectResult(nameValueCollection["ReturnUrl"]);

But, I would like to know whether the client has JavaScript enabled before the home page loads, so I changed it to this:

return View(new LogInViewModel { ReturnUrl = nameValueCollection["ReturnUrl"] });

And send the following view instead of the instant-redirect:

@model Obr.Web.Models.LogInViewModel
@{
Layout = null;
string noJSReturnUrl = Model.ReturnUrl + (Model.ReturnUrl.Contains("?") ? "&" : "?") + "noJS=true";
}
<!doctype html>
<html>
<head>
<title>Loggin in...</title>
<meta http-equiv="REFRESH" content="1;url=@noJSReturnUrl">
<script type="text/javascript">
window.location = "@Model.ReturnUrl";
</script>
</head>
<body>
<noscript>
Loggin in...<br />
<a href="@noJSReturnUrl">Click here if you are not redirected promptly.</a>
</noscript>
</body>
</html>

The idea is that if the user does not have JavaScript enabled, they see a brief loading message, and the home page loads after a second. If JavaScript is enabled, the page reloads instantly. In the future I could even post to the server the dimensions of the viewport and such. Does this look like it would work? If the window.location command takes longer than a second to run, will it be interrupted by the meta refresh, or does it block that refresh? I am hoping the latter, so I don't need to increase the delay for those non-js people.

I figure my new way adds a little extra weight to the payload of the redirect, but it's not an extra round-trip or anything, is it? The redirect happens anyway, does it not? Update: I neglected to mention a very important point. I do not actually have control over the login screen itself, only the page it posts to. This code is part of a product that relies on an external authentication mechanism.

View 2 Replies

C# - Detecting Non Mobile Browsers

Sep 17, 2010

So I'd like to redirect mobile users to a different page. But instead of trying to detect any number of mobile browsers, I'd just like to see if the user is using IE, Firefox, Safari, Chrome, or Opera; all other users go to the mobile site. My biggest problem is detecting regular Safari from mobile Safari.

View 1 Replies

Detecting Web Browsers' Versions?

Dec 19, 2010

i'm programming an application where an action is done if i access with a version equal or higher than other and another action if i access with a lower version; but the problem is that the lines to indicate the versions doesn´t work. The code is the following:

[Code]....

As you can see, an action should be done if the version is the 9.0 or higher and other if it is lower, but these lines doesn't work and only works the detection of the web browsers (no the versions of them, action that doesn't works).

View 2 Replies

Detecting An Expired Session From Php?

Feb 23, 2011

I'm developing an extra section to a web app that's written in asp.net, but in php - it's mostly done (the two parts don't really communicate with each other outside of a database - the integration is mostly just cosmetic.)

The only issue I have is detecting from the php part when the .net session has expired so that it logs the user out and redirects to the login page.

I believe the asp.net application is compiled, but either way I'm not allowed to alter it so I was thinking maybe the best thing to do would be to make a very small/simple aspx page that outputs true or false which I could call using curl from php (and passing the browser's cookies along.)

Would this even be possible? I'm not sure how session security works on asp.net eg whether one .net application can read another's session variables, but if it's anything like php then it'll be possible.

mypage.php --curl--> checksession.aspx --|
| |
<----------- true / false <---------------

So mypage issues a GET (with cookies from browser) to checksession using curl, checksession simply returns a true or false (or something like that) and mypage redirects to the site's login page if that's false.

The authentication for the php side is already sorted out and is separate to this issue.

So really, what I need to know is can I have just a simple .aspx file that does this check, and if so where would I go to to find out how to program such a simple page?

View 3 Replies

Detecting And Closing Frames Using Javascript

Jul 16, 2010

I'm working on an ASP.NET web application. There's a bill page which has two links to different pdfs of the same bill. When you click on one of the links it takes you to a ViewPDF.aspx page that shows the pdf. There's also an option to view both in a split screen so that you can compare them. When you click on this link it takes you to BillSplit.aspx which has a frameset and two frames that both point to ViewPDF.aspx. This all works perfectly.

The problem is that if an error occurs while pulling up the pdf. The application has an error page that has a few links back into the application. If you use one of these you can go back into the app and continue but now inside the frame. The URL still says BillSplit.aspx but the application is completely unaware of this since frames are HTML elements not asp.net controls.

What I would like to do at this point is detect that you've returned to the application and close the frame you aren't using. Essentially I'd like to redirect you away from BillSplit.aspx and to the page you're actually requesting. I'm pretty sure this would need to be done in Javascript either on the BillSplit page or on the pages that you go to later. So I guess what I'm asking is, is there a way to ensure that the BillSplit.aspx page and it's two frames point only at ViewPDF.aspx?

View 1 Replies

Detecting If Site Is Being Accessed By A Robot?

Feb 15, 2010

I have some geo targeting code whcih I want to behave in a particular way if the site is being spidered by a robot e.g. google etc.

Is there any way to infer this?

View 4 Replies

Localization :: Detecting The Language In A String?

Feb 24, 2011

I recently started using fusioncharts (which is a great charting tool btw) but I releaized that although it renders Right to Left languages correctly, it does not display them from Right to Left, so if I have "Sales Report" in Arabic, it will be displayed "Report Sales" in the chart.

I dont have a problem with this with static text because I can reverse it before I send it to the chart, but with dynamic text that is entered by the user it is a challenge, because the user may enter the details in English or in Arabic, or in both.

So if I can define the character code used in the sentence then my problem will be solved, and the first thing that came to my mind in order to do this is:

- Take one letter from each word in the string and compare it with the Arabic alphabet (instr function).

- If the function returns true then the letter will be arabic and therefore the whole word will be arabic, I'll store this word in a new string

- If the next word is also Arabic I'll add it to the new string else I will skip it and start a new string for the next words to come.

- After I finish searching the string I will reverse the words in the new string and replace them with their parts in the old string then send them to the chart.

View 1 Replies

C# - Detecting New Visitors To Website Without Using Cookies?

Mar 11, 2011

We are looking to create a website that displays information to all new visitors to a site, i.e. welcome,The big problem is that our website is not allowed to use long-lasting cookies (i.e. over 20 minutes). Does anybody know of any way we can determine whether a user has visited the site before or not. As another restriction, we can not add anyform of registration to the system. The application is being created in ASP.Net 3.5.

View 6 Replies

Security :: Detecting Users Don't Log Out Correctly

Sep 4, 2010

I have a web site which uses forms authentication and we have a log out page which will sign out the user and set that they are signed out in the database. This needs to be done as they use concurrent licences. The problem is that users are closing down the browers without logging out, meaning that the database shows them as logged in. I would use javascript onbeforeunload/unload functions to call a webservice, but this is unreliable to actually know if they have closed down the browser. or just hit refresh. An idea i had was to have a web service fired every 20 mins to detect if a user has loaded any pages within 20 mins, if they have not then to set them as logged out.

View 2 Replies

Detecting What Platform Code Is Running On In C#?

Dec 9, 2010

I have C# code I want to use in both a WinForms app and ASP.NET website. The database connection string differs for each though, so I want to be able to find out which platform it's running on and set the connection string appropriately. Is there an easy/recommended way to do this ?

View 3 Replies

Web Forms :: Detecting Content Changes On Websites?

Nov 12, 2010

As per the requirement of my client I would like to create an application which detects content changes on the websites we provide. Like we will have an admin section where we add the websites we want to keep a track of. And on the other side it tell us of any new content on those websites. The websites will be kind of general news website and won't have RSS feeds. I would like to know if there is any way to do something like this. Any ideas are welcome. I would like to know just the logic how to create such a thing.

View 5 Replies

State Management :: Detecting The End Of A Session?

May 5, 2010

I want to detect when a session has expired so I did the following:

1. I added Session("SessionStatus") = "ON" in the Session_Start code.

2. I added Session("SessionStatus") = "OFF" in the Session_Endt code.

I also modified the session "timeout" in the web.config file, "sectionState" section to 2 minutes for testing purposes so I do not have to wait for 20 minutes. I made a small web form in which there are a label and a button; the label displays the value of Session("SessionStatus") when the button is clicked.

I click the button just after running the web form and I get the value of "ON" displayed.
I waited for more than 2 minutes and clicked the button again and I still get the value of "ON".

Isnt't it supposed that the session has expired and the Session_End event is raised changing the value of Session("SessionStatus") = "OFF"?

View 6 Replies

C# - Detecting If Referrer Was From A 301 Permanent Redirect?

Jul 8, 2010

I am doing a 301 permanent redirect from an old server to a new server. When the new server's page is hit I want to be able to determine whether the user comes from the old site and then react differently, i.e. instruct user to re-book mark the new page.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved