Solved

Point subdomain to sub-directory

Posted on 2010-09-07
7
440 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 34

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 34

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
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!

 

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 34

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

752 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