Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 1st, 2009, 09:16 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open url like http://noida.saamstesting.com

Hello Friends,

I've a folder named "noida" in my project and some pages in that folder And now i've to open those pages like http://noida.saamstesting.com/Page1.aspx .
 
Old June 1st, 2009, 09:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

For that to work, you need to do the following:

1. Register the noida subdomain in the DNS server, or make sure the main domain has a star record.

2. Create a new web site in IIS on the web server. Make the root of this new web site point to the noida folder.

From then on, requests to the noida subdomain will be handled bby pages in the physical noida folder.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 1st, 2009, 09:30 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Sir,

I've created a noida subdomain on my server. But this noida subdomain having a web.config and App_code folder now how i'll point my new web site to noida folder. Can you explain it

Waiting for your reply

Quote:
Originally Posted by Imar View Post
Hi there,

For that to work, you need to do the following:

1. Register the noida subdomain in the DNS server, or make sure the main domain has a star record.

2. Create a new web site in IIS on the web server. Make the root of this new web site point to the noida folder.

From then on, requests to the noida subdomain will be handled bby pages in the physical noida folder.

Cheers,

Imar
 
Old June 1st, 2009, 09:32 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

When you create a new site in IIS, you need to supply the root folder. In your case, that's the noida folder.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 1st, 2009, 09:59 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's mean i've to place my noida folder of my web site into my subdomain(noida) but there is also a web.config file in my subdomain noida. Should i've to make any changes in that web.config file.

Quote:
Originally Posted by Imar View Post
When you create a new site in IIS, you need to supply the root folder. In your case, that's the noida folder.

Imar
 
Old June 1st, 2009, 12:01 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I am not sure what you are asking / what you mean exactly. Can you elaborate? What exactly are you trying to accomplish and what kind of set up do you have? Are other domains or sites involved as well?

BTW: please don't quote the entire message when replying. It only clutters up this thread and doesn't add any value.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 2nd, 2009, 01:48 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I explain my problem again. I've designed a website named PropertyProject. In this project i've two folders which are cities specific like noida and delhi. When i open web pages from noida folder it displays the url like http://www.saamstesting.com/noida but i want to that like as http://noida.saamstesting.comor http://www.noida.saamstesting.com. For it i've created a sub-domain into my main domain(saamstesting). And this subdomain folder having a web.config and App_Code folder. So i want to open noida's folder of my project(PropertyProject) pages like this link http://noida.saamstesting.com

And also should i make any changes to the web.config file of noida subdomain folder
 
Old June 2nd, 2009, 12:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not 100% sure, but I don't think it can be done as you wish.

What you could do is this:

1. Use the Default web site to intercept all requests not explicitly bound (e.g. whatevercity.domainname.com and so on). Alternatively, bind all city specific URLs to your web site in IIS

2. In Global.asax, in Authenticate_Request or Session_Start, intercept the URL, see if you have a sub folder for it and redirect. That is, rewrite something like noida.saamstesting.com to www.saamstesting.com/noida

However, this will probably change the client URL as well. E.g. a client browses to noida.saamstesting.com and sees the address bar change to www.saamstesting.com/noida as you need to do a client redirect using Response.Redirect. AFAIK, you cannot use Server.Transfer or RewritePath as the two domains will be seen as different application.

Alternatively, you could rewrite at the server to noida.saamstesting.com/noida

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
DTS ActiveX - Download file from an url(http://..) maruthiraja SQL Server DTS 0 April 9th, 2008 12:04 PM
How to change file path to http url cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 25th, 2007 12:18 AM
Reading current http url dynamically in php hi2php PHP How-To 1 November 1st, 2006 04:16 AM
http get method not allowed by URL tryingHard Servlets 4 February 26th, 2004 07:55 AM
to get the url from the http packet du_aa C++ Programming 0 December 4th, 2003 03:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.