AJAX :: WebResource Fail To Work Under Reverse Proxy?

Jul 19, 2010

We have an issue when our web application runs under reverse proxy.

The reverse proxy change the URL for the website from for example: "http://TestWebApp/" to: "http://ProxyDomain/Test/" when it runs under reverse proxy which is mapped to "http://TestWebApp/" and rout requests to it.

This raise an issue of root relative paths (paths that start with "/" to be relative to the root of the web application i.e. "/Folder1/Test.aspx"). Generally all paths that need to be rendered to client we use ResolveClientUrl method and all is good.

When using Ajax controls and ScriptManager WebResource.axd paths are rendered in script tags as a relative url paths ("/WebResource.axd?blablabla") because the root under reverse proxy is the proxy domain itself the path is useless - the web resouce is not downloaded and the application break.

To fix this we tried to set a Response.Filter in OnPreRender event handler of our base page. In our custom filter we use Regex to search and replace all "/WebResource.axd" occurences with the resolved to client root path using the ResolveClientUrl method of the page. This works great and the web resources are downloaded to client.

But this is not the end of our troubles.

In Ajax requests the response output is fixed as described but when recieved at the client end it is not valid and the partial update fails with Sys.WebForms.PageRequestManagerParserErrorException.

It fails to parse the response because the rendered response have numbers that states the actual count of bytes per rendered component (which includes the script tags referencing the WebResource.axd). The client reciever validates the recieved response according to the numbers, but, our filter altered the response so the numbers are not correct and the response validation fails.

We can try and code a smart filter that parse the response and recalculate the numbers according to the ammount of paths fixed, but I hope there is an elegant and better solution for this.

View 3 Replies


Similar Messages:

MVC :: Reverse Proxy And Authentication?

Feb 21, 2011

We have nearly completed an ASP.NET MVC web application running with SSL in IIS and now find that we must integrate with a third-party product that is supplied as a PHP web app running under lightppd on an alternate port, but still on the same server.

We want to make the integration appear as seamless as possible, so our initial strategy is to do all of the authentication through our application, implement a reverse proxy to expose selected features from the third-party product, and then set-up the third-party product to only be accessible from localhost and (if we can manage it) only from the user our app pool runs as. As a second layer on top of this, we plan on running the third party active content in an IFRAME, so we can surround it with our menus and headers. With the right fonts and colors, hopefully, it won't look grossly out of place.

First question: Is this strategy totally naive? Given the hand we've been dealt, is there a better one?

Second question: What is the best way to implement the reverse proxy? I was thinking of using a routing rule with an Http Handler that invokes our usual authorization just as a controller would and makes the requests to the other site, streaming out the results it receives. Is there something that already does this generically, that I can just hook up and invoke? Maybe some way to specify a controller to handle everything I need to proxy and then use a ViewResult that represents a call to an external URL I construct from the URL I received?

If I can get a few pointers on what to look for, I can trot off to the docs for the details.

View 6 Replies

How To Protect A Web Server Froma Reverse Proxy Server

Oct 10, 2010

I have a website [URL]. Recently I found out that somebody has set up a reverse proxy with an almost identical url "www.website1.com" in front of my website.

I'm concerned of those users who came to my website through that reverse proxy. Their username and passwords might be logged when they login.

Is there a way for me to have my web server refuse reverse proxy?

For example, I've set up a reverse proxy using squid with the url "www.fakestackoverflow.com" in front of "www.stackoverflow.com". So whenever I type "www.fakestackoverflow.com" in my web browser address bar, I'll be redirected to "www.stackoverflow.com" by the reverse proxy. Then I notice the url in my address bar changed to "www.stackoverflow.com" indicating that I'm no longer going through the reverse proxy.

"www.stackoverflow.com" must've detected that I came to the website from another url and then redirected me to the website through the actual url.

View 8 Replies

How To Modern Implementations Of Comet/Reverse AJAX Work, Any Stable C# WCF Or Implementations

Mar 25, 2011

What is the correct way (or best) way to implement Comet, HTTP Push, or Reverse AJAX?What .NET implementations would you recommend?

View 1 Replies

How Can The Exact Same Code And Stored Proc Work Fine The First Time But Fail The Second

Mar 3, 2011

I have a gridview 'gvTemplates' that loads from the Page_Load method. It is using a stored procedure and this works fine. Then I do a search function on that gridview and that works fine. So when I click the search cancel button, which calls the same exact code that loads the gridview from Page_Load, I get the dreaded 'Input string was not in the correct format'.How can the exact same code and stored proc work fine the first time but fail the second?Gridview:

[Code]....

View 3 Replies

AJAX :: Comet/Reverse AJAX With Visual Studio 2010?

Oct 9, 2010

have here a (internal intranet) site where users can preserve places for the lunch and pause... :)Now, meanwhile the users count grows more and more and the ajax site that speeks with a webservice for the calculations und checks geting slower and slower... user 900+The site checks every 5 seconds for the actual state and uses groups for the users.Ok, now i have researched on the web, and found the comet/reverse ajax aproach that the service can push the clients with events.But i have not found any good asp.net tutorial with visual studio (2010) how i can use the asp.net standard controls and vs design mode.Is there a framework for that stuff?

