Get IP Of Server That Initiated Redirect

Jul 26, 2010

A user clicks a hyperlink in a page. Server A handles the request and redirects the client to a URL on Server B (more specifically I am using the Response.Redirect method in .NET on server A). I have been asked to restrict access to Server B to redirects originating from Server A only (by blocking IP's other than Server A's). At first I thought this could be achieved by using the HTTP 'referer' header, however, it seems it is up to the browser to set this to a URL (rather than IP), and it is not guaranteed to do so.

I guess there is no way to set the HTTP 'referer' on server A in .NET (to server A's IP)? (my intuition is that would be a security hole). So my question is, how can I restrict access to Server B to redirects originating from Server A?

View 3 Replies


Similar Messages:

AJAX :: Server Side Confirmation - Not Control Initiated

Sep 25, 2013

URL...In the above page, the button fires the javascript first, then the code-behind sub runs.  The problem I have is I am in the middle of a code-behind sub routine that checks if a user is logged on the a PC.  If there is a users logged on, I want the confirm popup to ask whether to reboot anyway or cancel.  The code needs to dictate whether to call the javascript, not some direct button click.  Then I need the remainder of the code-behind sub to execute based on the users choice. 

I can call the client script in the code-behind sub using 'RegisterStartupScript...'; then I can get the page's form value.  The problem is that the sub runs to completion without waiting for the javascript code to run.  This causes code-behind variable to get checked before it's set by the client and it nevers works.

View 1 Replies

How To Get The Id Of Updatepanel Which Initiated A Postback

May 25, 2010

I need to intercept server callback after udate panel async post back and determine which panel initiated the request. The code is pretty simple:

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(InterceptUpdateCallback);
function InterceptUpdateCallback(sender, args)
{
var updatedPanels = args.get_panelsUpdated();
for (idx = 0; idx < updatedPanels.length; idx++) {
if (updatedPanels[idx].id == "myUpdatePanel") {
StartSmth();
break;
}
}
}

And it works when UpdatePanel is not inside another UpdatePanel. But when it is inside another UpdatePanel updatedPanels[idx].id has parent Updatepanel id. So how can I get the id of UpdatePanel which initiated the request (the inner UpdatePanel)?

View 3 Replies

DataSource Controls :: How To Use 1 Database Connection In A Unit Of Work Initiated From The UI

May 4, 2010

I am designing a web application and have separate layers for UI, BAL, DAL and DB, while using custom business objects and collections. The app will be used by over 10,000 + registered used and it becoming more complex as I add new functionality such as inline editing and batch processing of collections with transactions ... which has me up late at night trying to design the best approach for this ...In some UI web forms, I bind say 3 controls to 3 different collections. The UI calls the BAL classes for the required collections, then binds the collection returned. So for each collection I want, a db connection is opened and closed. As I understand database connectivity adds overhead so Is there anyway I can design this so 1 database connection is created for a unit of work in a 3-tier or n-tier architecture?

View 7 Replies

How To Redirect On Server Error

May 3, 2010

I have a website that occasionally gets a Server error and throws that error page. Now the funny thing is that all I ever have to do is hit refresh and the error goes away. So until I figure out this error, do you know if theres a way to set up IIS so it automatically redirects whenever this error comes up?

View 1 Replies

Use Redirect Or Go With Server.Transfer?

Jun 19, 2010

If I need to redirect a user from one page to another, should I use redirect or go with server.transfer? I'm assuming redirect. The idea is to give the users one specific URL and then have that URL redirect to the most current iteration of the page. For example, the user may have [URL] as the URL but the actual page served to them would be [URL]

View 16 Replies

C# - Redirect New Page From Server

Jun 28, 2010

i have this webmethod that redirects to a new page from server,

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public static Boolean realizaConsulta(Dictionary<string, string> datos)
{
System.Web.HttpContext.Current.Response.Redirect("PRepConsulta.aspx", false);
}

but i got this error:

Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'realizaConsulta' failed with the following error: System.InvalidOperationException-- Authentication failed.

View 3 Replies

Response.Redirect() To An Address In Another Server

Jan 10, 2010

Response.Redirect() to an address in another server, for example my site is in 172.16.10.20

but i want to have Response.Redirect to 172.16.10.21

View 14 Replies

What Is Difference Between Response / Redirect And Server

Feb 4, 2011

When I went for interview, they ask me this question. I don't know this question and concept is not clear.

View 7 Replies

Server 2008: Redirect Via IIS7 Or ASP.NET?

Jan 20, 2011

I have a domain with several sub-domains. When I attempt to redirect the root (www.somesite.com and somesite.com) it works fine, however it also forwards the sub-domains. Each sub-domain, including the root site are setup as individual sites. I don't want to forward the sub-domains only the root site.

Is this possible in IIS7 or should I just code redirect in the Index page(S)?

View 2 Replies

What's The Difference Between Server -Transfer & Response.Redirect()

Apr 4, 2010

This is the very favourate question available on every interview questions site. I have searched for it. But didnt get the satisfactory practical difference between these two. show me the difference between this two through a working sample demo.

View 6 Replies

How To Redirect To A Particular Website In Local / Remote Server

Mar 30, 2010

How to redirect to a particular website (in local/remote server) when some one enters a website URL in the browser.

View 7 Replies

Response.Redirect Not Working Properly On New Server

Jun 3, 2010

we are running into an issue with our ASP server. If you try to access a password protected page it does a security check and redirects you if you are not logged in, retaining the URL (ie. Members/MemberLogin.aspx?doc=/PodCast/Default.aspx) The vb script places the "/PodCast/Default.aspx" in a variable and holds it until the login process is complete. Once the user types in their username and password it is suppose to do a Response.Redirect(strRedirectURL) and go to the "/PodCast/Default.aspx" but instead it goes to the default.aspx page for logging in successfully.

The kicker is, I know the code is 100% correct becuase it was working on our previous server, but when we pushed all the data onto this server, everything works BUT that piece.

View 1 Replies

What's The Difference Between Server.transfer And Response.redirect

Mar 28, 2011

1)what is the difference?

