Solved

inner sql exception error

Posted on 2009-04-08
6
391 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
Comment Utility
Please post the whole stack trace to see if we can assist..
0
 

Author Comment

by:emeraldpiggy
Comment Utility
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
Comment Utility
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 25

Accepted Solution

by:
apeter earned 55 total points
Comment Utility
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
Comment Utility
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
Comment Utility
got it fixed
when i copying the database use ssis, somehow it didnt copy few pks and fks thanks guys
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

772 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

12 Experts available now in Live!

Get 1:1 Help Now