View 3 Replies

AJAX :: Scriptresource.axd And Webresource.axd?

Mar 21, 2010

My website is looking in the wrong place for the scriptresource.axd and webresource.axd. How do I point it at the correct subfolder? Or how do I set it so that scriptresource.axd and webresource.axd are stored in the root of the website?All the ajax is done within subfolders. The web.config is at the root of the website.

View 2 Replies

Reverse Ajax Comet/Polling Implementation For .NET MVC?

Jul 21, 2010

I am looking for ASP.Net MVC implementation for reverse ajax comet/polling. Can anyone provide some good link or tutorial

View 2 Replies

AJAX :: Sys Is Undefinded - WebResource.axd ScriptResource.axd 404 Error?

Jul 12, 2010

I have a site that uses the Ajax Control Toolkit that's been running for several weeks and a week ago all of a sudden users are seeing script errors. I'm getting 'Sys' is undefined errors, as well as 'object required' and other JavaScript exceptions. The site does not function because of this.

I checked the page source and looked for the WebResource.axd and ScriptResource.axd's and tried navigating to them directly by putting the URL in the browser. I got a 404 error - file not found. If I do the same in our test environment, it comes back and asks me if I want to save or open the file. If I open it, I see the JavaScript that I am expecting (from the Ajax Control Toolkit).

In our test environment, with the same code, everything works fine. This tells me there was something on the production server that's preventing this from working. About 4 days before this started happening, we found that some user documentation (PDF) wasn't being protected by Forms Authentication (we need only legitmate users having access to it) so we added a wildcard mapping in IIS with "verify that file exists" was unchecked, knowing that if it were checked, we'd have this problem. I had one of the network admins check this setting after this started happenig and he said that it was still unchecked. I asked him to remove the wildcard mapping altogether and I still see the same behavior.

I am certain that this isn't a coding problem; again, as it went through the QA process in our test environment, everything works perfectly. And after the last deployment to production three weeks ago, everything was perfect as well. We added the wildcard mapping (which shouldn't have had an effect) and four days later the site breaks. I've asked our IT department if any changes were made to the server recently and nobody says they did.

What settings does anyone know of that might be causing this, either server or application? I checked the web.config and all the sections are there that deal with the ScriptResource HttpHandler and HttpModules. In fact, the web.configs are identical between the production and test environment, so I know it hasn't been tampered with.

View 4 Replies

AJAX :: How To Change Path Of ScriptResource.axd And WebResource.axd

Apr 12, 2010

Is there any way to change the path of both ScriptResource.axd and WebResource.axd to a relative path (remove the leading the "/")?

View 4 Replies

AJAX :: Control Toolkit Line Chart Reverse Y Axis

Feb 1, 2014

I am currently making a line chart of Ajax control toolkit referring to an article [URL] .....

It works fines as described. My question is how to reverse Y axis of the line chart. 

I need to place 1 (not 0) at the top of Y axis and biggest number near the bottom with some margin from axis X. The described chart is biggest number neat the top and 0 at the bottom. 

View 1 Replies

AJAX :: ModalPopupExtender Fail When Using SSL?

Jul 15, 2010

Am using ModalPopupExtender (In VS 2005 ). But it doesnot showing it when i use in SSL.

View 2 Replies

AJAX :: UseHttpGet Causes PageMethod To Fail?

May 30, 2010

I have a PageMethod that works perfectly well when it either (a) running in the VS dev server, or (b) deployed but marked with UseHttpGet=false.

What doesn't work, and is driving me mad, is having UseHttpGet=true and then deploying it to a test server (Vista & IIS7). It fails to call through the proxy with error code 404 coming back. But it works find if I set UseHttpGet=false.

I have gone through all of the basic stuff I can think to check, and as noted it works perfectly well on the dev box. So there must be something particular about full-blown IIS7 and its config that I am missing..

anything to check in the IIS manager that would cause this to fail? I've tried with forms authentication enabled and disabled, as a few posts mentioned issues with that.

View 1 Replies

Security :: Fail To Log Out When Using Ajax For Adding Controls

Sep 30, 2010

My masterpage has a loginStatus control to let users log out and it works very well on normal pages .Recently, I created a new content page associated with the mentioned master page. Such new page allows users to add textboxes dynamically through ajax asycpostback.
Unfortunately, loginstatus right now fails to work when i click it. I traced the process and i found out that the loggingout event was not fired when i click it.

I follow this video to make such "Dynamically add control" page.

http://www.asp.net/ajax/videos/how-to-dynamically-add-controls-to-a-web-page

View 2 Replies

MVC :: Ajax Call Causing RedirectToAction/ValidationSummary To Fail?

Jul 26, 2010

I think ive narrowed down my problem, I have a form but the "submit" buttons are being handled by Javascript - since i need to build arrays manually outside of the model for processing

[Code]....

