Images/CSS not resolving on dev machine testing

J

John Kotuby

I have just upgraded to a new development machine that came with Vista
ultimate.
I am developing a website with VS2005 and VB. My image and css references in
my source code are all relative. For example http://root.com/images/some.gif
in my source is just /images/some.gif. When I publish to the root web on any
IIS server, that works just fine.

On my old XP machine I had registered a custom version of multisite.dll with
a config.ini like this:
[websites]
localhost=/alias

That worked fine. To test the project and have all relative references work
properly on my dev machine I just typed in IE http://localhost instead of
http://localhost/alias and everything worked as if it were published to a
root web and acted exactly like it does when published to a production
server (with a different web.config file of course). But multisite.dll will
not register on Vista.

Note I am developing in C:\development\project folder. When it is set up as
a virtual website I need to type in http://localhost/alias to get it to run.
That is when I lose my images and css styles.

So, what is the correct way to do this?

I have tried editing the hosts file to create an entry like:
localhost/alias alias

Thinking that I can then type in http://alias and get the site to come up.
I have also heard that others have somehow created a domain refererence
(maybe on a network machine... they were not clear) and got the test site to
work.
Note... when I just run debug... my images do not show up either.

Then I thought of creating a <base> element in each page with a variable in
global.asa that I could reference as <base> in my pages and maybe that will
help.

OK... I obiously need some schooling on this matter. I have not had the
luxury of attending VS2005 workshops to get this "small" problem rectified
and have not found an anwer other than using multisite.dll.
Any suggestions would be appreciated..... thanks

If somebody could point me in the right direction it would be very much
appreciated.
 
G

George Ter-Saakov

Hi,
My understanding you referring to multisite.dll from
http://www.codeproject.com/aspnet/Multisite.asp

I actually wrote it way back before vista came around. Unfortunately I do
not have Vista machine available for me to test. So I can not promise that I
will fix it soon. I'll try but if there is no update in this article in a
week then I probably failed.
-----------------------------------------------------------------------------

to use <base> tag is good idea and probably should work. involves changing
the whole project though.
--------------------------------------------------------------

Other than that i can not suggest anything. You might try to swtich to work
with Casini instead of IIS. Then i belive your application will run from the
root and images will be back.




George.



John Kotuby said:
I have just upgraded to a new development machine that came with Vista
ultimate.
I am developing a website with VS2005 and VB. My image and css references
in my source code are all relative. For example
http://root.com/images/some.gif in my source is just /images/some.gif.
When I publish to the root web on any IIS server, that works just fine.

On my old XP machine I had registered a custom version of multisite.dll
with a config.ini like this:
[websites]
localhost=/alias

That worked fine. To test the project and have all relative references
work properly on my dev machine I just typed in IE http://localhost
instead of http://localhost/alias and everything worked as if it were
published to a root web and acted exactly like it does when published to a
production server (with a different web.config file of course). But
multisite.dll will not register on Vista.

Note I am developing in C:\development\project folder. When it is set up
as a virtual website I need to type in http://localhost/alias to get it to
run. That is when I lose my images and css styles.

So, what is the correct way to do this?

I have tried editing the hosts file to create an entry like:
localhost/alias alias

Thinking that I can then type in http://alias and get the site to come up.
I have also heard that others have somehow created a domain refererence
(maybe on a network machine... they were not clear) and got the test site
to work.
Note... when I just run debug... my images do not show up either.

Then I thought of creating a <base> element in each page with a variable
in global.asa that I could reference as <base> in my pages and maybe that
will help.

OK... I obiously need some schooling on this matter. I have not had the
luxury of attending VS2005 workshops to get this "small" problem rectified
and have not found an anwer other than using multisite.dll.
Any suggestions would be appreciated..... thanks

If somebody could point me in the right direction it would be very much
appreciated.
 
G

George Ter-Saakov

Just a quick update.
I looked at the some docs quickly and looks like you need to specifically
enable ISAPI extensions for IIS.
Check out this article
http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/default.aspx first
picture has a reference on how to do it.

Hope this helps.
Let me know.
George.


George Ter-Saakov said:
Hi,
My understanding you referring to multisite.dll from
http://www.codeproject.com/aspnet/Multisite.asp

I actually wrote it way back before vista came around. Unfortunately I do
not have Vista machine available for me to test. So I can not promise that
I will fix it soon. I'll try but if there is no update in this article in
a week then I probably failed.
-----------------------------------------------------------------------------

to use <base> tag is good idea and probably should work. involves changing
the whole project though.
--------------------------------------------------------------

Other than that i can not suggest anything. You might try to swtich to
work with Casini instead of IIS. Then i belive your application will run
from the root and images will be back.




George.



John Kotuby said:
I have just upgraded to a new development machine that came with Vista
ultimate.
I am developing a website with VS2005 and VB. My image and css references
in my source code are all relative. For example
http://root.com/images/some.gif in my source is just /images/some.gif.
When I publish to the root web on any IIS server, that works just fine.

