Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Console application with Asp.Net Project

Console application with Asp.Net Project

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasesysadmin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    slSoftware
    wrote on last edited by
    #1

    Hi All, Im created web application using .net 2008, and its hosted and working fine, now i created a another console application to my same solution as new project, i did some stuff there,added the reference from backend classes, its also woring fine. My requirement is set that console application to SQL job, so i did that by setting my local solution path (ex- E:D:\Test\WebApp\Console\Test.exe). its working fine too. :) My problem is when i host this console application with web project, how can set the reference to console application?. I created sub folder for console application inside my web project in hosting server, then added the console exe and app.config file, but that time my sql job is not working , should i add bin folder there? what is the path should i follow? Pls give some ideas? Thanks

    N 1 Reply Last reply
    0
    • S slSoftware

      Hi All, Im created web application using .net 2008, and its hosted and working fine, now i created a another console application to my same solution as new project, i did some stuff there,added the reference from backend classes, its also woring fine. My requirement is set that console application to SQL job, so i did that by setting my local solution path (ex- E:D:\Test\WebApp\Console\Test.exe). its working fine too. :) My problem is when i host this console application with web project, how can set the reference to console application?. I created sub folder for console application inside my web project in hosting server, then added the console exe and app.config file, but that time my sql job is not working , should i add bin folder there? what is the path should i follow? Pls give some ideas? Thanks

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Think about it. With a web project, all of the code is executed a web server in a room somewhere in the world. A console app would execute on that same machine, if it were even allowed. Who would see the app?


      I know the language. I've read a book. - _Madmatt

      S 1 Reply Last reply
      0
      • N Not Active

        Think about it. With a web project, all of the code is executed a web server in a room somewhere in the world. A console app would execute on that same machine, if it were even allowed. Who would see the app?


        I know the language. I've read a book. - _Madmatt

        S Offline
        S Offline
        slSoftware
        wrote on last edited by
        #3

        i used that console app for some sort of mail sending mechanism, as i said i have set that console for SQL job already its wroking, what i really need to know is how can host that console in the same project?

        N 1 Reply Last reply
        0
        • S slSoftware

          i used that console app for some sort of mail sending mechanism, as i said i have set that console for SQL job already its wroking, what i really need to know is how can host that console in the same project?

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          indSoftware wrote:

          how can host that console in the same project

          You can't, shouldn't, and it makes no sense to even try doing so. See my previous explanation. If you simple want to execute code you don't need a console app to do so. Create a library and call class/method as necessary.


          I know the language. I've read a book. - _Madmatt

          S 1 Reply Last reply
          0
          • N Not Active

            indSoftware wrote:

            how can host that console in the same project

            You can't, shouldn't, and it makes no sense to even try doing so. See my previous explanation. If you simple want to execute code you don't need a console app to do so. Create a library and call class/method as necessary.


            I know the language. I've read a book. - _Madmatt

            S Offline
            S Offline
            slSoftware
            wrote on last edited by
            #5

            ok thx for your reply, if i create a class library how can set that it to SQL job for daily scheduling. Thanks.

            N 1 Reply Last reply
            0
            • S slSoftware

              ok thx for your reply, if i create a class library how can set that it to SQL job for daily scheduling. Thanks.

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              The same way did in the console app. Seriously, you need stop and learn a bit more about the differences between console app, web apps and class libraries.


              I know the language. I've read a book. - _Madmatt

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups