Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Point subdomain to sub-directory

Posted on 2010-09-07
7
Medium Priority
?
449 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 35

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 35

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 35

Accepted Solution

by:
it_saige earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Loops Section Overview
Screencast - Getting to Know the Pipeline

972 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