On my old XP machine I had registered a custom version of multisite.dll
with a config.ini like this:
[websites]
localhost=/alias

That worked fine. To test the project and have all relative references
work properly on my dev machine I just typed in IE http://localhost
instead of http://localhost/alias and everything worked as if it were
published to a root web and acted exactly like it does when published to
a production server (with a different web.config file of course). But
multisite.dll will not register on Vista.

Note I am developing in C:\development\project folder. When it is set up
as a virtual website I need to type in http://localhost/alias to get it
to run. That is when I lose my images and css styles.

So, what is the correct way to do this?

I have tried editing the hosts file to create an entry like:
localhost/alias alias

Thinking that I can then type in http://alias and get the site to come
up.
I have also heard that others have somehow created a domain refererence
(maybe on a network machine... they were not clear) and got the test site
to work.
Note... when I just run debug... my images do not show up either.

Then I thought of creating a <base> element in each page with a variable
in global.asa that I could reference as <base> in my pages and maybe that
will help.

OK... I obiously need some schooling on this matter. I have not had the
luxury of attending VS2005 workshops to get this "small" problem
rectified and have not found an anwer other than using multisite.dll.
Any suggestions would be appreciated..... thanks

If somebody could point me in the right direction it would be very much
appreciated.
 
J

John Kotuby

George,

Thanks for the answer and the link. I wish I had seen that article before
resorting to running "aspnet_regiis -enable -i" from the command prompt in
the correct dotnet framework install folder for version 2.0. Now I see why
my ASP.NET applications weren't even running at all originally (I was
getting errors about unregistered MIME types).

I was just about to post another work-around I discovered this morning,
because I was getting no feedback. I figured my question was just too stupid
to dignify a response. Here is my "new post".
---------------------------------------
So no need for multisite.dll!

I just went into IIS Manager on my dev machine and set the home folder for
my Default website
on the development machine to my project folder. Now the images and
stylesheets are resolving when I type in http://localhost, because the
default website now points to c:\devlopment\myprojfolder.

I guess being ignored by the newsgroup community can lead to a low level of
creativity...LOL.

Still haven't figured out how to get my relative image paths to work
properly in the debugger when using a virtual directory off the root of
a website, or in a different location altogether (I don't like to clutter up
Inetpub\www).

Oh, the perils of skipping over the basics during the learning curve and
just jumping into a new development language.

Do any of you MVPs program from a virtual web on your local machine that by
default resolves to something like http://localhost/devfolder? If so, how do
you get your images to show up as if you were programming from a root web?
Just wondering...still.

Thanks to all....



George Ter-Saakov said:
Just a quick update.
I looked at the some docs quickly and looks like you need to specifically
enable ISAPI extensions for IIS.
Check out this article
http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/default.aspx first
picture has a reference on how to do it.

Hope this helps.
Let me know.
George.


George Ter-Saakov said:
Hi,
My understanding you referring to multisite.dll from
http://www.codeproject.com/aspnet/Multisite.asp

I actually wrote it way back before vista came around. Unfortunately I do
not have Vista machine available for me to test. So I can not promise
that I will fix it soon. I'll try but if there is no update in this
article in a week then I probably failed.
-----------------------------------------------------------------------------

to use <base> tag is good idea and probably should work. involves
changing the whole project though.
--------------------------------------------------------------

Other than that i can not suggest anything. You might try to swtich to
work with Casini instead of IIS. Then i belive your application will run
from the root and images will be back.




George.



John Kotuby said:
I have just upgraded to a new development machine that came with Vista
ultimate.
I am developing a website with VS2005 and VB. My image and css
references in my source code are all relative. For example
http://root.com/images/some.gif in my source is just /images/some.gif.
When I publish to the root web on any IIS server, that works just fine.

On my old XP machine I had registered a custom version of multisite.dll
with a config.ini like this:
[websites]
localhost=/alias

That worked fine. To test the project and have all relative references
work properly on my dev machine I just typed in IE http://localhost
instead of http://localhost/alias and everything worked as if it were
published to a root web and acted exactly like it does when published to
a production server (with a different web.config file of course). But
multisite.dll will not register on Vista.

Note I am developing in C:\development\project folder. When it is set up
as a virtual website I need to type in http://localhost/alias to get it
to run. That is when I lose my images and css styles.

So, what is the correct way to do this?

I have tried editing the hosts file to create an entry like:
localhost/alias alias

Thinking that I can then type in http://alias and get the site to come
up.
I have also heard that others have somehow created a domain refererence
(maybe on a network machine... they were not clear) and got the test
site to work.
Note... when I just run debug... my images do not show up either.

Then I thought of creating a <base> element in each page with a variable
in global.asa that I could reference as <base> in my pages and maybe
that will help.

OK... I obiously need some schooling on this matter. I have not had the
luxury of attending VS2005 workshops to get this "small" problem
rectified and have not found an anwer other than using multisite.dll.
Any suggestions would be appreciated..... thanks

If somebody could point me in the right direction it would be very much
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top