?
Solved

Break point not hitting on Response.Redirect

Posted on 2012-03-30
59
Medium Priority
?
489 Views
Last Modified: 2012-03-30
I am getting an error on following line which is forwarded to some other page ...

  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)
                              

Open in new window



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!
0
Comment
Question by:PeteEngineer
[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
  • 34
  • 25
59 Comments
 
LVL 6

Expert Comment

by:ingriT
ID: 37785931
Have you tried just using the line;

Response.Redirect(strReportServer & "/TPFolderRedirect.aspx")

Open in new window


to see if the line in the redirect has a syntax error?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786041
errror :


The parameterized query '(@StyleID varchar(40))SELECT Variation FROM pStyleDevelopmentIte' expects the parameter '@StyleID', which was not supplied.
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786043
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?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786045
No that error is different :

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)

Open in new window

0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786048
s the breakpoint in your Page_Load hitting this time?

No still not
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786084
I think the error says it all;

'OwnerGroup' column does not exist in the query you are doing on the TPFolderRedirect page.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786095
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?
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786273
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?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786276
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
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786283
I found page load call getsqlreport and this calls loadxml

and there is a line may cousing the issue shown below :

        ReportTableInsert(conConnection, XmlId, objXmlHandler.DataColumnNumber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786287
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.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786290
From the profiler i found something like below:

exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75-42cf-a21a-e7840f1180a9',@DataColumnNumber=1,@DataColumnName=N'StyleType',@DataHeader=N'Style Type',@DataValue=N'Apparel',@DataSort='1'
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786293
Not the profiler, just run the query that you execute on your page and see the results.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786298
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?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786305
I think the one i posted above is the query :

ReportTableInsert(conConnection, XmlId, objXmlHandler.DataColumnNumber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)

exec spx_ReportTable_INSERT @DataXmlID='4c9e7128-2d75-42cf-a21a-e7840f1180a9',@DataColumnNumber=1,@DataColumnName=N'StyleType',@DataHeader=N'Style Type',@DataValue=N'Apparel',@DataSort='1


but in the above query there is no column name called "OwnerGroup"

Will be there any other queries causing the issue ?
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786308
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".
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786377
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?
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786383
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.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786384
Please see the attached funtion as per the flow :
Pageload
GetSQLReport
LoadXML
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786429
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.
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786434
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)?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786446
Please provide your email
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786450
No. If you can't post the code, I can't help you.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786467
OK please find attached
ClickingPage
RedirectedPage
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786495
Oké, have you tried putting a breakpoint on this line ;     strTeamId = Request.QueryString("TID") in the RedirectedPage?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786503
Yes ..it is not hitting ...
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786505
Oké, if you put a breakpoint on this line 'InitControlLibrary(Request.Cookies("User"))' in the ClickingPage, and then reloading the page, is this breaking?

If not, some configuration in your visual studio is messed up.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786528
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.ImageClickEventArgs) 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
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786540
Oke, so we have this function:

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

Open in new window


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?)
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786555
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/TechPackFolderRedirect.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.
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786571
I know, you should pass the parameters, but when you redirect, the redirect goes to this 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
         

Open in new window


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")

Open in new window


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.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786575
Hope u understood

there is a project where current files posted exists ..

but the page which is redirecting is in another project
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786586
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)

Open in new window

0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786595
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786596
If it is another project, is it running then for debug as well at the same time?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786602
and TPFolderRedirect and TechPackFolderRedirect

are same ..i just changed the page names ...
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786607
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?
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786611
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?
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786622
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
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786626
No, you should check that. And try running both projects at the same time.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786668
Yes it hit now in the redirected page
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786672
:-) ..now what to do where to check the value :-)
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786675
I'm glad!
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786680
Step trough the debugging and see on which line the error occurs.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786686
ok..problem is from this line :


        ReportTableInsert(conConnection, XmlId, objXmlHandler.DataColumnNumber, objXmlHandler.DataColumn, objXmlHandler.DataHeader, objXmlHandler.DataValue, i)
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786690
Step into that function (with F11, not F10 when the line is hit) and see on which line in that method it breaks.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786712
Cannot insert the value NULL into column 'StyleID', table 'almOn4.2.x.dbo.rReportTable'; column does not allow nulls. INSERT fails. The statement has been terminated.

this is the actual error
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786726
Is that the error for this redirect?
Response.Redirect(strReportServer & "/TPFolderRedirect.aspx")

Open in new window


Put back your original one.

And go debug your query.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786730
But there is not styleid coumn in  rReportTable  :-(
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786745
Is that the error for this redirect?

Nooo ...this error is for original one only
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786746
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.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786758
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?
0
 
LVL 6

Accepted Solution

by:
ingriT earned 2000 total points
ID: 37786770
Cannot insert the value NULL into column 'StyleID', table 'almOn4.2.x.dbo.rReportTable'; column does not allow nulls. INSERT fails. The statement has been terminated.

Your table rReportTable DOES have a column StyleID and there is a constraint that will not allow a NULL value, so you can only insert a record if you do specify this column.

INSERT INTO rRptTable (DataXmlId, DataColumnNumber, DataColumnName, DataHeader, DataValue, DataSort, StyleId) 
            VALUES 
            (@DataXmlId, @DataColumnNumber, @DataColumnName, @DataHeader, @DataValue, @DataSort, 1)

Open in new window


will probably work. But you should get the appropriate value for StyleId
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786790
Your table rReportTable DOES have a column StyleID

No i checked all columns and no    StyleID :-(


    colFields.Add(String.Format("pkiStyleID|{0}", strStyleId))  

anywhere above line causing error?
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786800
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.
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786811
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 ...


Yipeeeeeeeeeeeeeeeeeeeeeeeeeee!
0
 
LVL 8

Author Comment

by:PeteEngineer
ID: 37786824
Thanks for the help ..i will give the entire 500 point ..i might have given u 5000 but no way its max 500 :-D
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786830
Happy programming ;)
0
 
LVL 8

Author Closing Comment

by:PeteEngineer
ID: 37786831
thanks a ton!
0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

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.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

764 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