2)can u explain also interms of transferring values from page1 to page2.

View 2 Replies

Web Forms :: Response.redirect Not Working On The Server

May 27, 2010

Try
client.Send(msg)
Global_asax.myLogger.Log(BitFactory.Logging.LogSeverity.Status, (-- Status --> form sent email to " + msg.To.ToString))
btnSendmail.Enabled ="
"False"
Response.Redirect("http://www.google.com/")

i am submiting a form on the button click and redirectiing to a site. But it is not working.

View 5 Replies

Server.Transfer() Is Faster Than The Response.Redirect()?

Apr 22, 2010

Why Server.Transfer()is faster than the Response.Redirect(). Can anyone explain in details.

View 6 Replies

C# - Difference Between Server Transfer And Response Redirect?

Mar 25, 2010

difference between Server. Transfer and Response. Redirect?

View 4 Replies

Does Response.Redirect Equate To Sending A GET Request To The Server

Jan 5, 2010

Does Response.Redirect equate to sending a GET request to the server?

View 3 Replies

C# - How To Write A HttpHandler To Redirect Traffic To Various Webpages On The Server

Apr 29, 2010

I want to write an HttpHandler to redirect traffic to various webpages on the server. The user will type in http://www.thisissupposedtoberedirected.com/site12 and should be redirected to the appropiate site, in this example site version 1.2

I know how to program in ASP.NET and C# but I don't seem to grab the finer detail about website management.
How can I manage to get this done? What should I do in the web.config?

View 2 Replies

Web Forms :: Redirect In Custom Event Where Response Or Server Is Not Available?

Feb 24, 2011

I am using a custom event in third party library for my asp.net project. When the event happens, I need to redirect to another page. Problem is that since it is custom event, Server.Transfer or Response.Redirect can't be used (I tried but got "response is not available in this context"). So I think best way would be to trigger post back in the event and redirect in page_load event on appropriate conditions. Is this right approach or is there any better idea? And, how can I trigger postback?

View 2 Replies

Configuration :: How To Redirect Multiple Domain Name On One Website Hosted On IIS Server

Dec 24, 2010

how to redirect multiple domain name on the one website that is hosted on IIS server???

View 2 Replies

Web Forms :: Server Side Redirect Script If JavaScript Is Disabled?

Aug 10, 2010

I am in the process of developing a feature rich website with vast use of jQuery. My biggest concern is that I will not be able to reach a percentage of my users because they will not have Java Script enabled or will be using a platform that is not compatible with jquery. I know that I can use a simple java redirect from within the html page itself but this does not seem like a decent resolution to the problem as I would rather the script be run on the server side not from within the html page itself.

Is it possible to configure IIS, Apache, or Linux to run a script that redirects specific browsers, platforms, and settings to another html page before the html request is made? It does not seem sensible for the default index.html page to download initially before a second request is made back to the server for the index1.html page.

I need to redirect certain platforms (IE 6 for example), and browsers with java disabled to a separate website that does not have jQuery functionality.

Here is the site: http://www.intechspecial.com

View 3 Replies

Which One Is Better Response.redirect Or Postbackurl(asp:button Feature) To Redirect Webpage

Aug 13, 2010

which one is better response.redirect or postbackurl(asp:button feture) to redirect web page?

View 3 Replies

Response.Redirect - Local Characters - Redirect To Obtain A Clean Url ?

Jul 18, 2010

I want to redirect to "~/City/Göteborg", but if I just write Response.Redirect("~/City/Göteborg"); I will end up with an ugly URL in the address-bar like this: http://www.mysite.com/City/G%c3%b6teborg..

So my question is how to redirect to obtain a clean url like http://www.mysite.com/City/Göteborg?

View 3 Replies

Web Forms :: Response.Redirect - Redirect To Error Page ... ?

Mar 6, 2011

I have a problem with Response.Redirect to specific error page.

so far i have something like :

protected void Page_Load(object sender, EventArgs e)
{

if ((Request.QueryString["UbytovaniePrispevokID"].ToString()) == "")[code]......

What i want to do is.. I have one main page with new posts Each subject of the new post is the link to Another page where is Specific post and coments and user can leave a coment.

What I want is when the Request.QueryString["UbytovaniePrispevokID"].ToString()) == "" or null I want to redirect to error page ...

View 3 Replies







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