Solved

Point subdomain to sub-directory

Posted on 2010-09-07
7
428 Views
Last Modified: 2012-05-10
Hello,

I have an ASP.NET application.

let's call it www.myapp.com

I want to point a subdomain to a subdirectory of it

e.g., pub.myapp.com would point to www.myapp.com/pub

It wouldn't be a redirect. It would be more like an alias.

I tried creating an IIS website and pointing it's home directory to the subdirectory. But, it creates a web.config file and I get errors when I try to go to it via a browser. It wants the app root, seemingly, to be in that subdirectory.

What am I doing wrong?

Thanks in advance,

Steve
0
Comment
Question by:skbohler
  • 3
  • 3
7 Comments
 
LVL 32

Expert Comment

by:it_saige
ID: 33618008
Are you using IIS6 or IIS7?

What errors are you receiving (associated error numbers and code would be helpful)?

-saige-
0
 

Author Comment

by:skbohler
ID: 33618107
IIS 6

I'm getting an ASP.NET compilation error

BC30002: Type 'UserAuth' is not defined.

If I go directly to the subdirectory outside of using the subdomain, it works fine.
0
 
LVL 32

Expert Comment

by:it_saige
ID: 33618289
How did you create your subdomain (in other words did you create it as a new website under an existing website or as a new website directly under the server)?

You mention that you go directly to the subdirectory outside of using the subdomain, could you elaborate a bit?

-saige-
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:skbohler
ID: 33618391
I created it as a new website on the same level as my other websites. Didn't know you can create a website under an existing website.

What I meant was that if I go to www.myapp.com/pub, I don't get the error.
0
 
LVL 32

Accepted Solution

by:
it_saige earned 500 total points
ID: 33619046
ah, so your getting an error when you browse to the site using pub.myapp.com as opposed to www.myapp.com/pub...

I think I have a better understanding...

Let me paraphrase your question.

You have an existing .NET web application/site [www.myapp.com].  In this web application/site you have a directory called pub.  You wish to publish pub as a subdomain [pub.myapp.com].

Am I following you correctly?

-saige-
0
 

Author Comment

by:skbohler
ID: 33619091
Yep, that's correct.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now