Ajax Call Exceeding Acceptable URI Length?

Nov 18, 2010

I have a ASP.NET MVC configuration, and I am building a reportgenerator. I am outputting a JQuery table, so that the user may sort and rearrange it, before fetching it as a PDF. My PDF component is .NET-based, and so I need to send the modified table back to the server via AJAX.

The problem is that the URI can get as large as 100k characters, making the server respond with a status of 414 (Request-URI Too Long). It seems that IIS does not allow URIs greater than some few thousand characters.

I admit that it seems strange to compose a URL that big, so I think I might be missing something. Is there another way to post the data to the server, or maybe possible to solve this in another way?

View 2 Replies


Similar Messages:

C# - Redirect To Error On Exceeding Fileupload Size/connection Reset

Jan 4, 2011

I am trying to direct user to a error page when maximum fileupload size excedds.For this iam doing the following thing:

[code]....

But on uploading file with size more than the max filesize it is showing "connection reset" error.
How should i do this.

View 7 Replies

Exceeding Limits Of Twitter API Search,I Have Used Since Id...But Now Getting The Error Parameter Already Exist?

Mar 2, 2011

public void search(TwitterSearchParameters tsp)
{
int c = 1;

[code]...

View 2 Replies

What Is Acceptable Size Of ViewState

May 27, 2010

just wanna ask what is acceptable size of ViewState per page? What is the level I should start worried. Is there any objective measurement for viewstate size?

View 6 Replies

Is It Acceptable To Have Unhandled Exceptions In Web Applications

Jul 20, 2010

I'm working with a third party vendor at the moment who has supplied an ASP.Net web application. The web app generates around 200 unhandled exceptions per day, which end up as emails in my in-box. Upon investigation it turns out that most of these errors are triggered by the GoogleBot web crawler indexing the site and triggering access to another third party web service, which is rate-limiting the requests. When a request limit is exceeded, the third party web service refuses the request, this results in an unhandled exception in the web server and an HTTP/500 status code. The exception looks like this:

[code]....

The web app developer seems unwilling to handle these errors for reasons I don't really understand. Their approach is to throttle the GoogleBot until the errors stop happening (Google indexes quite aggressivley, generating around 5,000 hits per day). While I accept that throttling the GoogleBot would work, it seems like a cop-out to me. I've always considered unhandled exceptions to be bugs. Shouldn't the web app handle these errors? It is ever acceptable to allow an HTTP/500 to happen? What do the web developers out there think?

View 6 Replies

How To Make Speed Acceptable In User Control

Jul 9, 2010

a.aspx

10 user control "user-control.ascx"

user-control.ascx

8 dropdownlist using AccessDataSource to reciece data.

It cause 8 sec when a.aspx was completely loaded as i am running localhost enviroment.

If i remove all the dropdownlist databinding, the speed is acceptable.

I though the connection to database is 8 X 10 = 80 times, so it cause a long time.

View 3 Replies

Is It An Acceptable Practice To Enable UnsafeHeaderParsing By Default

Dec 29, 2010

I manage an open source project called Quick and Dirty Feed Parser and the objective of the project is to make it as seamless as possible to consume RSS and Atom feeds in .NET.

I ran into fairly early on in the development of the project was that some of the feeds I was using as test cases (namely the Hacker News RSS feed) used improperly formatted HTTP headers, and the HttpWebRequest class in .NET 1.1 and up promptly throws an "unsafe header" exception whenever you receive one of these headers in a GET request.

This change was added in order to put a stop to split-response attacks that were raising security issues at the time .NET 1.1 was released.

I can enable the "useUnsafeHeader" configuration option programmatically, but it does it across ALL HttpWebRequests in that application's context. I have users who've complained about QD Feed Parser being unable to consume valid feeds, and this header issue is why.

Right now I have my library set up in such a way that developers who use it have to enable unsafe header parsing themselves, although most of them aren't aware that this is the problem and it creates a support overhead for me.

I can simply have Quick and Dirty Feed Parser enable unsafe header parsing by default and force security-concious users to disable it, but I don't want to open up users who don't know any better to security attacks either.

View 2 Replies

Is It Acceptable To Cache An Instance Of The Database Connection On Application Start

Jan 5, 2010

Is it acceptable to cache an instance of the database connection on application start?

Looking at the MSDN documentation on thread safety, I quote:

Any public static [...] members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Given that, is it acceptable/safe for code such as this example below:

[code]...

View 1 Replies

AJAX :: Set MultiHandleSliderExtender Length To A Percent Of Its Container

Mar 18, 2011

I'm using a MultiHandleSliderExtender (very cool) and need to set its Length property to a percent of its DIV container. The extender appears to only allow a decimal value for the number of pixels. Can anyone show me how to set the Length to, say, 95% of the DIV? I suppose using javascript to dynamically set it? I'm a C# guy who struggles with javascript and I cannot make this fly on my own.

<div
style="width:100%;
border:solid
thin red">
<asp:TextBox
ID="TextBox1"
runat="server"
Width="500px"></asp:TextBox><br
/><br
/>
<asp:TextBox
ID="TextBox2"
runat="server"
Text="648"
></asp:TextBox><br
/>
<asp:TextBox
ID="TextBox3"
runat="server"
Text="672"
></asp:TextBox><br
/>
<asp:MultiHandleSliderExtender
ID="TextBox1_MultiHandleSliderExtender"
runat="server"
Enabled="True"
HandleAnimationDuration="0.1"
Maximum="672"
Minimum="0"
TargetControlID="TextBox1"
OnClientDragEnd="SliderDragEnd"
OnClientValueChanged="SliderDragEnd"
Length="1200" >
<MultiHandleSliderTargets>
<asp:MultiHandleSliderTarget
ControlID="TextBox2"
/>
<asp:MultiHandleSliderTarget
ControlID="TextBox3"
/>
</MultiHandleSliderTargets>
</asp:MultiHandleSliderExtender>
</div>

View 2 Replies

ErrorArgument Not Specified For Parameter 'Length' Of 'Public Function Right(str As String, Length As Integer) As String'?

Dec 14, 2010

I have a datagrid and I set up the paging based on how many rows there are like this

With dgBookings
.AllowPaging = True
.PagerStyle.Mode = PagerMode.NumericPages
.PagerStyle.PageButtonCount = 5
.PageSize = 5
End With

Is there a way to set the horizontal-align in the code too I tried adding this

.PagerStyle.HorizontalAlign = Right

and I get this errorArgument not specified for parameter 'Length' of 'Public Function Right(str As String, Length As Integer) As String'.

View 1 Replies

AJAX :: Toolkit Html Editor Url Popup Length Increase?

Jun 15, 2010

I am using Ajax Toolkit's Html Editor in my application. When I select a text and convert it to a url by giving a link in the url popup,the url popup takes only a maximum of 255 characters. Whereas a URL can actually be upto 2048 characters. I would like to know if there is any way of changing the maxlength of the url popup.

View 1 Replies

AJAX :: AsyncFileUpload - Server Response Error - Maximum Request Length Exceeded

May 6, 2010

When the user tries to upload a file with a size more than 4 MB, the AsyncFileUpload control gives a Confirmation alert (with "OK"/"Cancel" button) with the following message "Server Response error: Maximum Request Lengh Exceeded". But when the User clicks the "OK" button a new window popups and shows the server error and on clicking the cancel button the AsyncFileUpload background color turns red. Here I am not sure why the control is showing a Confirmation alert instead of a simple alert message. Is it possible to change the Confirmation alert with the simple alert message? Basically I don't want the popup window to show the server error as it is happening currently. Also, is there a better way to handle the file size error and show apporiate error message to the users?

View 2 Replies

Making A WCF Call With AJAX?

Mar 12, 2010

Is it required to use a RESTful service to be able to make a ajax call to a wcf service (for example: by using WebInvoke attribute on Operation contracts). Once a service is made RESTful by adding a webHttp binding on the service host, can the host have other endpoints as well? (wsHttp or netTcp). Is it required that the aspNetCompatibilityEnabled be set to true for a service that has webHttp binding (and can this setting coexist for other endpoints). I understand I can use both JQuery and ScriptManager for making WCF calls on the client. Why should I use one over the other?

View 1 Replies

Run Jquery After An AJAX Call

Feb 2, 2011

I'm sorting a gridview inside an update panel. When the user clicks on the column header, the gridview resorts itself fine. However, after the sort, I' like to run a javascript function called MyScript.

View 2 Replies

MVC :: Ajax Call On DropdownList

Dec 29, 2010

Ajax call on dropdownList

View 5 Replies

Ajax Call Outextender Not Working

Feb 8, 2011

I am getting a Invalid Control message balloon pop up.Looks like calloutextender is working but the message displayed is not the one expected... "Invalid Control" .. am I missing something?

View 4 Replies

AJAX :: Trying To Get AutoComplete To Call Web Service

Apr 26, 2010

I'm going on my 3rd day trying to get my Ajax AutoComplete textbox to call my web method. Based on my google searches, I'm not alone. I suspect the problem has something to do with the ServicePath property on the extender, although I'm not sure. My web service is at the same level, on the same server as my test web page. I'm not sure exactly what should go into the ServicePath property, although I think I've tried every possibility. Below is my web service followed by my script.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Configuration;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using AjaxControlToolkit;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.IO;
using System.Collections.Specialized;
using System.Web.Services.Protocols;
[WebService(Namespace = [URL])]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]

