Solved

inner sql exception error

Posted on 2009-04-08
6
405 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

749 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