C
C#•6mo ago
TomasGnG 😴

ASPX Website: URL is getting cut by the browser because it seems too long

I dont have the code right now because that was at work but the aspx website was for redirecting to an internal archive website where I can create search parameters for documents. In the end the url was 2000 chars long or something and was always getting cut by the browser (tested with firefox, chrome and Microsoft Edge). What could I do to bypass that url length limit? Afaik the code was this:
var redirectLink = CreateRedirectLink(...);
Respone.Redirect(redirectLink, false);
var redirectLink = CreateRedirectLink(...);
Respone.Redirect(redirectLink, false);
Please @ me when you answer, thanks.
4 Replies
Angius
Angius•6mo ago
It's a common issue with GraphQL and they usually bypass it by using POST with a body instead Until the QUERY method gets standardized, at least As for how to do that with an ancient .aspx-based website...? No idea
TomasGnG 😴
TomasGnG 😴OP•6mo ago
how would it look like? can you please show me an example afaik the archive website is dynamic and working with an frame element or something
Angius
Angius•6mo ago
Uh, with JS you would send a request like
const res = await fetch('/search', {
method: 'POST',
body: JSON.stringify({
name: 'bob',
age: '> 32',
city: 'budapest',
// ...
}),
});

// `people` is all Bob's from Budapest older than 32
const people = await res.json();
const res = await fetch('/search', {
method: 'POST',
body: JSON.stringify({
name: 'bob',
age: '> 32',
city: 'budapest',
// ...
}),
});

// `people` is all Bob's from Budapest older than 32
const people = await res.json();
Again, I never worked with aspx I have no idea how you would do it there
TomasGnG 😴
TomasGnG 😴OP•6mo ago
ah alright, thanks I can write scripts by using Response.Write(script); Ill test it tomorrow at work
Want results from more Discord servers?
Add your server