PeteEngineer
asked on
Break point not hitting on Response.Redirect
I am getting an error on following line which is forwarded to some other page ...
But when i put a break point on the page load event of the page TPFolderRedirect.aspx... its not hitting.
I tried putting false as a parmeter at the end of the function.
Attach to process and attched the process ..then i dont know how to see the break point which is hit
Help me!
Response.Redirect(strReportServer & "/TPFolderRedirect.aspx?DXID=" & DataXmlId.ToString & "&SDID=" & _StyleDevelopmentId & "&SID=" & StyleId & _
"&RTPID=" & ReportTPFolderId & "&SV=" & Request.QueryString("SV") & "&SSID=" & Me._StyleSourcingID & _
"&TID=" & Me.UserProperties.TeamID & "&SYID=" & Me._SeasonYearID & "&SN=" & Me._StyleSet)
But when i put a break point on the page load event of the page TPFolderRedirect.aspx... its not hitting.
I tried putting false as a parmeter at the end of the function.
Attach to process and attched the process ..then i dont know how to see the break point which is hit
Help me!
ASKER
errror :
The parameterized query '(@StyleID varchar(40))SELECT Variation FROM pStyleDevelopmentIte' expects the parameter '@StyleID', which was not supplied.
The parameterized query '(@StyleID varchar(40))SELECT Variation FROM pStyleDevelopmentIte' expects the parameter '@StyleID', which was not supplied.
This is an error you get from the TPFFolderRedirect.aspx page?
That means, that now you do get to that page. Is the breakpoint in your Page_Load hitting this time?
That means, that now you do get to that page. Is the breakpoint in your Page_Load hitting this time?
ASKER
No that error is different :
Shown below :
Shown below :
Error:Column 'OwnerGroup' does not belong to table Table.
Page:/almReport/TPFolderRedirect.aspx?
DXID=1a79a78b-30bc-4b35-a7b9-85381fe0988e&SDID=6dac0929-4e19-4ef1-acfc-3a367ce89eb0
&SID=dab0f156-06a8-450a-8df8-1285ab8fafee&RTPID=f1000000-0000-0000-0000-000000000010&SV=2
&SSID=3f47ed6f-584b-4cae-9ec6-6462f19d80d2
&TID=203517c2-2bd4-4ed3-9ef7-ac37de447321
&SYID=60f5b984-9def-4cb4-af17-387e2719f28b&SN=1
Exeption:System.ArgumentException
System.Data
Trace: at System.Data.DataRow.GetDataColumn(String columnName) at System.Data.DataRow.get_Item(String columnName)
at almCore.FormHandler.GetReportSqlControls()
at alm2Report.TPFolderRedirect.LoadXMLFile(Object XmlId)
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 339
at alm2Report.TPFolderRedirect.GetSqlReport()
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 658
at alm2Report.TPFolderRedirect.Page_Load(Object sender, EventArgs e)
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 155
at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
ASKER
s the breakpoint in your Page_Load hitting this time?
No still not
No still not
I think the error says it all;
'OwnerGroup' column does not exist in the query you are doing on the TPFolderRedirect page.
'OwnerGroup' column does not exist in the query you are doing on the TPFolderRedirect page.
ASKER
There is no column names in any of my database table named ownergroup
i think its from dataset...how to solve it either ..without even seeing a break point?
i think its from dataset...how to solve it either ..without even seeing a break point?
Have you tried this?
http://www.sidesofmarch.com/index.php/archive/2007/03/19/debugging-visual-studio-2005-web-applications-with-firefox/
And I think you are trying to do a query on a column named OwnerGroup or you are getting a column named OwnerGroup from your recordset. Do you have some code to post?
http://www.sidesofmarch.com/index.php/archive/2007/03/19/debugging-visual-studio-2005-web-applications-with-firefox/
And I think you are trying to do a query on a column named OwnerGroup or you are getting a column named OwnerGroup from your recordset. Do you have some code to post?
ASKER
I am getting a column named OwnerGroup from your recordset
Why u posted that link,its all about making a defualt browser in Visual Studio
Yes i have code to post
Why u posted that link,its all about making a defualt browser in Visual Studio
Yes i have code to post
ASKER
I found page load call getsqlreport and this calls loadxml
and there is a line may cousing the issue shown below :
ReportTableInsert(conConne ction, XmlId, objXmlHandler.DataColumnNu mber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)
and there is a line may cousing the issue shown below :
ReportTableInsert(conConne
That column 'ownergroup' does not exist in your recordset according to the error you're getting. Test your query in the sql server management studio and see the results there first.
And by setting a different default browser, your breakpoint might be hit. Where did you put the breakpoint anyway? It's hard to be of help without any information.
And by setting a different default browser, your breakpoint might be hit. Where did you put the breakpoint anyway? It's hard to be of help without any information.
ASKER
From the profiler i found something like below:
exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75- 42cf-a21a- e7840f1180 a9',@DataC olumnNumbe r=1,@DataC olumnName= N'StyleTyp e',@DataHe ader=N'Sty le Type',@DataValue=N'Apparel ',@DataSor t='1'
exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75-
Not the profiler, just run the query that you execute on your page and see the results.
ASKER
i am ready to give any information you what?
How to Test your query in the sql server management studio ?
I dont know where is the query calling and what is the query...how to which line is this query?
How to Test your query in the sql server management studio ?
I dont know where is the query calling and what is the query...how to which line is this query?
ASKER
I think the one i posted above is the query :
ReportTableInsert(conConne ction, XmlId, objXmlHandler.DataColumnNu mber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)
exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75- 42cf-a21a- e7840f1180 a9',@DataC olumnNumbe r=1,@DataC olumnName= N'StyleTyp e',@DataHe ader=N'Sty le Type',@DataValue=N'Apparel ',@DataSor t='1
but in the above query there is no column name called "OwnerGroup"
Will be there any other queries causing the issue ?
ReportTableInsert(conConne
exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75-
but in the above query there is no column name called "OwnerGroup"
Will be there any other queries causing the issue ?
How did you get to this code that gives the error?
Just post the code for the .aspx and the .aspx.vb files of the page that produces the error. And on which line you put the breakpoint that it's not hitting.
You can run the query in the sql server management studio, with the button "new query".
Just post the code for the .aspx and the .aspx.vb files of the page that produces the error. And on which line you put the breakpoint that it's not hitting.
You can run the query in the sql server management studio, with the button "new query".
ASKER
You want the code for the redirected page ..in the page load?
I have posted the code already there is a problem
I guess the query string is wrong may be ..in that case it wont redirect and hit the break point in the redirected page ... what you say?
I have posted the code already there is a problem
I guess the query string is wrong may be ..in that case it wont redirect and hit the break point in the redirected page ... what you say?
I don't know what you need. Just post the complete page where you get the error. A few lines in different posts don't mean anything, I need to see the complete file to see where there could be an error.
ASKER
ASKER
The above files are from the page which is redirected
and button click event of the page has the redirect code which i pasted above.
and button click event of the page has the redirect code which i pasted above.
Can't you just paste the complete pages? For the page you come from (with the button) and the page that is redirected to (TPFolderRedirect.aspx)?
ASKER
Please provide your email
No. If you can't post the code, I can't help you.
ASKER
Oké, have you tried putting a breakpoint on this line ; strTeamId = Request.QueryString("TID") in the RedirectedPage?
ASKER
Yes ..it is not hitting ...
Oké, if you put a breakpoint on this line 'InitControlLibrary(Reques t.Cookies( "User"))' in the ClickingPage, and then reloading the page, is this breaking?
If not, some configuration in your visual studio is messed up.
If not, some configuration in your visual studio is messed up.
ASKER
Yes its hitting ..no issue in settings
I put in the following function also where my report being called:
Private Sub btnSaveNew_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEv entArgs) Handles btnSaveNew.Click
there it is hitting ..
and
response.redirect inside this function is been traversed ..then it bypasses to the end of this function ..no breakpoint in the redirected page is getting called
I put in the following function also where my report being called:
Private Sub btnSaveNew_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEv
there it is hitting ..
and
response.redirect inside this function is been traversed ..then it bypasses to the end of this function ..no breakpoint in the redirected page is getting called
Oke, so we have this function:
And it seems like the Response.Redirect is not called, because the breakpoint in the next page is not being hit, right?
What is in this strReportServer parameter? Does it redirect you from your debugging version of the code to the actual production/test server url? Or do you have your exact debugging location (something like localhost:54645 in this url in the configuration?)
Private Sub btnSaveNew_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSaveNew.Click
' Save button from the Tech Pack tab.
Dim strReportServer As String = plmOnCore.ConfigHandler.GetAppSettings(plmOnCore.ConfigHandler.AppSettings("SERVER"))("SQLServerReport")
Dim ReportTechPackFolderId As String = Me.rbTechPack.SelectedValue.ToString
Dim strSystemCultureId As String = Me.ddlLanguage1.SelectedValue
Dim StyleId As String = Me.rbSizeClass.SelectedValue.ToString
If StyleId = "Multi-Size" Then
StyleId = "00000000-0000-0000-0000-000000000000"
End If
If ReportTechPackFolderId = String.Empty Or StyleId = String.Empty Then
Else
Dim strStyleColorwaySeasonYearID As String = ""
'If strAllowSeasonality = "TRUE" Then
' strStyleColorwaySeasonYearID = Request("rbSelectColor")
' If strStyleColorwaySeasonYearID = String.Empty Then
' Dim strMsg As String = "<SCRIPT language='javascript' >alert('Select a " & strColorway & "');</SCRIPT>'"
' ClientScript.RegisterStartupScript(Me.GetType(), "ALERT", strMsg)
' Exit Sub
' End If
'End If
Dim DataXmlId As Guid = Guid.NewGuid
TechPackStyleDevelopmentInsert(DataXmlId.ToString, StyleId, strStyleColorwaySeasonYearID, strSystemCultureId)
Response.Redirect(strReportServer & "/TechPackFolderRedirect.aspx?DXID=" & DataXmlId.ToString & "&SDID=" & _StyleDevelopmentId & "&SID=" & StyleId & _
"&RTPID=" & ReportTechPackFolderId & "&SV=" & Request.QueryString("SV") & "&SSID=" & Me._StyleSourcingID & _
"&TID=" & Me.UserProperties.TeamID & "&SYID=" & Me._SeasonYearID & "&SN=" & Me._StyleSet)
End If
End Sub
And it seems like the Response.Redirect is not called, because the breakpoint in the next page is not being hit, right?
What is in this strReportServer parameter? Does it redirect you from your debugging version of the code to the actual production/test server url? Or do you have your exact debugging location (something like localhost:54645 in this url in the configuration?)
ASKER
strReportServer seems like my project name in visual studio where the reports are there ,, all reports are there inside that project...
I cannot check like reportproject/TechPackFold erRedirect .aspx because the page must passed with parameters ...
when i not passed parmeters i got the error like below as i said in the first post :
The parameterized query '(@StyleID varchar(40))SELECT Variation FROM pStyleDevelopmentIte' expects the parameter '@StyleID', which was not supplied.
I cannot check like reportproject/TechPackFold
when i not passed parmeters i got the error like below as i said in the first post :
The parameterized query '(@StyleID varchar(40))SELECT Variation FROM pStyleDevelopmentIte' expects the parameter '@StyleID', which was not supplied.
I know, you should pass the parameters, but when you redirect, the redirect goes to this url:
This URL starts with the strReportServer variable, that is set from your config in the first line of your method:
If this string in your configuration setting (in the web.config, or an app.config or something) does not have the same value as the website you are debugging in (see you address bar for something like localhost:23232) then your breakpoint in the other page will never hit, because you are going to another url.
strReportServer & "/TechPackFolderRedirect.aspx?DXID=" & DataXmlId.ToString & "&SDID=" & _StyleDevelopmentId & "&SID=" & StyleId & _
"&RTPID=" & ReportTechPackFolderId & "&SV=" & Request.QueryString("SV") & "&SSID=" & Me._StyleSourcingID & _
"&TID=" & Me.UserProperties.TeamID & "&SYID=" & Me._SeasonYearID & "&SN=" & Me._StyleSet
This URL starts with the strReportServer variable, that is set from your config in the first line of your method:
Dim strReportServer As String = plmOnCore.ConfigHandler.GetAppSettings(plmOnCore.ConfigHandler.AppSettings("SERVER"))("SQLServerReport")
If this string in your configuration setting (in the web.config, or an app.config or something) does not have the same value as the website you are debugging in (see you address bar for something like localhost:23232) then your breakpoint in the other page will never hit, because you are going to another url.
ASKER
Hope u understood
there is a project where current files posted exists ..
but the page which is redirecting is in another project
there is a project where current files posted exists ..
but the page which is redirecting is in another project
ASKER
u can see from the error the exact url
Error:Column 'OwnerGroup' does not belong to table Table.
Page:/almReport/TPFolderRedirect.aspx?
DXID=1a79a78b-30bc-4b35-a7b9-85381fe0988e&SDID=6dac0929-4e19-4ef1-acfc-3a367ce89eb0
&SID=dab0f156-06a8-450a-8df8-1285ab8fafee&RTPID=f1000000-0000-0000-0000-000000000010&SV=2
&SSID=3f47ed6f-584b-4cae-9ec6-6462f19d80d2
&TID=203517c2-2bd4-4ed3-9ef7-ac37de447321
&SYID=60f5b984-9def-4cb4-af17-387e2719f28b&SN=1
Exeption:System.ArgumentException
System.Data
Trace: at System.Data.DataRow.GetDataColumn(String columnName) at System.Data.DataRow.get_Item(String columnName)
at almCore.FormHandler.GetReportSqlControls()
at alm2Report.TPFolderRedirect.LoadXMLFile(Object XmlId)
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 339
at alm2Report.TPFolderRedirect.GetSqlReport()
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 658
at alm2Report.TPFolderRedirect.Page_Load(Object sender, EventArgs e)
in D:\Jais\JaisPLM\Trunk\Software\padawan\Application\alm2Report\TPFolderRedirect.aspx.vb:line 155
at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
ASKER
This is the url
http://6zddd3/almReport/error.aspx?EID=3f0f3eae-abbc-471a-acbb-71bd56b82e56
which i get the error
http://6zddd3/almReport/error.aspx?EID=3f0f3eae-abbc-471a-acbb-71bd56b82e56
which i get the error
If it is another project, is it running then for debug as well at the same time?
ASKER
and TPFolderRedirect and TechPackFolderRedirect
are same ..i just changed the page names ...
are same ..i just changed the page names ...
ASKER
is it running then for debug as well at the same time?
means? Actually i cannot run this induvitualy as it will asks parameters from another project..that what you trying to ask?
means? Actually i cannot run this induvitualy as it will asks parameters from another project..that what you trying to ask?
If the page you have a breakpoint in is not running (on the url you are requesting it on) then it won't hit. Right?
ASKER
yes chances are there but how to check?
and if the project redirected will be from another project will it hit?
Check this :
http://stackoverflow.com/questions/8749861/response-redirect-from-one-asp-net-web-app-to-another
and if the project redirected will be from another project will it hit?
Check this :
http://stackoverflow.com/questions/8749861/response-redirect-from-one-asp-net-web-app-to-another
No, you should check that. And try running both projects at the same time.
ASKER
Yes it hit now in the redirected page
ASKER
:-) ..now what to do where to check the value :-)
I'm glad!
Step trough the debugging and see on which line the error occurs.
ASKER
ok..problem is from this line :
ReportTableInsert(conConne ction, XmlId, objXmlHandler.DataColumnNu mber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)
ReportTableInsert(conConne
Step into that function (with F11, not F10 when the line is hit) and see on which line in that method it breaks.
ASKER
Cannot insert the value NULL into column 'StyleID', table 'almOn4.2.x.dbo.rReportTab le'; column does not allow nulls. INSERT fails. The statement has been terminated.
this is the actual error
this is the actual error
Is that the error for this redirect?
Put back your original one.
And go debug your query.
Response.Redirect(strReportServer & "/TPFolderRedirect.aspx")
Put back your original one.
And go debug your query.
ASKER
But there is not styleid coumn in rReportTable :-(
ASKER
Is that the error for this redirect?
Nooo ...this error is for original one only
Nooo ...this error is for original one only
There is according to the query you are running. Go find the query or stored procedure.
Or find a colleague who does know what the code does.
Or find a colleague who does know what the code does.
ASKER
yes i found
INSERT INTO rRptTable (DataXmlId, DataColumnNumber, DataColumnName, DataHeader, DataValue, DataSort)
VALUES
(@DataXmlId, @DataColumnNumber, @DataColumnName, @DataHeader, @DataValue, @DataSort)
This is what its doing ..there is no styleid here inserting as NULL
then where the error here?
INSERT INTO rRptTable (DataXmlId, DataColumnNumber, DataColumnName, DataHeader, DataValue, DataSort)
VALUES
(@DataXmlId, @DataColumnNumber, @DataColumnName, @DataHeader, @DataValue, @DataSort)
This is what its doing ..there is no styleid here inserting as NULL
then where the error here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your table rReportTable DOES have a column StyleID
No i checked all columns and no StyleID :-(
colFields.Add(String.Forma t("pkiStyl eID|{0}", strStyleId))
anywhere above line causing error?
No i checked all columns and no StyleID :-(
colFields.Add(String.Forma
anywhere above line causing error?
I don't know, really. I think I've been of enough help. Maybe you should hire someone with enough knowledge to help you solve this.
ASKER
Owkay ..i found out
there is a same tablename in another database which have a styleid
this is causing error ...
so either i need to drop this table or pass style id in the SQL ...
Yipeeeeeeeeeeeeeeeeeeeeeee eeee!
there is a same tablename in another database which have a styleid
this is causing error ...
so either i need to drop this table or pass style id in the SQL ...
Yipeeeeeeeeeeeeeeeeeeeeeee
ASKER
Thanks for the help ..i will give the entire 500 point ..i might have given u 5000 but no way its max 500 :-D
Happy programming ;)
ASKER
thanks a ton!
Open in new window
to see if the line in the redirect has a syntax error?