ASP.NET MVC Deployed Application Server Address

Posted by Jacob Huggart on Stack Overflow See other posts from Stack Overflow or by Jacob Huggart
Published on 2010-05-26T19:26:32Z Indexed on 2010/05/26 19:41 UTC
Read the original article Hit count: 296

Filed under:
|
|

I have an application that sends an email to a user so that they may access a web form. In the email there is just a link to the start page of this form. Currently, I have the value for the form location hardcoded. Once the app is deployed I know it is in inetpub/wwwroot/appName, which results in a URL of serverip:appPort/appName.

What is the C# to get the serverip:appPort portion of the URL that I need?

I think that server.mappath() might work, but for some reason I can't get to the method even though I have the necessary references.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql-server