I'm calling the Controller Action "Update" and passing it to string Arrays, when its finished - i want it to redirect to another action - it doesnt.

[Code]....

I just really wanna construct those arrays, and pass them to a controller...i think the ajax is waiting on a result and ignoring the redirect.

View 1 Replies

AJAX :: Using Visual Web Developer, Register Statements Fail?

Jan 20, 2010

I installed Visual Web Developer 2010 (beta) and then I wanted to use ajax, so I downloaded and unzipped the AjaxControlToolkit.dll into a folder called c:AjaxControlKit. I added a tab to the toolbox, and I used 'choose items' to access the dll. This populated the toolbox with Ajax controls. Another thing it apparently does automatically is add the following statement to every aspx page:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

View 1 Replies

AJAX :: ISA Proxy Server Returning 407 For Request?

Feb 10, 2010

We are using 2 ISA proxy servers in front of our webserver and are getting intermittant Ajax errors in our application.

Our web logs indicate that there are 407 errors occurring during the requests.

When other users hit the webserver directly this issue does not occurr and this is also not an issue in IE8 but is in IE7.

The error dialog has Sys.WebForms.PageRequestManagerParserErrorException and the details say "error parsing near '<!DOCTYPE html P'

View 1 Replies

AJAX :: Updatepanel Stops Working Under Proxy And It Happens Only In IE

Mar 13, 2011

We have an updatepanel in our site and there are a number of linkbuttons in it. Please note that the site works fine in all browsers without proxy the proxy changes the url from for instance [URL] to 0-[URL] it also works fine in all browsers but IE the issue is that under proxy and in IE8, it gives an error when clicking one of the linkbuttons, the error message is "Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; InfoPath.1; .NET4.0C; .NET4.0E) Timestamp: Sun, 13 Mar 2011 20:38:58 UTC

Message: 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 calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near ' <!DOCTYPE html PUB'.

Line: 4674
Char: 21
Code: 0"

I have no idea what goes wrong here, it seems that IE can't parse the response?

View 5 Replies

AJAX :: Try To Open My Webservice In IE Browser Using Following Link To See The Javascript Proxy, It Return Blank Page?

Apr 11, 2010

I created a very simple webService using the VS2008 template. i am planning to use Ajax call for the webService.when i try to open my webservice in IE browser using following link to see the Javascript proxy, it return blank page.[URL]

View 3 Replies

AJAX :: Make This Work For Several Days But It Just Doesn't Work?

Oct 7, 2010

i'm trying to make this work for several days but it just doesn't work.

this is my code:

aspx page:

[Code]....

webservice:

[Code]....

this was downloaded from this website.

the problem is that the page loads fine but no autocomplete occurs.

View 5 Replies

Ajax With WCF Work. But Few Miniute After, Doesn't Work

May 11, 2010

I am a new to WCF. I have written ajax to use a web service before, but on this project I am trying to use ajax to WCF.After I build the project and wcf using ajax, I receive the return successfully. But, 10 or more minutes later I don't get a return, the ajax calls the error function, and the fiddler returns nothing.

If I rebuild the project without any source modifying, I receive the return successfully again.

View 2 Replies

C# - Reverse Engineering .net Web App?

Feb 16, 2011

I have an asp.net web application. I don't have the source code. The bin contains 10 assemblies and a .compiled file. I used Reflector on the App_Code.dll and it shows me classes and namespaces and stuff, but its such a mess.Is there any way to reverse engineer this web app that won't take weeks/months to unfold? The application is pretty basic.

Note, the code is written by an engineer that left the company. We own the product.

View 3 Replies

Enable Reverse DNS Lookup For IIS?

Feb 24, 2010

(Not sure if I'm creating this post in the right place. Feel free to move if needed.)

I'm trying to enable full DNS lookup including hostname. Having trouble. I've followed the instructions here

(http://support.microsoft.com/kb/297795) with no luck. Request.ServerVariables("remote_host") still returns only an IP Address.

[Code]....

I've also tried using DNS.GetHostEntry(IPAddress) and the depricated DNS.GetHostByAddress(IPAddress). All I ever get back is the IP Address with no host name.

IIS 6.0, Windows Server 2007 Server Pack 2, .NET 2.0

View 1 Replies

How To Reverse The Order Of Words In Query

Jun 7, 2010

i have stored in the database as location India,Tamilnadu,Chennai,Annanagar while i bind in the grid view it ll be displaying as 'India,Tamilnadu,Chennai,Annanagar' this format.

but i need to be displayed as 'Annanagar,Chennai,Tamilnadu,India' in this format. how to perform this reverse order in query or in c#

note: this is stored under one column as 'India,Tamilnadu,Chennai,Annanagar' with comma separated.

View 5 Replies

Reverse Function Of HttpUtility.ParseQueryString?

Apr 9, 2010

.Net's System.Web.HttpUtility class defines the following function to parse a query string into a NameValueCollection:

public static NameValueCollection ParseQueryString(string query);

Is there any function to do the reverse (i.e. to convert a NameValueCollection into a query string)?

View 2 Replies







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