Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Point subdomain to sub-directory

Posted on 2010-09-07
7
Medium Priority
?
448 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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 

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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

730 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