Solved

inner sql exception error

Posted on 2009-04-08
6
394 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now