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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:45:17+00:00 2026-06-03T10:45:17+00:00

I have a .NET web application in which I am developing three separate websites

  • 0

I have a .NET web application in which I am developing three separate websites that all share some classes, master pages, etc. (Call the sites mysite1, mysite2, and mysite3)

When I view the site using “View in Browser” from VS (which leads to http://localhost/projectName/mysite1/default.aspx), everything works as expected.

However, I also setup an IIS website called Mysite1 that uses http://mysite1/ and points to the “mysite1” subfolder as its local path (under Home Directory). When I visit http://mysite1/, I get the following ASP.NET error:

Parser Error Message: Could not load type
‘MyProject.Mysite1.Default’.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Default.aspx.cs"
Inherits="MyProject.Mysite1.Default" %>

Line 2:

Line 3:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The namespaces are all valid, as evidenced by the site working correctly when run from “View in Browser”. I figure it has something to do with the base folder of the application artificially changing because that’s what several other errors were caused by, but I don’t know how to resolve it.

How should I have configured IIS to use the subfolder of a web application as its base folder?

  • 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-06-03T10:45:24+00:00Added an answer on June 3, 2026 at 10:45 am
    1. Go to the IIS.
    2. Right Click your WebSite.
    3. Create the Virtual Directory with the name of mysite1.
    4. Right click the Virtual Directory mysite1 and select Convert to Application

    Now you can operate http://mysite1/ and pages inside mysite1

    CodeBehind = Needs to be compiled ( asp.net 1.1 model) and compiled binary is placed in the bin folder of the website. You
    need to do a compile in visual studio before you deploy. Good model
    when you do not want the source code to be viewable as plain text …
    for example when delivering to a customer who you not have obligation
    to provide code.

    CodeFile = You provide the source file with the solution for deployment. ASP.NET 2.0 runtime compiles the code when
    needed. The compiled files are at Microsfot.NET[.NET
    version]\Temporary ASP.NET Files.

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

Sidebar

Related Questions

I have an ASP.net web service that I'm using for a web application which
We have a Web application (ASP.NET) which displays in some page links to miscellaneous
I have a project (Web Application) which I have been developing in C#/ASP.NET, and
I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set
I have a .net web application which has a reference to a web service.
I have a ASP.NET web application which has more than 100 pages. Each page
A simple question. I have an ASP.NET web application which contains several assemblies and
I have an ASP.NET web application project which references another project called ModusCore (or
We have an ASP.net 2.0 web application which is using themes set on the
I have an ASP.NET 3.5 web application which works perfectly fine on my local

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.