Unable to run non-Default website from VS

V

Vincent

Hi,

I have set up a second website in IIS and I want to be able to debug my
web applications there.

I created the web site on 127.0.0.2 and called it stable.
VS won't let me save the "Use Local IIS Web server" pointing to this
new website.

So I have the setting
http://localhost/Stable/Membership
but I want
http://127.0.0.2/Membership

or a name instead of 127.0.0.2


The reason for doing this is that we have set up internal addresses for
dev and stable so http://service.company.dev and
http://service.stable.company.dev

Rather than having to change the config files from
service.stable.company.dev to localhost/Stable when I want to debug the
stable code locally I'd like to have an alias for
service.stable.company.dev in my hosts file (this would make deployment
easier).

This works fine for service.company.dev, it is sent to 127.0.0.1 and I
can use localhost in the project settings.

I can alias service.stable.company.dev to 127.0.0.2 no problem but
can't get VS to accept that, I have to attach to the process instead.

Anyone know what the problem is?
Or is there a simpler alternative to what I am doing?

I am using VS 2008 on Windows 7 with IIS 7.5.

Thanks, Vin
--
 
G

Gregory A. Beamer

Anyone know what the problem is?
Or is there a simpler alternative to what I am doing?

I did not read enough to solve your problem, but I have an alternative.

The main issue you have is config. In Visual Studio 2010 (.NET 4.0), you
will have options of deploying sites and changing confg. You do not have
that now, of course.

But, there is something you can do that is heading in the right
direction

In the config file, you can specify another file for different parts,
like app settings, conn strings, etc. What you do is create a new file,
like db.config.

You create one file for dev, another for test and another for
production.

You then move the test and production files to their respective servers.
In Visual Studio, you set it so these configs are not copied when you
publish a site.

That is pretty much it.

Any time you try to hard wire environments over config, you have things
upside down, at least in my book. Config == configuration. That means it
is supposed to configure the site, not force you to change the site to
match config.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
G

Gregory A. Beamer

Unless you use Web Deployment Projects...

True, but the web deployment projects, to date, have been a bit
underwhelming. ;-)

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
G

Gregory A. Beamer

I disagree. I use WDP all the time...

I find it easier to xcopy the bits to the server. I do, however, like the
improvements in 2010.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
V

Vincent

Hi,

That is what we have and are trying to get away from.
It sounds (and is) a simple strategy but there have been a lot of
problems with the files being overwritten when they shouldn't be or not
overwritten when they should be.

Oh well, thanks for the response, sorry it took me so long to read it.

Vincent
I did not read enough to solve your problem, but I have an
alternative.

The main issue you have is config. In Visual Studio 2010 (.NET 4.0),
you will have options of deploying sites and changing confg. You do
not have that now, of course.

But, there is something you can do that is heading in the right
direction

In the config file, you can specify another file for different parts,
like app settings, conn strings, etc. What you do is create a new
file, like db.config.

You create one file for dev, another for test and another for
production.

You then move the test and production files to their respective
servers. In Visual Studio, you set it so these configs are not
copied when you publish a site.

That is pretty much it.

Any time you try to hard wire environments over config, you have
things upside down, at least in my book. Config == configuration.
That means it is supposed to configure the site, not force you to
change the site to match config.

Peace and Grace,



--
 
V

Vincent

Hi,

Thanks for the suggestion, I have never used them so I'll go away and
read up on them.

Vincent
Unless you use Web Deployment Projects...



Or use Web Deployment Projects...



--
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top