15 Ocak 2007 Pazartesi

ASP Net Error: Response is not available in this context

When using the response object from an aspx page, its codebehind class or a
user control, the response object is directly available because all these
derive from the page object more or less distant.

When using the response object in your own class, the object is not readily
available, but you can still access it:

HttpContext.Current.Response.Write("Hello World");

System.Threading.ThreadAbortException

try/catch bloğundan başka işleme transfer olamazsınız.
Response.redirect ,trycatch içinde kullanmamalısınız.Kullanacaksanız;
catch(Exception ex)
{
if (ex.GetType().FullName!="System.Threading.ThreadAbortException")
{
}//if
{
}//catch
Yakalanan hatanın System.Threading.ThreadAbortException olmaması gerekiyor.

System.ArgumentException: Redirect URI cannot contain newline characters.

Redirect URI cannot contain newline characters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Redirect URI cannot contain newline characters.
.

Çözüm(Solution)in C#:
string url;
url=url.Replace("\n"," ");


İfadedeki boşlukla yerini değiştirmek.