Redirecting to another site with a large querystring

Redirecting to another site with a large querystring

am 16.04.2008 15:50:36 von joe

Hello,
I have a website set up on our server that is especially for errors.
When another website encounters an error, it will redirect to this
site with error details in the querystring. The error website process
the querystring and displays a nicely formatted error message with
details.

The problem I am having is that the querystrings are getting too long
and I am unable to successfully redirect to the error site. What are
my options other than using querystrings? The error website is a
separate project from all of my other websites, so I think that cuts
down on my options. I would prefer not to have to do anything
database-wise.

Thanks!

Re: Redirecting to another site with a large querystring

am 16.04.2008 17:15:20 von mark

"joe" wrote in message
news:8aa6d558-005a-4bd4-a489-3276c59695de@m36g2000hse.google groups.com...

> The error website is a separate project from all of my other websites, so
> I
> think that cuts down on my options.

It does, but I'm really curious as to why you would have a completely
separate website *just* for displaying errors...

Standard exception handling and user notification are excellent candidates
for a library project which you just add in to your "real" (for want of a
better term) websites so that the code is maintained in one place but
deployed everywhere it's needed. Then you wouldn't need to worry about query
strings or anything like that...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: Redirecting to another site with a large querystring

am 16.04.2008 17:43:12 von joe

On Apr 16, 10:15=A0am, "Mark Rae [MVP]" wrote:
> "joe" wrote in message
>
> news:8aa6d558-005a-4bd4-a489-3276c59695de@m36g2000hse.google groups.com...
>
> > The error website is a separate project from all of my other websites, s=
o
> > I
> > think that cuts down on my options.
>
> It does, but I'm really curious as to why you would have a completely
> separate website *just* for displaying errors...
>
> Standard exception handling and user notification are excellent candidates=

> for a library project which you just add in to your "real" (for want of a
> better term) websites so that the code is maintained in one place but
> deployed everywhere it's needed. Then you wouldn't need to worry about que=
ry
> strings or anything like that...
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

I have a seperate website so errors are displayed in a conistent way.
The processing is done in a class library, notification is sent, and
then the last step is redirecting to this page.

Can you give an example of how I could modify my class library to
display an error page that looked consistant across applications? I
think maybe our lines of thinking are on a different page.

Re: Redirecting to another site with a large querystring

am 16.04.2008 18:16:19 von vMike

"joe" wrote in message
news:8aa6d558-005a-4bd4-a489-3276c59695de@m36g2000hse.google groups.com...
> Hello,
> I have a website set up on our server that is especially for errors.
> When another website encounters an error, it will redirect to this
> site with error details in the querystring. The error website process
> the querystring and displays a nicely formatted error message with
> details.
>
> The problem I am having is that the querystrings are getting too long
> and I am unable to successfully redirect to the error site. What are
> my options other than using querystrings? The error website is a
> separate project from all of my other websites, so I think that cuts
> down on my options. I would prefer not to have to do anything
> database-wise.
>
> Thanks!

You might look into HttpWebRequest and HttpWebResponse to handle this.
Mike

Re: Redirecting to another site with a large querystring

am 16.04.2008 18:27:14 von NoSpamMgbworld

Seeing that the reason for a separate site is for consistency tells me that
the majority of your code that does work is in your ASP.NET pages, which is
an issue.

The easiest way to set up consistency is to use the same controls to display
the errors. This will consist of a processing library (in most cases) and a
control. The control can be a user control, which you copy to each site, or
you can create a server control. A user control is faster, but you have to
remember to include it. If you use a server control, you can place the bits
in the GAC and force all apps to use the latest. This will make it so you do
not have to update multiple sites when you change the error methodology,
which is why I assume you are doing a separate site.

As for continuing the way you are doing it, consider sending the information
in a form collection that you build. It is a bit more consuming, but you can
send as much FUD as you need. I would consider this an interim step, at
best.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"joe" wrote in message
news:8aa6d558-005a-4bd4-a489-3276c59695de@m36g2000hse.google groups.com...
> Hello,
> I have a website set up on our server that is especially for errors.
> When another website encounters an error, it will redirect to this
> site with error details in the querystring. The error website process
> the querystring and displays a nicely formatted error message with
> details.
>
> The problem I am having is that the querystrings are getting too long
> and I am unable to successfully redirect to the error site. What are
> my options other than using querystrings? The error website is a
> separate project from all of my other websites, so I think that cuts
> down on my options. I would prefer not to have to do anything
> database-wise.
>
> Thanks!

Re: Redirecting to another site with a large querystring

am 16.04.2008 18:43:24 von mark

"joe" wrote in message
news:1ced92bd-9165-47eb-9f29-a7447344aef6@e39g2000hsf.google groups.com...

> I have a seperate website so errors are displayed in a conistent way.
> The processing is done in a class library, notification is sent, and
> then the last step is redirecting to this page.

I realise *what* you're doing - I just don't understand *why*... :-) N.B.
I'm not saying that you are wrong or that your method is bad...

> Can you give an example of how I could modify my class library to
> display an error page that looked consistant across applications? I
> think maybe our lines of thinking are on a different page.

1) Create a new project called e.g. errors

2) Add a web page (e.g. error.aspx) which will display the error to the
user.

3) Add a public class which will handle your processing logic - include a
public method called e.g. ProcessError

