user2739418
user2739418

Reputation: 1631

change default url in mvc 4 project

In MVC 4, I created an application named “PhotoGallery” I run it from visual studio as below: http://localhost:55971/

And when it is deployed on Dev server it gets the URL as below:

http://devServer/PhotoGallery

Is it possible if I can run visual studio project like in Dev server? So my path could be as below?

http://localhost:55971/PhotoGallery

Issue is that some of the references which works on visual studio need to change on Dev server to work by adding dev application folder (IIS Folder) name in front.

E.g. I have XSLT which create download links as below. And on Dev server I need to add “PhotoGallery” in dynamic hyperlink generation.

<xsl:for-each select="/Contents/Downloads/download">
                          <li>
                            <a href="PhotoGallery/Download?FileName={@file}&amp;App={@App}"  class="fa {@icon}">
                              <xsl:apply-templates/>
                              <xsl:value-of select="@link"></xsl:value-of>
                            </a>
                          </li>

Upvotes: 1

Views: 510

Answers (1)

Julito Avellaneda
Julito Avellaneda

Reputation: 2385

Yes, it is possible, open the properties of the web project, go to web tab and set it in Project URL:

enter image description here

Upvotes: 2

Related Questions