public class Service : System.Web.Services.WebService
{
public Service()
{
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] AutoCompleteNames(string prefixText, int count)
{
System.Data.SqlClient.SqlConnection cxn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["HumanResourcesConnectionString"].ConnectionString);
cxn.Open();.....................

View 11 Replies

MVC :: Ajax Call Not Working On Production Box - Using 2

Oct 4, 2010

The following .post command in a .js file works fine in Dev and Test but not on our production box (Windows Server 2003). I believe the URL is not being found on the production box since the function(result) is not being run. Or it could be that the index method is not returning the jsonresult.

[Code]....

Site.Master

[Code]....

View 5 Replies

AJAX :: How To Cancel __doPostBack Call

Feb 17, 2011

i am doing this in my client side to make my page load and update a message that is inside and update panel, i associate the keydown event of a textbox control to this javascript:

[Code]....

but the problem with that is if the user type fast the page will do a lot of postback, and i just wanna make the last one, how can i afford that??

View 11 Replies

AJAX :: Tab Disappears On Javascript Call

Feb 7, 2011

I have a page with an AJAX TabContainer and 4 AJAX TabPanels and have Save button. On a button click im calling javascript thats make ajax tab disappear why?

View 4 Replies

AJAX :: Call AsyncPostBackTrigger After Validation?

Jul 31, 2010

my page is using an UpdatePanel to do some ajax function after a button click. So here is what I got.

I have a textbox and a button.. The button clicks and the animation fires... But i dont want that, I want to validate the textbox and if everything is ok then fires Animation. Here is the code. My question is how can I fire this animation after all validations are ok?

[Code]....

View 2 Replies

AJAX :: Call Not Registering Script Tag?

May 27, 2010

I have a textbox in a modalpopup, whose onBlur is suppose to use a function defined as:

<script type="text/javascript">

View 3 Replies

What Is Causing Error On Ajax Call

Jun 21, 2010

I can't figure out why I might be getting this error. It happens on an ajax call.This is the full error text:

-- 6/21/2010 6:09:10 PM -- System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x80004005): OutputStream is not available when a custom TextWriter is used.
at System.Web.HttpResponse.get_OutputStream()
at AjaxControlToolkit.ToolkitScriptManager.OutputCombinedScriptFile(HttpContext context) in C:AjaxBuildAjaxServerAjaxControlToolkitToolkitScriptManagerToolkitScriptManager.cs:line 286
at AjaxControlToolkit.ToolkitScriptManager.OnInit(EventArgs e) in C:AjaxBuildAjaxServerAjaxControlToolkitToolkitScriptManagerToolkitScriptManager.cs:line 246
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context).......................

