Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5928535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:18:12+00:00 2026-05-22T14:18:12+00:00

I have a ASP Net project of the type Windows Service. When I build

  • 0

I have a ASP Net project of the type Windows Service.

When I build that project an exe file is generated.

Now I also have another project os the type Web Service, that uses classes from the previous Windows Service project.

When I build the Web Service, on it’s bin/debug folder, the Windows Service exe is there, instead of a DLL.

This way, when I deploy the Web Service on ISS, I get an exception when the part of the code that instatiates a class on the Windows Service project is executed.

The only whay I found to solve this issue, is to make the output type of the Windows Service to DLL instead of EXE, and the Web Service runs correctly.

But, of course, when I try to install the Windows Service, I get this error:

enter image description here

Can I even do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:18:13+00:00Added an answer on May 22, 2026 at 2:18 pm

    Windows Services and web services are different project types. You cannot run the same executable. You have to options:

    1. Either you put the common code into a class library and create a project for the windows service and one for the webservice
    2. You create to build targets.

    Option 1 seems to be easier for me

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ASP.Net MVC project. Plus wordpress blog under a subfolder /Blog. Now, when
I have an ASP.NET project that contains many classes. I am thinking about creating
I have an ASP.Net project using AJAX that I am putting on a server
I have an ASP.NET project (VS2008 on Windows 7 with either webforms, MVC1, or
I have created a new VS2008 ASP.Net Web service project, with the default name
I have a problem that I suppose comes from my ASP.NET MVC project using
We have a web site built as an 'ASP.NET Website' type project, rather than
The Scenario I have an ASP.Net Web Project that uses a master page. This
I have an ASP.NET WebApi project that utilizes Entity Framework 4.1. I am attempting
I have an asp.net web project that references a domain project. From within the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.