How I can put aspx and .cs file in two separate projects for one application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mzmishra
    Recognized Expert Contributor
    • Aug 2007
    • 390

    How I can put aspx and .cs file in two separate projects for one application

    I would like to develope one application in (asp.net 2.0)where I like to have my aspx files in website and my .cs files in a separate project.The reason I like to put .cs in a separate project is I do not want to give .cs files to my client while deploying my application in their server.

    My problem is I like to create one debug env for these two .During the release i like to create the dll for the .cs file project in my website bin folder.

    Please help me how to do that.
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    In order to keep your code private you should compile it into a dll which you say that you are already doing. You can debug your dll files alongside your normal code behind files in Visual Studio.

    Dr B

    Comment

    • mzmishra
      Recognized Expert Contributor
      • Aug 2007
      • 390

      #3
      how to debug the dll files along with normal code behind files .
      Do I need to add both website and dll project in one solution

      Comment

      • DrBunchman
        Recognized Expert Contributor
        • Jan 2008
        • 979

        #4
        I can only go from what I do with my own web projects but if I add a reference to a dll i've written then run my website in debug I can step through the dll as if it was code behind.

        Does this work for you?

        Dr B

        Comment

        • mzmishra
          Recognized Expert Contributor
          • Aug 2007
          • 390

          #5
          I really do not know how to do that. I want the way you are doing in your project.Can you please advice me how exactly you are doing the same in your project.

          Comment

          • Sick0Fant
            New Member
            • Feb 2008
            • 121

            #6
            Originally posted by mzmishra
            I really do not know how to do that. I want the way you are doing in your project.Can you please advice me how exactly you are doing the same in your project.
            As unbelievable as it sounds, you can just open the dll in a different VS, put a breakpoint at wherever you want to step through, start both projects (F5), then when the code calls the method, it will allow you to step through the DLL's code... or at least that's what I remember. Confirmation, anyone?

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #7
              If visual studio can figure out where the source code for the "compiled dll" is located, it will allow you to debug through it.

              What I do for my own projects, is develop locally on one PC and then use the "publish" command to publish the "compiled" website to our real webserver. That way none of the backend files are on the server-side web. They get compiled into a DLL and stuck somewhere secure-like on the server computer.

              Comment

              • mzmishra
                Recognized Expert Contributor
                • Aug 2007
                • 390

                #8
                well my problem is i already have that website and .cs project pre developed and deployed in many servers(that is the requirement of my client).But noone is able to debug the application.Now they want me to set up a debug env for this.

                Any other idea?

                Comment

                • Plater
                  Recognized Expert Expert
                  • Apr 2007
                  • 7872

                  #9
                  Originally posted by mzmishra
                  well my problem is i already have that website and .cs project pre developed and deployed in many servers(that is the requirement of my client).But noone is able to debug the application.Now they want me to set up a debug env for this.

                  Any other idea?
                  Give them the source code and they can debug it with visual studio.
                  Seems like a bad idea to give your client development abilities, unless the project is open source.

                  Comment

                  • mzmishra
                    Recognized Expert Contributor
                    • Aug 2007
                    • 390

                    #10
                    the client wo n't debug the developers will debug it.

                    Comment

                    • Plater
                      Recognized Expert Expert
                      • Apr 2007
                      • 7872

                      #11
                      Originally posted by mzmishra
                      the client wo n't debug the developers will debug it.
                      Then give the developers the source code and they should be able to attach to the webapp and debug it.

                      Comment

                      Working...