Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to run non-Default website from VS

2 views
Skip to first unread message

Vincent

unread,
Dec 15, 2009, 7:00:44 AM12/15/09
to
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
--

Gregory A. Beamer

unread,
Dec 15, 2009, 4:46:15 PM12/15/09
to
"Vincent" <vfinn....@gmail.com> wrote in news:OUFT84XfKHA.2184
@TK2MSFTNGP04.phx.gbl:

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

Mark Rae [MVP]

unread,
Dec 15, 2009, 5:32:40 PM12/15/09
to
"Gregory A. Beamer" <NoSpamM...@comcast.netNoSpamM> wrote in message
news:Xns9CE2A022...@207.46.248.16...

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

Unless you use Web Deployment Projects...


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

Or use Web Deployment Projects...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Gregory A. Beamer

unread,
Dec 16, 2009, 1:15:10 PM12/16/09
to
"Mark Rae [MVP]" <ma...@markNOSPAMrae.net> wrote in news:eUWxGadfKHA.2188
@TK2MSFTNGP04.phx.gbl:

> Unless you use Web Deployment Projects...

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

Mark Rae [MVP]

unread,
Dec 16, 2009, 6:49:34 PM12/16/09
to
"Gregory A. Beamer" <NoSpamM...@comcast.netNoSpamM> wrote in message
news:Xns9CE37C57...@207.46.248.16...

>> Unless you use Web Deployment Projects...
>
> True, but the web deployment projects, to date, have been a bit
> underwhelming. ;-)

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

Gregory A. Beamer

unread,
Dec 17, 2009, 3:23:40 PM12/17/09
to
"Mark Rae [MVP]" <ma...@markNOSPAMrae.net> wrote in news:uJervpqfKHA.5420
@TK2MSFTNGP06.phx.gbl:

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

Vincent

unread,
Dec 30, 2009, 5:35:33 AM12/30/09
to
Hi,

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

Vincent

Vincent

unread,
Dec 30, 2009, 5:34:37 AM12/30/09
to
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

0 new messages