4) Add the project to any solution which needs it - this is even easier if
you're using a source control solution e.g. Visual SourceSafe 2005...

5) In your code-behind, include standard try...catch and/or
try...catch...finally exception handling which will call the ProcessError
method and, finally, Response.Redirect to error.aspx which will display the
error to the user.

6) Add code in the "main" sites' Application_Error method in Global.asax to
catch any unhandled exceptions.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: Redirecting to another site with a large querystring

am 16.04.2008 22:48:43 von joe

On Apr 16, 11:43=A0am, "Mark Rae [MVP]" wrote:
> "joe" wrote in message
>
> news:1ced92bd-9165-47eb-9f29-a7447344aef6@e39g2000hsf.google groups.com...
>
> > I have a seperate website so errors are displayed in a conistent way.
> > The processing is done in a class library, notification is sent, and
> > then the last step is redirecting to this page.
>
> I realise *what* you're doing - I just don't understand *why*... :-) N.B.
> I'm not saying that you are wrong or that your method is bad...
>
> > Can you give an example of how I could modify my class library to
> > display an error page that looked consistant across applications? =A0I
> > think maybe our lines of thinking are on a different page.
>
> 1) Create a new project called e.g. errors
>
> 2) Add a web page (e.g. error.aspx) which will display the error to the
> user.
>
> 3) Add a public class which will handle your processing logic - include a
> public method called e.g. ProcessError
>
> 4) Add the project to any solution which needs it - this is even easier if=

> you're using a source control solution e.g. Visual SourceSafe 2005...
>
> 5) In your code-behind, include standard try...catch and/or
> try...catch...finally exception handling which will call the ProcessError
> method and, finally, Response.Redirect to error.aspx which will display th=
e
> error to the user.
>
> 6) Add code in the "main" sites' Application_Error method in Global.asax t=
o
> catch any unhandled exceptions.
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net


Thanks for the input. My setup is similar to how you mention, except
I didn't realize I could include entire web forms in a class library.
I am a going to dabble with that now. Thanks!

Re: Redirecting to another site with a large querystring

am 16.04.2008 22:59:30 von joe

On Apr 16, 11:43=A0am, "Mark Rae [MVP]" wrote:
> "joe" wrote in message
>
> news:1ced92bd-9165-47eb-9f29-a7447344aef6@e39g2000hsf.google groups.com...
>
> > I have a seperate website so errors are displayed in a conistent way.
> > The processing is done in a class library, notification is sent, and
> > then the last step is redirecting to this page.
>
> I realise *what* you're doing - I just don't understand *why*... :-) N.B.
> I'm not saying that you are wrong or that your method is bad...
>
> > Can you give an example of how I could modify my class library to
> > display an error page that looked consistant across applications? =A0I
> > think maybe our lines of thinking are on a different page.
>
> 1) Create a new project called e.g. errors
>
> 2) Add a web page (e.g. error.aspx) which will display the error to the
> user.
>
> 3) Add a public class which will handle your processing logic - include a
> public method called e.g. ProcessError
>
> 4) Add the project to any solution which needs it - this is even easier if=

> you're using a source control solution e.g. Visual SourceSafe 2005...
>
> 5) In your code-behind, include standard try...catch and/or
> try...catch...finally exception handling which will call the ProcessError
> method and, finally, Response.Redirect to error.aspx which will display th=
e
> error to the user.
>
> 6) Add code in the "main" sites' Application_Error method in Global.asax t=
o
> catch any unhandled exceptions.
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

Maybe I'm not understanding correctly - it sounds like you are
advising me to have two web projects in the same solution - one that
contains my error.aspx and ProcessError method, and another which is
my "main" project. Is this correct? If so, how am I supposed to
redirect from a form in one project to the error.aspx form in another?

Re: Redirecting to another site with a large querystring

am 17.04.2008 00:54:57 von mark

"joe" wrote in message
news:56f95b3c-f422-4475-824d-94eadfc3c4bf@t12g2000prg.google groups.com...

> Maybe I'm not understanding correctly - it sounds like you are
> advising me to have two web projects in the same solution - one that
> contains my error.aspx and ProcessError method, and another which is
> my "main" project. Is this correct? If so, how am I supposed to
> redirect from a form in one project to the error.aspx form in another?

The second project is really just somewhere to store the error files...

With a source control such as Visual SourceSafe you simply drag the "shared"
files into whichever project needs them. That way, you can edit the shared
files in any of the projects in which they are used, and that will
automatically update them in all other projects in which they are used...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: Redirecting to another site with a large querystring

am 17.04.2008 15:06:07 von joe

On Apr 16, 5:54=A0pm, "Mark Rae [MVP]" wrote:
> "joe" wrote in message
>
> news:56f95b3c-f422-4475-824d-94eadfc3c4bf@t12g2000prg.google groups.com...
>
> > Maybe I'm not understanding correctly - it sounds like you are
> > advising me to have two web projects in the same solution - one that
> > contains my error.aspx and ProcessError method, and another which is
> > my "main" project. =A0Is this correct? =A0If so, how am I supposed to
> > redirect from a form in one project to the error.aspx form in another?
>
> The second project is really just somewhere to store the error files...
>
> With a source control such as Visual SourceSafe you simply drag the "share=
d"
> files into whichever project needs them. That way, you can edit the shared=

> files in any of the projects in which they are used, and that will
> automatically update them in all other projects in which they are used...
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

I see. Thank you for your advice!