Solved

inner sql exception error

Posted on 2009-04-08
6
408 Views
Last Modified: 2012-05-06
hi
there is an error in my application which never happens before. can anyone plz tell me what might be wrong with my application?
thanks in advance

error msg
Event save Fail Please try again. An data access error occured, please check inner SqlException error.
0
Comment
Question by:emeraldpiggy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 25

Assisted Solution

by:reb73
reb73 earned 70 total points
ID: 24103093
Please post the whole stack trace to see if we can assist..
0
 

Author Comment

by:emeraldpiggy
ID: 24103865
Source Error:

Line 1639:
Line 1640:        Session.Clear();
Line 1641:        Response.Redirect("EventEntryWizard.aspx?mesg=" + lblMesg.Text, false);
Line 1642:
Line 1643:    }


Source File: d:\wwwsites\platinumtv.com.au\subdomain\trademark\EventEntryWizard.aspx.cs    Line: 1641

Stack Trace:

[ArgumentException: Redirect URI cannot contain newline characters.]
   System.Web.HttpResponse.Redirect(String url, Boolean endResponse) +8704249
   EventEntryWizard.Wizard1_FinishButtonClick(Object sender, WizardNavigationEventArgs e) in d:\wwwsites\platinumtv.com.au\subdomain\trademark\EventEntryWizard.aspx.cs:1641
   System.Web.UI.WebControls.Wizard.OnFinishButtonClick(WizardNavigationEventArgs e) +108
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +641
   System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
0
 

Author Comment

by:emeraldpiggy
ID: 24103880
to reb73 here goes more

 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.
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 25

Accepted Solution

by:
apeter earned 55 total points
ID: 24104808
what is the actual value( lblMesg.Text) you are trying to pass ? If you trying to store the same in SQL then check whether the query string contains characters which are supported in SQL. IF there are some then you have remove them. If you still want to keep those then you have some sort of custom encoding and decoding of these values.
0
 
LVL 25

Assisted Solution

by:reb73
reb73 earned 70 total points
ID: 24109429
Try wrapping lblMesg.Text within Server.URLEncode function which should translate characters that are illegal in URLs..

For e.g change the relevant line as follows -

Line 1641:        Response.Redirect("EventEntryWizard.aspx?mesg=" + Server.URLEncode(lblMesg.Text), false);


See link below for URLEncode function reference -

http://msdn.microsoft.com/en-us/library/zttxte6w.aspx
0
 

Author Closing Comment

by:emeraldpiggy
ID: 31568315
got it fixed
when i copying the database use ssis, somehow it didnt copy few pks and fks thanks guys
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question