PDA

View Full Version : Development environment issue


shiku
12-13-2004, 06:04 AM
Hi - thank you for your help.

Problem: I am unable to develop and test my code locally. I have to be online, write my code and push to the DiscountASP server and then test live.

My suspision: I have a problem with the URLs I am passing

I need help with: Understanding how to set up my development environment

Development environment:
OS: Windows 2000 Professional
IDE: Notepad
IIS path: c:\inetpub\wwwroot\mysitecom

Production environment:
Host: DiscountASP
Domain name: http://www.mysite
Server path: e:\web\mysitecom\htdocs

Issue:
1. index.asp in my root folder re-directs to \source\login.asp - this works fine on DiscountASP, but reports file not found on localhost

2. I changed index.asp in my root folder re-direct to \mysitecom\source\login.asp - this works fine on localhost, but reports file not found on DiscountASP

What am I doing wrong? Obviously!!!! I have found no articles on this. Thank you so much. This will help me work offline - which is so much of my time.

*ssl

bruce
12-13-2004, 11:44 AM
Sounds like you have another folder in your local IIS setting.

What is the local path on your website on your local IIS?

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

bluebeard96
12-14-2004, 07:26 AM
Lookslike yourweb files are not in the root of your local IIS. Let's say,for example, that your IIS has a root of "c:\wwwroot\", but your local files are in "c:\wwwroot\mylocalsite\". Your site would be viewable at "http://localhost/mysite/" but a redirect to "/source/login.asp" is going to take you to "http://localhost/source/login.asp (http://localhost/source/login.asp)". Consider changing the redirect to exclude the first forward slash, which will cause the redirect to not start from the root (http://localhost/), but rather the current folder ("http://localhost/mysite/").


Response.redirect ("source/login.asp") ' Nobeginning slash "/"

Should take you on your local server
from http://localhost/mysite to http://localhost/mysite/source/login.asp

and on you DASP server
from http://www.yourdomain.com/ to http://www.yourdomain.com/source/login.asp


Let us know if that works. If so, it was just a matter of where the redirect starts looking for the "source" folder; if it starts from the root("/" in front), or starts from the current folder (no "/" in front).



Mike Reilly, Secretary/Webmaster
Kiwanis Club of Rancho Penasquitos
"Serving the Children of the World"
Mike@KiwanisPQ.org
www.KiwanisPQ.org (http://www.KiwanisPQ.org)
(760) 419-7429

shiku
12-15-2004, 02:07 AM
Bruce and Mike - thank you immensely for taking the time to help and explaining how I can try to fix the problem.</o:p>
Here are answers to your questions and comments as appropriate:</o:p>
Bruce you asked:</o:p>
>>Sounds like you have another folder in your local IIS setting.
>>What is the local path on your website on your local IIS?</o:p>
I am not sure what you mean by another folder in my local IIS setting. I have several sites in my IIS web-server.</o:p>
When I echoed the "Server.MapPath" here is what I get:</o:p>
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot</o:p>
Mike you suggested:
>>Lookslike yourweb files are not in the root of your local IIS. Let's say,for example, that your IIS has a root of "c:\wwwroot\", but your local files are in "c:\wwwroot\mylocalsite\". </o:p>
You are absolutely right. My web files are not in the root of my local IIS.Local IIS is c:\inetpub\wwwroot. Since I have multiple sites I have folders within c:\inetpub\wwwroot. E.g. c:\inetpub\wwwroot\project1, c:\inetpub\wwwroot\mysite etc.</o:p>
>>Your site would be viewable at "http://localhost/mysite/" but a redirect to "/source/login.asp" is going to take you to "http://localhost/source/login.asp (http://localhost/source/login.asp)". Consider changing the redirect to exclude the first forward slash, which will cause the redirect to not start from the root (http://localhost/), but rather the current folder ("http://localhost/mysite/"). </o:p>
You are absolutely right. My web files are not in the root of my local IIS.Local IIS is c:\inetpub\wwwroot. Since I have multiple sites I have folders within c:\inetpub\wwwroot. E.g. c:\inetpub\wwwroot\project1, c:\inetpub\wwwroot\mysite etc.</o:p>
</o:p>
>>Response.redirect ("source/login.asp") ' Nobeginning slash "/"</o:p>
>>Should take you on your local server from http://localhost/mysite to >>http://localhost/mysite/source/login.asp (http://localhost/mysite/source/login.asp)and on you DASP server</o:p>
>>from http://www.yourdomain.com/ to http://www.yourdomain.com/source/login.asp</o:p>
>>Let us know if that works. If so, it was just a matter of where the redirect starts looking for the "source" >>folder; if it starts from the root("/" in front), or starts from the current folder (no "/" in front).</o:p>
</o:p>
Well, I did change the /source/login.asp to source/login.asp. It worked fine.However I had to also change my includes from <!-- #include virtual ="/source/include/top.asp" --> to <!-- #include virtual ="mysite/source/include/top.asp" --> which is contradictory. At this point I started to modify my code to change all the redirects, but for some strange reason now "mysite" is getting prefixed when I am using variables for re-direction.

Thanks again!

*ssl