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 376621
In Process

The Archive Base Latest Questions

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

I’m trying to develop an agent/client that will listen to HTTP requests on a

  • 0

I’m trying to develop an agent/client that will listen to HTTP requests on a given port, and serve a simple ASP.Net page. To that end, I’m using the HttpListener and ApplicationHost classes.

I’ve added a simple page to my project (mypage.aspx). When it contained all the code in the single file, all worked well (tested it by adding <% Response.Write(DateTime.Now.ToString()); %> to the HTML in the page, and observing the timestamp in the browser).

I then proceeded to add a single button to it, add a code-behind file (mypage.aspx.cs) and created a designer file (mypage.aspx.designer.cs) manually. I’ve added <%@ Page Language="C#" AutoEventWireup="true" Codebehind="SearchForm.aspx.cs" Inherits="MyNameSpace.MyPage" %> to the .aspx file and verified all compiles well.

When trying to access the web page from the browser, I get the following error:

Description: An error occurred during
the parsing of a resource required to
service this request. Please review
the following specific parse error
details and modify your source file
appropriately.

Parser Error Message: Could not load
type
‘MyNameSpace.MyPage’.

Source Error:

Line 1: <%@ Page Language=”C#”
AutoEventWireup=”true”
Codebehind=”MyPage.aspx.cs”
Inherits=”MyNameSpace.MyPage”
%>

I found out that this means my code-behind has not been compiled, or that that application cannot find the assembly. All my “bin” directory contains is the .exe and .pdb of my original application – no .dll for the .aspx.

I tried the solution offered in this question and verified my .aspx and .cs files were marked for “compile” build action – to no avail.

My question is: how do I cause an .aspx file to compile in a regular WinForm application? Can I do it, or will I have to resort to adding a web application to my solution?

  • 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-12T14:37:02+00:00Added an answer on May 12, 2026 at 2:37 pm

    Check out Cassini. It’s a web server that has been build awhile back by the ASP.NET team to allow Visual Studio to debug web applications without needing IIS. It’s also a standalone web server. The source can be found on Dmitry’s blog at http://blogs.msdn.com/dmitryr/archive/2006/03/09/548131.aspx

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

Sidebar

Ask A Question

Stats

  • Questions 399k
  • Answers 399k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer EJB3 Timer service or Use Quartz scheduler library, or perform… May 15, 2026 at 3:51 am
  • Editorial Team
    Editorial Team added an answer A strictly conforming XHTML 1.0 document will include an XHTML… May 15, 2026 at 3:51 am
  • Editorial Team
    Editorial Team added an answer You should remove the following lines: r = new FileInfo(Path.Combine(destpath,f.Name));… May 15, 2026 at 3:51 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.