Unable to run non-Default website from VS

Discussion in 'ASP .Net' started by Vincent, Dec 15, 2009.

  1. Vincent

    Vincent Guest

    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
    --
     
    Vincent, Dec 15, 2009
    #1
    1. Advertising

  2. "Vincent" <> 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! |
    *******************************************
     
    Gregory A. Beamer, Dec 15, 2009
    #2
    1. Advertising

  3. "Mark Rae [MVP]" <> 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. ;-)

    Peace and Grace,

    --
    Gregory A. Beamer (MVP)

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

    *******************************************
    | Think outside the box! |
    *******************************************
     
    Gregory A. Beamer, Dec 16, 2009
    #3
  4. "Mark Rae [MVP]" <> 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.

    Peace and Grace,

    --
    Gregory A. Beamer (MVP)

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

    *******************************************
    | Think outside the box! |
    *******************************************
     
    Gregory A. Beamer, Dec 17, 2009
    #4
  5. Vincent

    Vincent Guest

    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

    Gregory A. Beamer wrote:

    > "Vincent" <> 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,




    --
     
    Vincent, Dec 30, 2009
    #5
  6. Vincent

    Vincent Guest

    Hi,

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

    Vincent

    Mark Rae [MVP] wrote:

    > "Gregory A. Beamer" <> wrote in
    > message news:Xns9CE2A022FD2B5gbworld@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...




    --
     
    Vincent, Dec 30, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. js

    Non-default website

    js, Nov 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    496
  2. Rob Meade
    Replies:
    1
    Views:
    559
    JIMCO Software
    Nov 1, 2005
  3. EdHelp
    Replies:
    0
    Views:
    335
    EdHelp
    Oct 18, 2006
  4. desktop
    Replies:
    2
    Views:
    462
    Victor Bazarov
    Jun 6, 2007
  5. Jake Barnes
    Replies:
    6
    Views:
    392
    9.co.uk
    Feb 8, 2006
Loading...

Share This Page