View 2 Replies

AJAX :: Call UpdatePanel1_Load From Javascript

Jul 22, 2010

I have an updatepanel on the webpage and also the event UpdatePanel1_Load. After the webpage is loaded I will have the possibility to call the javascript function: "CallUpdatePanelLoad()" My question is how it would be possible to exectute the UpdatePanel1_Load in C# from this javascript function?

[Code]....

View 12 Replies

MVC :: 404 Error On Ajax Call To Controller

Mar 7, 2011

I'm working on getting a new MVC 3.0 application up and running on a Windows 2008 server, running SQL05 and IIS7 with ASP.NET Framwork 4.0 as well as MVC installed. The index page has two select boxes. Selecting an option in the first select box does an ajax call to my controller that populatest the second select box. This works just fine on my winxp dev machine but returns a 404 on the call to the controller when running
on the server. Code for that call:

<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm("CamperDirectory", "TradingPost")) { %>
Select a Season: <%: Html.DropDownListFor(x => x.SelectedSeason, new SelectList(Model.GetSeasons, "Value", "Text"),"Please select a Season.") %><br /><br />
<%: Html.ValidationMessageFor(model => model.SelectedSeason)%>
Select a Session: <%: Html.DropDownListFor(y => y.SelectedSession, new SelectList(Model.GetSessions, "Value", "Text"), "Please select a Summercamp Session.") %>
<%: Html.ValidationMessageFor(model => model.SelectedSession)%>
<input type="submit" value="Go" />
<% } %>
</asp:Content>
<asp:content ID="Content3" contentplaceholderid="HeadContent" runat="server">
<script language="javascript" type="text/javascript">...............................

View 3 Replies







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