Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging Problem
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00868720
Message ID:
00870594
Views:
19
Clay,

At this point, I would recommend setting a breakpoint in your ASP.NET project that will call the Business Object class. Start stepping from there and see where it takes you. Make sure to use F11 to step into each line and not step over sections of code.

>Cathi,
>
>I got around to breaking out the ASP.NET project into its own solution. I removed it from the original solution and then created it as its own separate solution. Well, now my OTS Business.dll does appear in my Moduels window but I still cannot debug...the breakpoint is never hit. I can go back to my original project and my call to my business object from my Winforms does hit the breakpoint as it always has.
>
>
>>Clay,
>>
>>Solutions don't mean anything when you are compiling your projects. Since you said that you have a MySolutions.exe, then I am assuming that you have a MySolutions project inside of your solution. Try breaking out your projects into two different solutions. One for your Winform application and another for your ASP.NET application. The same business object project can be used in both. Set your start page for your ASP.NET application and then test it.
>>
>>>Cathi,
>>>
>>>MySolution contains four projects. Two are business object projects. The other two are my ASP.NET WebForm project and my Windows Forms project.
>>>
>>>My Windows Forms project is my startup project. Is that what you mean by saying "If the MySolutions project is an ASP.NET..."?
>>>
>>>>Clay,
>>>>
>>>>If the MySolutions project is an ASP.NET Webform Application, then the resulting assembly should be compiled to a DLL.
>>>>
>>>>>Cathi,
>>>>>
>>>>>One other difference I noticed is that when I created my test ASP.NET project and added a reference to my business object...I wasn't presented with my business object as an existing project to "select" from the "Projects" tab of the "Add References" window. Obviously because it wasn't part of a solution I assume. So, I just browsed to ...\ots business\bin\debug\ots business.dll and selected that.
>>>>>
>>>>>After realizing this I went to my solution's ASP.NET project, removed the reference to my business object (that was originally to ots buinsess as listed in the project window of Add Reference>Projects tab). I then added the reference to the actual DLL like I did in my test project as described above but that didn't make any differece...still do not hit the breakpoint.
>>>>>
>>>>>
>>>>>
>>>>>>Clay,
>>>>>>
>>>>>>Your business object assembly should show up in the modules window. What I would do is create a new ASP.NET project and reference the business object assembly. Write one line or two lines of code in the ASP.NET page to use a class. Set a breakpoint in the ASP.NET page and look at the modules window. Make sure you can step through the referenced assembly. That will confirm that there is something strange with your project.
>>>>>>
>>>>>>>Yes, after I completed the "Stepping through MM .NET Code in the Debugger" the MMF symbols did show up in the Modules window with "Symbols loaded." in the info column.
>>>>>>>
>>>>>>>>Clay,
>>>>>>>>
>>>>>>>>Where you able to get the MMF symbols to show successfully in the Modules window?
>>>>>>>>
>>>>>>>>>Cathi,
>>>>>>>>>
>>>>>>>>>Okay, did that but still same result. I can debug my business object just fine as always when called from winforms but still cannot when called from aspx.cs files.
>>>>>>>>>
>>>>>>>>>I tried a few other things by adding what I think are other appropriate search paths for the "Debug Symbol Files" as well as adding search paths for "Debug Source Files".
>>>>>>>>>
>>>>>>>>>I don't have my solution/projects saved in the default VS.NET directory. I have a directory structure like this:
>>>>>>>>>
>>>>>>>>>c:\vss
>>>>>>>>>      \client name
>>>>>>>>>                  \application name
>>>>>>>>>.
>>>>>>>>>.
>>>>>>>>>.
>>>>>>>>>
>>>>>>>>>I use MS Visual Source Safe and use the "subst" command to create a drive letter for cleaner pathing. Could this have anything to do with my problem? The paths that I mentioned adding were to all of the \obj\debug and \bin\debug directories withing my current application's directory structure.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Clay,
>>>>>>>>>>
>>>>>>>>>>Add the symbols for the Mere Mortals Framework. The instructions to do that is in the Dev Guide with the title called "Stepping through MM .NET Code in the Debugger".
>>>>>>>>>>
>>>>>>>>>>>Cathi,
>>>>>>>>>>>
>>>>>>>>>>>No I don't. Below is how my solution is structured (abbreviated a bit of course). Hopefully this helps a bit. Below this solution structure is what I see in my Modules window. Thanks for your help on this!
>>>>>>>>>>>
>>>>>>>>>>>- Solution 'MySolution' (4 projects)
>>>>>>>>>>>  - IEICustomTools
>>>>>>>>>>>    - References
>>>>>>>>>>>      - Mere Mortals...
>>>>>>>>>>>      - System...
>>>>>>>>>>>
>>>>>>>>>>>  - MainSystem   <-- this is the startup project
>>>>>>>>>>>    - References
>>>>>>>>>>>      - Mere Mortals...
>>>>>>>>>>>      - System...
>>>>>>>>>>>      - IEICustomTools
>>>>>>>>>>>      - MyBusinessObjects
>>>>>>>>>>>
>>>>>>>>>>>  - MainSystemWebReports  <-- this is my ASP.NET project
>>>>>>>>>>>    - References
>>>>>>>>>>>      - Mere Mortals...
>>>>>>>>>>>      - System...
>>>>>>>>>>>      - MyBusinessObjects
>>>>>>>>>>>
>>>>>>>>>>>  - MyBusinessObjects
>>>>>>>>>>>    - References
>>>>>>>>>>>      - Mere Mortals...
>>>>>>>>>>>      - System...
>>>>>>>>>>>
>>>>>>>>>>>Modules window content:
>>>>>>>>>>>
>>>>>>>>>>>Name
>>>>>>>>>>>---------------
>>>>>>>>>>>mscorlib.dll  .... No symbols loaded.
>>>>>>>>>>>MySolution.exe  .... Symbols loaded.
>>>>>>>>>>>mere mortals framework.dll  .... No symbols loaded.
>>>>>>>>>>>system.windows.forms.dll  .... No symbols loaded.
>>>>>>>>>>>mere mortals framework windows forms.dll  .... No symbols loaded.
>>>>>>>>>>>system.dll  .... No symbols loaded.
>>>>>>>>>>>mere mortals framework interfaces.dll  .... No symbols loaded.
>>>>>>>>>>>system.drawing.dll  .... No symbols loaded.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>Clay,
>>>>>>>>>>>>
>>>>>>>>>>>>Do you see the assembly in the Modules Windows in the Winforms app?
>>>>>>>>>>>>
>>>>>>>>>>>>>Cathi,
>>>>>>>>>>>>>
>>>>>>>>>>>>>Hmm, this is strange. Why would I be able to debug my business objects just fine when they're called from winforms though? I've no doubt you're right that a reference should be present in the Modules window but it doesn't make sense how I can debug from winform calls to my business objects but not from my aspx.cs file calls to the very same business objects.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>Clay,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Then you should see a reference to the assembly in the Modules window.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Cathi,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Yes I do have a reference to my biz objects in my main project. I don't think any of my code would work if it wasn't anyway right? That's not the case though as I can run my app just fine and even debug myi biz objects just fine but only when they're called form winforms. If I call the exact same biz object from my aspx.cs files that's when I cannot debug...no errors, just flies right through the code and ignores my breakpoints. I've even deleted the bin and obj folders, rebuilt, etc...so the .pdb files shouldn't be corrupt at this point now.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Clay,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>You should see it appear if the objects are used. The symbols load for an assembly referenced in your main project. Do you have a reference to your business objects assembly in your main project? You set the reference in "References" section of the Project in the Solutions Manager.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Cathi,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>The only line which reads "Symbols loaded." in the information column is "mysolutionname.exe". All of the other line items are either .NET framework dlls or MM.NET dlls. So, in other words I don't see a line referring to "mybusinessobject.dll". I've looked at this before and just assumed that since my business objects project is within my solution that I should not expect to see it listed singly here in the Modules window.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Clay,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>What I would recommend doing is to open the Modules Windows during debug and check to see if the symbols of the business object assembly are getting loaded. If not, then the PDB file of the business object assembly is either missing or corrupted.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>Hi Cathi,
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>There are a number of business object class files that are all in their own project. The webforms (and winforms) are each in their own project and all are part of the same solution.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>Hi Clay,
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>Is the business object class file in another project or the same as the webform project?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>I have a code behind file (myfile.aspx.cs) that I cannot debug...or maybe I should say that I have a business object (mybizobj.cs) that I call from myfile.aspx.cs. It is this mybizobj.cs file that I cannot debug when it is called from myfile.aspx.cs. However, if I call mybizobj.cs from one of my Windows Forms I can debug mybizobj.cs perfectly.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>My web.config contains "debug=true" in the compilation element. My Solution Configuration is set to "Debug" and not "Release". I've pounded on Google all day and searched the threads here without an answer. Any help is greatly appreciated.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>>>>>>>Clay
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform